kernel_optimize_test/drivers/pci
Jeffrey Hugo e744aad0c4 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.

5.10 backport - 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.

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:19:10 +02:00
..
controller PCI: hv: Fix interrupt mapping for multi-MSI 2022-07-29 17:19:10 +02:00
endpoint PCI: endpoint: Fix misused goto label 2022-04-13 21:00:59 +02:00
hotplug PCI: pciehp: Add Qualcomm quirk for Command Completed erratum 2022-04-13 21:00:57 +02:00
pcie PCI/AER: Clear MULTI_ERR_COR/UNCOR_RCV bits 2022-06-09 10:21:17 +02:00
switch
access.c PCI: Reduce warnings on possible RW1C corruption 2022-04-08 14:40:19 +02:00
ats.c
bus.c
ecam.c
host-bridge.c
iov.c
irq.c
Kconfig
Makefile
mmap.c
msi.c PCI/MSI: Fix pci_irq_vector()/pci_irq_get_affinity() 2022-01-27 10:54:06 +01:00
of.c PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing 'ranges' 2021-09-22 12:28:02 +02:00
p2pdma.c PCI/P2PDMA: Avoid pci_get_slot(), which may sleep 2021-07-20 16:05:47 +02:00
pci-acpi.c
pci-bridge-emul.c PCI: pci-bridge-emul: Set PCI_STATUS_CAP_LIST for PCIe device 2022-01-27 10:54:26 +01:00
pci-bridge-emul.h PCI: pci-bridge-emul: Add PCIe Root Capabilities Register 2021-09-26 14:08:55 +02:00
pci-driver.c
pci-label.c PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun 2021-07-20 16:05:50 +02:00
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c
pci.c PCI/PM: Fix bridge_d3_blacklist[] Elo i2 overwrite of Gigabyte X299 2022-06-09 10:21:23 +02:00
pci.h Revert "PCI: Make pci_enable_ptm() private" 2022-06-22 14:13:20 +02:00
probe.c
proc.c
quirks.c PCI: Avoid broken MSI on SB600 USB devices 2022-04-08 14:40:23 +02:00
remove.c
rom.c
search.c
setup-bus.c
setup-irq.c
setup-res.c
slot.c
syscall.c PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure 2021-09-18 13:40:10 +02:00
vc.c
vpd.c
xen-pcifront.c