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
Kconfig
Makefile
acpi.c
arm-device.c
balloon.c xen/balloon: make the balloon wait interruptible 2020-08-19 08:16:29 +02:00
biomerge.c
cpu_hotplug.c
dbgp.c
efi.c
evtchn.c xen/events: switch user event channels to lateeoi model 2020-11-05 11:43:11 +01:00
features.c
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
gntdev.c xen/gntdev.c: Mark pages as dirty 2020-11-01 12:01:06 +01:00
grant-table.c
manage.c
mcelog.c
mem-reservation.c
pci.c
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
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
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
time.c
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c
xen-balloon.c
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
xlate_mmu.c