linux-stable/drivers/pci
Marek Marczykowski-Górecki 1a519dc7a7 PCI/MSI: Skip masking MSI-X on Xen PV
When running as Xen PV guest, masking MSI-X is a responsibility of the
hypervisor. The guest has no write access to the relevant BAR at all - when
it tries to, it results in a crash like this:

    BUG: unable to handle page fault for address: ffffc9004069100c
    #PF: supervisor write access in kernel mode
    #PF: error_code(0x0003) - permissions violation
    RIP: e030:__pci_enable_msix_range.part.0+0x26b/0x5f0
     e1000e_set_interrupt_capability+0xbf/0xd0 [e1000e]
     e1000_probe+0x41f/0xdb0 [e1000e]
     local_pci_probe+0x42/0x80
    (...)

The recently introduced function msix_mask_all() does not check the global
variable pci_msi_ignore_mask which is set by XEN PV to bypass the masking
of MSI[-X] interrupts.

Add the check to make this function XEN PV compatible.

Fixes: 7d5ec3d361 ("PCI/MSI: Mask all unused MSI-X entries")
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210826170342.135172-1-marmarek@invisiblethingslab.com
2021-08-27 00:27:15 +02:00
..
controller ARM: ixp4xx: fix building both pci drivers 2021-08-12 23:10:09 +02:00
endpoint Merge branch 'remotes/lorenzo/pci/endpoint' 2021-05-04 10:43:27 -05:00
hotplug Merge branch 'pci/kernel-doc' 2021-07-06 10:56:29 -05:00
pcie Merge branch 'pci/sysfs' 2021-07-06 10:56:25 -05:00
switch PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2021-06-03 22:14:47 -05:00
access.c
ats.c PCI: Fix kernel-doc errors 2021-03-11 17:37:20 -06:00
bus.c
ecam.c PCI: Dynamically map ECAM regions 2021-06-16 17:20:40 -05:00
host-bridge.c
iov.c Merge branch 'pci/virtualization' 2021-07-06 10:56:26 -05:00
irq.c
Kconfig
Makefile
mmap.c
msi.c PCI/MSI: Skip masking MSI-X on Xen PV 2021-08-27 00:27:15 +02:00
of.c pci-v5.13-fixes-2 2021-06-18 13:54:11 -07:00
p2pdma.c Merge branch 'pci/sysfs' 2021-07-06 10:56:25 -05:00
pci-acpi.c PCI/ACPI: Fix acpi_pci_set_power_state() debug message 2021-04-01 14:54:43 -05:00
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c PCI: Add support for dev_groups to struct pci_driver 2021-05-19 23:50:27 -04:00
pci-label.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2021-06-03 22:14:47 -05:00
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c PCI/sysfs: Use correct variable for the legacy_mem sysfs object 2021-08-19 10:21:53 -05:00
pci.c pci-v5.14-changes 2021-07-08 12:06:20 -07:00
pci.h Merge branch 'pci/kernel-doc' 2021-07-06 10:56:29 -05:00
probe.c Revert "PCI: Coalesce host bridge contiguous apertures" 2021-07-09 18:51:46 -05:00
proc.c PCI: Fix fall-through warning for Clang 2021-07-13 13:59:12 -05:00
quirks.c PCI: Increase D3 delay for AMD Renoir/Cezanne XHCI 2021-08-19 10:21:53 -05:00
remove.c PCI/sysfs: Convert "reset" to static attribute 2021-04-27 17:53:20 -05:00
rom.c
search.c
setup-bus.c
setup-irq.c
setup-res.c
slot.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2021-06-03 22:14:47 -05:00
syscall.c
vc.c
vpd.c Merge branch 'pci/sysfs' 2021-05-04 10:43:23 -05:00
xen-pcifront.c swiotlb: remove swiotlb_nr_tbl 2021-03-19 04:58:25 +00:00