1
0
Fork 0
alistair23-linux/drivers/xen
David Woodhouse a09d4e7acd xen: Fix event channel callback via INTX/GSI
[ Upstream commit 3499ba8198 ]

For a while, event channel notification via the PCI platform device
has been broken, because we attempt to communicate with xenstore before
we even have notifications working, with the xs_reset_watches() call
in xs_init().

We tend to get away with this on Xen versions below 4.0 because we avoid
calling xs_reset_watches() anyway, because xenstore might not cope with
reading a non-existent key. And newer Xen *does* have the vector
callback support, so we rarely fall back to INTX/GSI delivery.

To fix it, clean up a bit of the mess of xs_init() and xenbus_probe()
startup. Call xs_init() directly from xenbus_init() only in the !XS_HVM
case, deferring it to be called from xenbus_probe() in the XS_HVM case
instead.

Then fix up the invocation of xenbus_probe() to happen either from its
device_initcall if the callback is available early enough, or when the
callback is finally set up. This means that the hack of calling
xenbus_probe() from a workqueue after the first interrupt, or directly
from the PCI platform device setup, is no longer needed.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: https://lore.kernel.org/r/20210113132606.422794-2-dwmw2@infradead.org
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-01-27 11:47:44 +01:00
..
events xen: Fix event channel callback via INTX/GSI 2021-01-27 11:47:44 +01:00
xen-pciback xen/xenbus: Add 'will_handle' callback support in xenbus_watch_path() 2020-12-30 11:51:46 +01:00
xenbus xen: Fix event channel callback via INTX/GSI 2021-01-27 11:47:44 +01:00
xenfs Merge branch 'work.mount0' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-07-19 10:42:02 -07:00
Kconfig xen/gntdev: Use select for DMA_SHARED_BUFFER 2019-12-31 16:45:01 +01:00
Makefile xen: remove tmem driver 2019-07-17 08:09:58 +02:00
acpi.c
arm-device.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
balloon.c xen/balloon: make the balloon wait interruptible 2020-08-19 08:16:29 +02:00
biomerge.c block: pass page to xen_biovec_phys_mergeable 2019-04-01 12:11:13 -06:00
cpu_hotplug.c xen, cpu_hotplug: Prevent an out of bounds access 2019-03-08 17:58:14 +01:00
dbgp.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
efi.c xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
evtchn.c xen/events: switch user event channels to lateeoi model 2020-11-05 11:43:11 +01:00
features.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
gntalloc.c
gntdev-common.h
gntdev-dmabuf.c xen/gntdev: Fix dmabuf import with non-zero sgt offset 2020-08-19 08:16:29 +02:00
gntdev-dmabuf.h xen/gntdev: Do not destroy context while dma-bufs are in use 2019-02-18 06:50:03 +01:00
gntdev.c xen/gntdev.c: Mark pages as dirty 2020-11-01 12:01:06 +01:00
grant-table.c xen/grant-table: remove unnecessary printing 2019-10-10 10:41:30 -04:00
manage.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
mcelog.c
mem-reservation.c
pci.c xen/pci: reserve MCFG areas earlier 2019-09-12 15:02:55 -04:00
pcpu.c
platform-pci.c xen: Fix event channel callback via INTX/GSI 2021-01-27 11:47:44 +01:00
preempt.c xen: don't reschedule in preemption off sections 2020-08-26 10:41:07 +02:00
privcmd-buf.c xen/privcmd-buf.c: convert to use vm_map_pages_zero() 2019-05-14 09:47:50 -07:00
privcmd.c xen/privcmd: allow fetching resource sizes 2021-01-23 15:57:55 +01:00
privcmd.h
pvcalls-back.c xen/pvcallsback: use lateeoi irq binding 2020-11-05 11:43:11 +01:00
pvcalls-front.c xen: fixes for 5.2-rc3 2019-05-31 10:53:34 -07:00
pvcalls-front.h
swiotlb-xen.c swiotlb-xen: use vmalloc_to_page on vmalloc virt addresses 2020-08-26 10:40:56 +02:00
sys-hypervisor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
time.c
xen-acpi-cpuhotplug.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 12 2019-05-21 11:28:45 +02:00
xen-acpi-memhotplug.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 12 2019-05-21 11:28:45 +02:00
xen-acpi-pad.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
xen-acpi-processor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
xen-balloon.c xen/balloon: Support xend-based toolstack take two 2020-02-11 04:35:36 -08:00
xen-front-pgdir-shbuf.c
xen-scsiback.c xen/scsiback: use lateeoi irq binding 2020-11-05 11:43:11 +01:00
xen-stub.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 12 2019-05-21 11:28:45 +02:00
xlate_mmu.c xen: avoid link error on ARM 2019-07-31 08:14:12 +02:00