* [PATCH 1/2] PCI/P2PDMA: Allow wildcard device IDs in host bridge list
@ 2026-04-09 15:01 Jacob Moroni
2026-04-09 15:01 ` [PATCH 2/2] PCI/P2PDMA: Add Google SoCs to the P2P DMA " Jacob Moroni
2026-04-09 22:47 ` [PATCH 1/2] PCI/P2PDMA: Allow wildcard device IDs in " Logan Gunthorpe
0 siblings, 2 replies; 4+ messages in thread
From: Jacob Moroni @ 2026-04-09 15:01 UTC (permalink / raw)
To: Bjorn Helgaas, Logan Gunthorpe, David Hu
Cc: linux-pci, linux-kernel, Jacob Moroni
Currently, the pci_p2pdma_whitelist array requires an exact match
for both vendor and device ID. Some hardware vendors support cross
bridge p2p across their entire silicon lineup, so add support for
wildcard device IDs to avoid the need to continuously update this
array.
Signed-off-by: Jacob Moroni <jmoroni@google.com>
---
drivers/pci/p2pdma.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index e0f546166..25e9358d0 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -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;
@@ -601,8 +601,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;
--
2.53.0.1213.gd9a14994de-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] PCI/P2PDMA: Add Google SoCs to the P2P DMA host bridge list
2026-04-09 15:01 [PATCH 1/2] PCI/P2PDMA: Allow wildcard device IDs in host bridge list Jacob Moroni
@ 2026-04-09 15:01 ` Jacob Moroni
2026-04-09 22:47 ` Logan Gunthorpe
2026-04-09 22:47 ` [PATCH 1/2] PCI/P2PDMA: Allow wildcard device IDs in " Logan Gunthorpe
1 sibling, 1 reply; 4+ messages in thread
From: Jacob Moroni @ 2026-04-09 15:01 UTC (permalink / raw)
To: Bjorn Helgaas, Logan Gunthorpe, David Hu
Cc: linux-pci, linux-kernel, Jacob Moroni
All Google SoCs support p2p between root ports, so add a wildcard
rule to the host bridge list.
Tested-by: David Hu <xuehaohu@google.com>
Signed-off-by: Jacob Moroni <jmoroni@google.com>
---
drivers/pci/p2pdma.c | 2 ++
include/linux/pci_ids.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index 25e9358d0..7c898542a 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -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},
{}
};
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 406abf629..24cb42f66 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -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
--
2.53.0.1213.gd9a14994de-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] PCI/P2PDMA: Allow wildcard device IDs in host bridge list
2026-04-09 15:01 [PATCH 1/2] PCI/P2PDMA: Allow wildcard device IDs in host bridge list Jacob Moroni
2026-04-09 15:01 ` [PATCH 2/2] PCI/P2PDMA: Add Google SoCs to the P2P DMA " Jacob Moroni
@ 2026-04-09 22:47 ` Logan Gunthorpe
1 sibling, 0 replies; 4+ messages in thread
From: Logan Gunthorpe @ 2026-04-09 22:47 UTC (permalink / raw)
To: Jacob Moroni, Bjorn Helgaas, David Hu; +Cc: linux-pci, linux-kernel
On 2026-04-09 9:01 a.m., Jacob Moroni wrote:
> Currently, the pci_p2pdma_whitelist array requires an exact match
> for both vendor and device ID. Some hardware vendors support cross
> bridge p2p across their entire silicon lineup, so add support for
> wildcard device IDs to avoid the need to continuously update this
> array.
>
> Signed-off-by: Jacob Moroni <jmoroni@google.com>
This looks good to me thanks!
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] PCI/P2PDMA: Add Google SoCs to the P2P DMA host bridge list
2026-04-09 15:01 ` [PATCH 2/2] PCI/P2PDMA: Add Google SoCs to the P2P DMA " Jacob Moroni
@ 2026-04-09 22:47 ` Logan Gunthorpe
0 siblings, 0 replies; 4+ messages in thread
From: Logan Gunthorpe @ 2026-04-09 22:47 UTC (permalink / raw)
To: Jacob Moroni, Bjorn Helgaas, David Hu; +Cc: linux-pci, linux-kernel
On 2026-04-09 9:01 a.m., Jacob Moroni wrote:
> All Google SoCs support p2p between root ports, so add a wildcard
> rule to the host bridge list.
>
> Tested-by: David Hu <xuehaohu@google.com>
> Signed-off-by: Jacob Moroni <jmoroni@google.com>
Looks good.
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-09 23:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-09 15:01 [PATCH 1/2] PCI/P2PDMA: Allow wildcard device IDs in host bridge list Jacob Moroni
2026-04-09 15:01 ` [PATCH 2/2] PCI/P2PDMA: Add Google SoCs to the P2P DMA " Jacob Moroni
2026-04-09 22:47 ` Logan Gunthorpe
2026-04-09 22:47 ` [PATCH 1/2] PCI/P2PDMA: Allow wildcard device IDs in " Logan Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox