mint0x33/drivers/pci/host
Jeffrey Hugo 7f7939ead9 PCI: hv: Fix interrupt mapping for multi-MSI
commit a2bad844a67b1c7740bda63e87453baf63c3a7f7 upstream.

According to Dexuan, the hypervisor folks beleive that multi-msi
allocations are not correct.  compose_msi_msg() will allocate multi-msi
one by one.  However, multi-msi is a block of related MSIs, with alignment
requirements.  In order for the hypervisor to allocate properly aligned
and consecutive entries in the IOMMU Interrupt Remapping Table, there
should be a single mapping request that requests all of the multi-msi
vectors in one shot.

Dexuan suggests detecting the multi-msi case and composing a single
request related to the first MSI.  Then for the other MSIs in the same
block, use the cached information.  This appears to be viable, so do it.

4.14 backport - file moved to host/pci-hyperv.c. add hv_msi_get_int_vector
helper function. Fixed merge conflict due to delivery_mode name change
(APIC_DELIVERY_MODE_FIXED is the value given to dest_Fixed). Removed unused
variable in hv_compose_msi_msg. Fixed reference to msi_desc->pci to point
to the same is_msix variable. Removed changes to compose_msi_req_v3 since
it doesn't exist yet. Added "reason" to put_pcichild (unused in function).

Suggested-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1652282599-21643-1-git-send-email-quic_jhugo@quicinc.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Carl Vanderlip <quic_carlv@quicinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-29 17:06:53 +02:00
..
Kconfig
Makefile
pci-aardvark.c PCI: aardvark: Fix reading MSI interrupt number 2022-05-12 12:17:11 +02:00
pci-ftpci100.c
pci-host-common.c
pci-host-generic.c
pci-hyperv.c PCI: hv: Fix interrupt mapping for multi-MSI 2022-07-29 17:06:53 +02:00
pci-mvebu.c
pci-rcar-gen2.c
pci-tegra.c
pci-thunder-ecam.c PCI: thunder: Fix compile testing 2021-05-22 10:57:42 +02:00
pci-thunder-pem.c PCI: thunder: Fix compile testing 2021-05-22 10:57:42 +02:00
pci-versatile.c
pci-xgene-msi.c PCI: xgene-msi: Fix race in installing chained irq handler 2021-03-17 16:34:30 +01:00
pci-xgene.c
pcie-altera-msi.c
pcie-altera.c
pcie-iproc-bcma.c
pcie-iproc-msi.c PCI: iproc: Set affinity mask on MSI interrupts 2020-10-29 09:07:11 +01:00
pcie-iproc-platform.c
pcie-iproc.c PCI: iproc: Fix out-of-bound array accesses 2020-12-29 13:46:56 +01:00
pcie-iproc.h
pcie-mediatek.c PCI: mediatek: Add missing of_node_put() to fix reference leak 2021-03-17 16:34:30 +01:00
pcie-rcar.c
pcie-rockchip.c
pcie-tango.c
pcie-xilinx-nwl.c PCI: xilinx-nwl: Enable the clock through CCF 2021-09-22 11:45:25 +02:00
pcie-xilinx.c
vmd.c irqdomain/treewide: Free firmware node after domain removal 2020-08-21 09:48:16 +02:00