linux/drivers/xen/xen-pciback
Marek Marczykowski-Górecki 2c269f42d0 xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled
Linux enables MSI-X before disabling INTx, but keeps MSI-X masked until
the table is filled. Then it disables INTx just before clearing MASKALL
bit. Currently this approach is rejected by xen-pciback.
According to the PCIe spec, device cannot use INTx when MSI/MSI-X is
enabled (in other words: enabling MSI/MSI-X implicitly disables INTx).

Change the logic to consider INTx disabled if MSI/MSI-X is enabled. This
applies to three places:
 - checking currently enabled interrupts type,
 - transition to MSI/MSI-X - where INTx would be implicitly disabled,
 - clearing INTx disable bit - which can be allowed even if MSI/MSI-X is
   enabled, as device should consider INTx disabled anyway in that case

Fixes: 5e29500eba ("xen-pciback: Allow setting PCI_MSIX_FLAGS_MASKALL too")
Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20231016131348.1734721-1-marmarek@invisiblethingslab.com
Signed-off-by: Juergen Gross <jgross@suse.com>
2023-10-16 15:20:31 +02:00
..
conf_space_capability.c xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2023-10-16 15:20:31 +02:00
conf_space_header.c xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2023-10-16 15:20:31 +02:00
conf_space_quirks.c xen-pciback: Use dev_printk() when possible 2020-05-27 17:27:37 -05:00
conf_space_quirks.h xen-pciback: Remove unused function declarations 2023-08-21 09:53:22 +02:00
conf_space.c xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2023-10-16 15:20:31 +02:00
conf_space.h xen-pciback: fix INTERRUPT_TYPE_* defines 2020-03-30 17:31:57 +02:00
Makefile xen-pciback: allow compiling on other archs than x86 2021-11-02 08:03:43 -05:00
passthrough.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci_stub.c xen/pciback: don't call pcistub_device_put() under lock 2023-04-24 07:27:10 +02:00
pciback_ops.c xen/pciback: Fix comment typo 2022-08-12 12:19:50 +02:00
pciback.h xen-pciback: Remove unused function declarations 2023-08-21 09:53:22 +02:00
vpci.c xen-pciback: redo VF placement in the virtual topology 2021-05-21 09:55:13 +02:00
xenbus.c xen: make remove callback of xen driver void returned 2022-12-15 16:06:10 +01:00