anolis-cloud-kernel/drivers/pci
Vidya Sagar cb85aee82d PCI/MSI: Set device flag indicating only 32-bit MSI support
ANBZ: #23086

commit 2053230af1 upstream.

The MSI-X Capability requires devices to support 64-bit Message Addresses,
but the MSI Capability can support either 32- or 64-bit addresses.

Previously, we set dev->no_64bit_msi for a few broken devices that
advertise 64-bit MSI support but don't correctly support it.

In addition, check the MSI "64-bit Address Capable" bit for all devices and
set dev->no_64bit_msi for devices that don't advertise 64-bit support.
This allows msi_verify_entries() to catch arch code defects that assign
64-bit addresses when they're not supported.

The warning is helpful to find defects like the one fixed by
https://lore.kernel.org/r/20201117165312.25847-1-vidyas@nvidia.com

[bhelgaas: set no_64bit_msi in pci_msi_init(), commit log]
Link: https://lore.kernel.org/r/20201124105035.24573-1-vidyas@nvidia.com
Link: https://lore.kernel.org/r/20201203185110.1583077-4-helgaas@kernel.org
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: wangkaiyuan <wangkaiyuan@inspur.com>
Reviewed-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/5556
2025-07-29 16:46:59 +08:00
..
controller anolis: sw64: ioremap: map some IO space with ioremap 2025-06-05 06:59:14 +00:00
endpoint PCI: endpoint: pci-epf-test: Make use of cached 'epc_features' in pci_epf_test_core_init() 2025-03-31 02:18:07 +00:00
hotplug anolis: sw64: pci: fix secondary bus reset issue 2025-06-05 06:59:14 +00:00
iohub-sriov anolis: iohub_sriov: Add NVMe and eRDMA device id for xdragon platform 2024-08-06 11:00:04 +00:00
pcie anolis: PCI/portdrv: Change the 100ms wait to 1000 ms wait to comply with PCIE spec 2025-02-17 18:04:39 +08:00
switch PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2022-08-02 16:27:37 +08:00
Kconfig ck: pci/iohub-sriov: Support for Alibaba PCIe IOHub SRIOV 2022-08-01 11:01:45 +00:00
Makefile PCI/MSI: Move MSI/MSI-X init to msi.c 2025-07-29 16:46:51 +08:00
access.c PCI: Move pci_clear_and_set_dword() helper to PCI header 2024-12-03 05:41:21 +00:00
ats.c
bus.c
ecam.c anolis: sw64: ioremap: fix an overflow in pci_remap_cfgspace 2025-06-05 06:59:14 +00:00
host-bridge.c
iov.c PCI/IOV: Add pci_iov_get_pf_drvdata() to allow VF reaching the drvdata of a PF 2024-11-12 13:28:27 +00:00
irq.c PCI: Check for alloc failure in pci_request_irq() 2024-08-13 09:45:24 +00:00
mmap.c
msi.c PCI/MSI: Set device flag indicating only 32-bit MSI support 2025-07-29 16:46:59 +08: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 anolis: PCI/P2PDMA: Add Zhaoxin Zhaoxin bridges to the whitelist 2025-06-13 07:25:58 +00:00
pci-acpi.c PCI/sysfs: Protect driver's D3cold preference from user space 2024-08-13 09:45:24 +00:00
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: Add 'override_only' field to struct pci_device_id 2024-11-12 13:28:27 +00:00
pci-label.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2022-08-02 16:27:37 +08:00
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c PCI/sysfs: Protect driver's D3cold preference from user space 2024-08-13 09:45:24 +00:00
pci.c anolis: phytium: pswiotlb: Add PSWIOTLB mechanism to improve DMA performance 2025-06-16 07:11:40 +00:00
pci.h PCI/MSI: Move MSI/MSI-X flags updaters to msi.c 2025-07-29 16:46:55 +08:00
probe.c PCI/MSI: Move MSI/MSI-X init to msi.c 2025-07-29 16:46:51 +08:00
proc.c anolis: PCI: optimize proc sequential file read 2024-10-15 03:57:47 +00:00
quirks.c anolis: PCI: Supplement ACS quirk for more Zhaoxin Root Ports 2025-06-13 07:22:43 +00:00
remove.c anolis: PCI: optimize proc sequential file read 2024-10-15 03:57:47 +00:00
rom.c
search.c
setup-bus.c PCI: Use downstream bridges for distributing resources 2025-05-27 08:00:09 +00:00
setup-irq.c
setup-res.c PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge 2024-08-13 09:45:24 +00:00
slot.c PCI: Fix use-after-free of slot->bus on hot remove 2025-03-25 14:09:29 +08:00
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