]> xenbits.xensource.com Git - xen.git/commit
x86/pci: disable MSI(-X) on all devices at shutdown
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 17 Feb 2025 12:32:52 +0000 (13:32 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 17 Feb 2025 12:32:52 +0000 (13:32 +0100)
commit9f4c92d70e3aff831c34e324dabf209bf7b6ab4e
tree2f9910689482ba1b3f37c4dc306e175ded19520d
parent8cd8dddda705fdb9a18ae1d426378b7e01e84d92
x86/pci: disable MSI(-X) on all devices at shutdown

Attempt to disable MSI(-X) capabilities on all PCI devices know by Xen at
shutdown.  Doing such disabling should facilitate kexec chained kernel from
booting more reliably, as device MSI(-X) interrupt generation should be
quiesced.

Only attempt to disable MSI(-X) on all devices in the crash context if the
PCI lock is not taken, otherwise the PCI device list could be in an
inconsistent state.  This requires introducing a new pcidevs_trylock()
helper to check whether the lock is currently taken.

Disabling MSI(-X) should prevent "Receive accept error" being raised as a
result of non-disabled interrupts targeting offline CPUs.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 7ab6951981231b4c576a3588248c303001272588
master date: 2025-02-12 15:56:07 +0100
xen/arch/x86/crash.c
xen/arch/x86/include/asm/msi.h
xen/arch/x86/msi.c
xen/arch/x86/smp.c
xen/drivers/passthrough/pci.c
xen/include/xen/pci.h