kernel_samsung_a53x/drivers/xen/xen-pciback
Marek Marczykowski-Górecki f532b36406 xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled
[ Upstream commit 2c269f42d0f382743ab230308b836ffe5ae9b2ae ]

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: 5e29500eba2a ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 11:42:55 +01:00
..
conf_space.c xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2024-11-18 11:42:55 +01:00
conf_space.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
conf_space_capability.c xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2024-11-18 11:42:55 +01:00
conf_space_header.c xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2024-11-18 11:42:55 +01:00
conf_space_quirks.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
conf_space_quirks.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
passthrough.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci_stub.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pciback.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pciback_ops.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vpci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xenbus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00