linux-stable/drivers/pci
Jeffrey Hugo 7f7939ead9 PCI: hv: Fix interrupt mapping for multi-MSI
commit a2bad844a6 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
..
dwc PCI: qcom: Fix unbalanced PHY init on probe errors 2022-06-14 16:54:02 +02:00
endpoint
host PCI: hv: Fix interrupt mapping for multi-MSI 2022-07-29 17:06:53 +02:00
hotplug PCI: pciehp: Clear cmd_busy bit in polling mode 2022-04-20 09:08:12 +02:00
pcie
switch
access.c PCI: Reduce warnings on possible RW1C corruption 2022-04-20 09:08:18 +02:00
ats.c
bus.c PCI: Add device even if driver attach failed 2020-12-02 08:34:39 +01:00
ecam.c
host-bridge.c
hotplug-pci.c
htirq.c
iov.c
irq.c
Kconfig
Makefile
mmap.c
msi.c PCI/MSI: Mask MSI-X vectors only on success 2021-12-22 09:18:00 +01:00
of.c
pci-acpi.c PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup() 2020-12-29 13:47:04 +01:00
pci-driver.c
pci-label.c PCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun 2021-07-20 16:17:53 +02:00
pci-mid.c
pci-stub.c
pci-sysfs.c
pci.c PCI: Avoid pci_dev_lock() AB/BA deadlock with sriov_numvfs_store() 2022-06-14 16:53:47 +02:00
pci.h PCI: thunder: Fix compile testing 2021-05-22 10:57:42 +02:00
probe.c PCI: Release OF node in pci_scan_device()'s error path 2021-05-22 10:57:38 +02:00
proc.c
quirks.c PCI: Add function 1 DMA alias quirk for Marvell 88SE9125 SATA controller 2022-01-27 09:00:48 +01:00
remove.c
rom.c
search.c
setup-bus.c
setup-irq.c
setup-res.c
slot.c PCI: Fix pci_slot_release() NULL pointer dereference 2020-12-29 13:47:11 +01:00
syscall.c PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure 2021-09-22 11:45:25 +02:00
vc.c
vpd.c
xen-pcifront.c