Merge branch 'pci/p2pdma'

- Allow wildcards in list of host bridges that support peer-to-peer DMA
  between hierarchy domains and add all Google SoCs (Jacob Moroni)

* pci/p2pdma:
  PCI/P2PDMA: Add Google SoCs to the P2P DMA host bridge list
  PCI/P2PDMA: Allow wildcard Device IDs in host bridge list
This commit is contained in:
Bjorn Helgaas
2026-04-13 12:50:03 -05:00
2 changed files with 10 additions and 2 deletions

View File

@@ -530,7 +530,7 @@ static bool cpu_supports_p2pdma(void)
static const struct pci_p2pdma_whitelist_entry {
unsigned short vendor;
unsigned short device;
int device;
enum {
REQ_SAME_HOST_BRIDGE = 1 << 0,
} flags;
@@ -548,6 +548,8 @@ static const struct pci_p2pdma_whitelist_entry {
{PCI_VENDOR_ID_INTEL, 0x2033, 0},
{PCI_VENDOR_ID_INTEL, 0x2020, 0},
{PCI_VENDOR_ID_INTEL, 0x09a2, 0},
/* Google SoCs. */
{PCI_VENDOR_ID_GOOGLE, PCI_ANY_ID, 0},
{}
};
@@ -601,8 +603,12 @@ static bool __host_bridge_whitelist(struct pci_host_bridge *host,
device = root->device;
for (entry = pci_p2pdma_whitelist; entry->vendor; entry++) {
if (vendor != entry->vendor || device != entry->device)
if (vendor != entry->vendor)
continue;
if (entry->device != PCI_ANY_ID && device != entry->device)
continue;
if (entry->flags & REQ_SAME_HOST_BRIDGE && !same_host_bridge)
return false;

View File

@@ -2586,6 +2586,8 @@
#define PCI_VENDOR_ID_AZWAVE 0x1a3b
#define PCI_VENDOR_ID_GOOGLE 0x1ae0
#define PCI_VENDOR_ID_REDHAT_QUMRANET 0x1af4
#define PCI_SUBVENDOR_ID_REDHAT_QUMRANET 0x1af4
#define PCI_SUBDEVICE_ID_QEMU 0x1100