kernel_samsung_a53x/drivers/xen
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
..
events Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-pciback xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2024-11-18 11:42:55 +01:00
xenbus Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xenfs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
acpi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arm-device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
balloon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
biomerge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu_hotplug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dbgp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
evtchn.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
features.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gntalloc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gntdev-common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gntdev-dmabuf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gntdev-dmabuf.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gntdev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
grant-table.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
manage.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcelog.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mem-reservation.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcpu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
platform-pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
privcmd-buf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
privcmd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
privcmd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pvcalls-back.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pvcalls-front.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pvcalls-front.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
swiotlb-xen.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sys-hypervisor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
time.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
unpopulated-alloc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-acpi-cpuhotplug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-acpi-memhotplug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-acpi-pad.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-acpi-processor.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-balloon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-front-pgdir-shbuf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-scsiback.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen-stub.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xlate_mmu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00