linux/arch
David Woodhouse cdb2e14493 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:05:37 +01:00
..
alpha alpha: fix annotation of io{read,write}{16,32}be() 2020-08-26 10:31:02 +02:00
arc arch/arc: add copy_user_page() to <asm/page.h> to fix build error on ARC 2021-01-19 18:22:36 +01:00
arm xen: Fix event channel callback via INTX/GSI 2021-01-27 11:05:37 +01:00
arm64 KVM: arm64: Don't access PMCR_EL0 when no PMU is available 2021-01-17 14:04:23 +01:00
c6x
h8300
hexagon hexagon: define ioremap_uc 2020-05-10 10:30:11 +02:00
ia64 ia64: fix build error with !COREDUMP 2020-11-05 11:08:52 +01:00
m68k m68k: q40: Fix info-leak in rtc_ioctl 2020-10-01 13:14:24 +02:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:34:53 +01:00
mips MIPS: relocatable: fix possible boot hangup with KASLR enabled 2021-01-19 18:22:35 +01:00
nds32
nios2
openrisc openrisc: Fix cache API compile issue when not inlining 2020-09-23 12:10:58 +02:00
parisc parisc: Implement __smp_store_release and __smp_load_acquire barriers 2020-08-19 08:15:07 +02:00
powerpc powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe() 2021-01-06 14:45:01 +01:00
riscv riscv: Fix kernel time_init() 2021-01-27 11:05:37 +01:00
s390 s390/kexec_file: fix diag308 subcode when loading crash kernel 2020-12-30 11:26:09 +01:00
sh sh: landisk: Add missing initialization of sh_io_port_base 2020-08-21 11:05:39 +02:00
sparc sparc64: remove mm_cpumask clearing to fix kthread_use_mm race 2020-11-05 11:08:38 +01:00
um um: chan_xterm: Fix fd leak 2020-12-30 11:26:04 +01:00
unicore32
x86 crypto: x86/crc32c - fix building with clang ias 2021-01-23 15:49:55 +01:00
xtensa xtensa: uaccess: Add missing __user to strncpy_from_user() prototype 2020-12-02 08:48:10 +01:00
.gitignore
Kconfig mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race 2020-11-05 11:08:38 +01:00