PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs
Subsystems (5)
v4 cover PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs
VMware and Hyper-V expose passthrough devices to guest VMs without an explicit host bridge device. Consequently, host_bridge_whitelist() cannot automatically identify the underlying host bridge structure, causing Peer-to-Peer DMA (P2PDMA) requests to be rejected unless the device IDs are explicitly listed in pci_p2pdma_whitelist[]. To enable P2PDMA on Intel hosts, this series extends cpu_supports_p2pdma(), which so far covers AMD Zen and newer, with an explicit list of Intel Xeon server generations.
Patch 1 moves the CONFIG_X86 #ifdef out of cpu_supports_p2pdma(). Patch 2 is the v3 patch rebased on it, with Logan's Reviewed-by carried over; the Xeon list and the check are unchanged.
Changes in v4:
- Add 1/2, moving the CONFIG_X86 #ifdef out of cpu_supports_p2pdma() (Logan Gunthorpe, Leon Romanovsky)
- Keep the #ifdef around the asm/ includes, as these headers exist only on x86 (Bjorn Helgaas)
Changes in v3:
- Drop the hypervisor check and move the Xeon list into cpu_supports_p2pdma(), next to the AMD check, as suggested by Logan Gunthorpe and Leon Romanovsky [1]
- Fold the VMware and Hyper-V patches into one, as the check no longer depends on the hypervisor
Changes in v2:
- Replace the Skylake-and-newer threshold with an explicit list of Intel Xeon server generations, from Skylake-SP to Diamond Rapids (Logan Gunthorpe)
- Move the CONFIG_X86 #ifdef out of hypervisor_supports_p2pdma() (Logan Gunthorpe)
- Rebased on current mainline
[1] https://lore.kernel.org/r/20261016153147.GC219304@unreal
v3: https://lore.kernel.org/r/[email protected]
v2: https://lore.kernel.org/r/[email protected]
v1: https://lore.kernel.org/r/[email protected]
Pavel Popov (2):
PCI/P2PDMA: Move CONFIG_X86 #ifdef out of cpu_supports_p2pdma() PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs
drivers/pci/p2pdma.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)
base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
Signature · 1 line
2.53.0
PATCH v4 1/2 PCI/P2PDMA: Move CONFIG_X86 #ifdef out of cpu_supports_p2pdma()
cpu_supports_p2pdma() has an #ifdef CONFIG_X86 block inside the function body. Put the whole function under #ifdef CONFIG_X86 instead, with a stub returning false for !CONFIG_X86.
No functional change.
--- drivers/pci/p2pdma.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/pci/p2pdma.c +7 -2
@@ -519,18 +519,23 @@ static void seq_buf_print_bus_devfn(struct seq_buf *buf, struct pci_dev *pdev)seq_buf_printf (buf,"%s;" ,pci_name (pdev)); } +#ifdef CONFIG_X86 static bool cpu_supports_p2pdma (void ) { -#ifdef CONFIG_X86 struct cpuinfo_x86 *c = &cpu_data (0 );/* Any AMD CPU whose family ID is Zen or newer supports p2pdma */ if (c->x86_vendor ==X86_VENDOR_AMD && c->x86 >=0x17 )return true; -#endif return false; } +#else /* !CONFIG_X86 */ +static bool cpu_supports_p2pdma (void ) +{ +return false; +} +#endif /* CONFIG_X86 */ static const struct pci_p2pdma_whitelist_entry { unsigned short vendor;
Signature · 1 line
2.53.0
[email protected]
AI reviewRe: [PATCH v4 1/2] PCI/P2PDMA: Move CONFIG_X86 #ifdef out of cpu_supports_p2pdma()
Sashiko has reviewed this patch and found no issues.
Quoted 8 lines
cpu_supports_p2pdma()has an #ifdefCONFIG_X86block inside the function body. Put the whole function under #ifdefCONFIG_X86instead, with a stub returning false for !CONFIG_X86.No functional change.
Suggested-by Logan Gunthorpe <[email protected]>Signed-off-by Pavel Popov <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
PATCH v4 2/2 PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs
In reply to Pavel PopovPeer-to-Peer DMA (P2PDMA) between two devices requires either a shared upstream bridge or a host bridge matching pci_p2pdma_whitelist[]. In VMware guests, passthrough devices appear directly on virtual root buses without host bridge devices. In Hyper-V guests, each passthrough device appears in a PCI domain of its own without a host bridge device. Consequently, P2PDMA checks evaluate endpoint Device IDs against the host bridge whitelist, causing P2PDMA requests to fail regardless of host support.
This affects discrete devices such as GPUs, NICs and NVMe drives.
Add an explicit list of the Intel Xeon server generations from Skylake-SP to Diamond Rapids to cpu_supports_p2pdma(). These are the CPUs whose host bridges are in pci_p2pdma_whitelist[] without restrictions. AMD Zen and newer are already covered by cpu_supports_p2pdma(), so only Intel entries are needed.
Tested with the Intel Level Zero P2P benchmark (ze_peer) on Arc Pro B60 cards in a Linux guest on VMware ESXi 9.0 (Emerald Rapids host).
--- drivers/pci/p2pdma.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
drivers/pci/p2pdma.c +24 -0
@@ -21,6 +21,11 @@#include <linux/seq_buf.h> #include <linux/xarray.h> +#ifdef CONFIG_X86 +#include <asm/cpu_device_id.h> +#include <asm/intel-family.h> +#endif +struct pci_p2pdma {struct gen_pool *pool;bool p2pmem_published;
@@ -520,6 +525,21 @@ static void seq_buf_print_bus_devfn(struct seq_buf *buf, struct pci_dev *pdev) }#ifdef CONFIG_X86 +/* Intel Xeon CPUs whose host bridges support p2pdma */ +static const struct x86_cpu_id p2pdma_intel_cpu_ids[] = { +X86_MATCH_VFM (INTEL_SKYLAKE_X ,NULL ), +X86_MATCH_VFM (INTEL_ICELAKE_X ,NULL ), +X86_MATCH_VFM (INTEL_ICELAKE_D ,NULL ), +X86_MATCH_VFM (INTEL_SAPPHIRERAPIDS_X ,NULL ), +X86_MATCH_VFM (INTEL_EMERALDRAPIDS_X ,NULL ), +X86_MATCH_VFM (INTEL_GRANITERAPIDS_X ,NULL ), +X86_MATCH_VFM (INTEL_GRANITERAPIDS_D ,NULL ), +X86_MATCH_VFM (INTEL_ATOM_CRESTMONT_X ,NULL ), +X86_MATCH_VFM (INTEL_ATOM_DARKMONT_X ,NULL ), +X86_MATCH_VFM (INTEL_DIAMONDRAPIDS_X ,NULL ), + {} +}; +static bool cpu_supports_p2pdma (void ) {struct cpuinfo_x86 *c = &cpu_data (0 );
@@ -528,6 +548,10 @@ static bool cpu_supports_p2pdma(void)if (c->x86_vendor ==X86_VENDOR_AMD && c->x86 >=0x17 )return true; +/* Listed Intel Xeon CPUs support p2pdma */ +if (x86_match_cpu (p2pdma_intel_cpu_ids)) +return true; + return false; }#else /* !CONFIG_X86 */
Signature · 1 line
2.53.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 17 lines
Peer-to-Peer DMA (P2PDMA) between two devices requires either a shared upstream bridge or a host bridge matching pci_p2pdma_whitelist[]. In VMware guests, passthrough devices appear directly on virtual root buses without host bridge devices. In Hyper-V guests, each passthrough device appears in a PCI domain of its own without a host bridge device. Consequently, P2PDMA checks evaluate endpoint Device IDs against the host bridge whitelist, causing P2PDMA requests to fail regardless of host support.
This affects discrete devices such as GPUs, NICs and NVMe drives.
Add an explicit list of the Intel Xeon server generations from Skylake-SP to Diamond Rapids to
cpu_supports_p2pdma(). These are the CPUs whose host bridges are in pci_p2pdma_whitelist[] without restrictions. AMD Zen and newer are already covered bycpu_supports_p2pdma(), so only Intel entries are needed.
Quoted 4 lines
Tested with the Intel Level Zero P2P benchmark (
ze_peer) on Arc Pro B60 cards in a Linux guest on VMware ESXi 9.0 (Emerald Rapids host).Signed-off-by Pavel Popov <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Quoted 13 lines · Pavel Popov
VMware and Hyper-V expose passthrough devices to guest VMs without an explicit host bridge device. Consequently,
host_bridge_whitelist()cannot automatically identify the underlying host bridge structure, causing Peer-to-Peer DMA (P2PDMA) requests to be rejected unless the device IDs are explicitly listed in pci_p2pdma_whitelist[]. To enable P2PDMA on Intel hosts, this series extendscpu_supports_p2pdma(), which so far covers AMD Zen and newer, with an explicit list of Intel Xeon server generations.Patch 1 moves the
CONFIG_X86#ifdef out ofcpu_supports_p2pdma(). Patch 2 is the v3 patch rebased on it, with Logan's Reviewed-by carried over; the Xeon list and the check are unchanged.
Quoted 5 lines
Changes in v4:
- Add 1/2, moving theCONFIG_X86#ifdef out ofcpu_supports_p2pdma()(Logan Gunthorpe, Leon Romanovsky)
- Keep the #ifdef around the asm/ includes, as these headers exist only on x86 (Bjorn Helgaas)
I'm confident that this is wrong usage of asm headers.
Thanks
Leon,
The #ifdef CONFIG_X86 in cpu_supports_p2pdma() came with the AMD check.
Would it work for you if I move the includes into that single #ifdef block, next to the CPU check? Some multi-arch code does the same:
https://git.kernel.org/torvalds/c/c7be64355fcc (drivers/acpi/mipi-disco-img.c)
https://git.kernel.org/torvalds/c/7f3cfb7943d2 (drivers/cpufreq/cpufreq_ondemand.h)
Thanks,
Pavel
Quoted 39 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Tuesday, October 20, 2026 11:40 AM
To: Popov, Pavel E <[email protected]>
Cc: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu Rugina <[email protected]>; Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsQuoted 13 lines · Pavel Popov
VMware and Hyper-V expose passthrough devices to guest VMs without an explicit host bridge device. Consequently,
host_bridge_whitelist()cannot automatically identify the underlying host bridge structure, causing Peer-to-Peer DMA (P2PDMA) requests to be rejected unless the device IDs are explicitly listed in pci_p2pdma_whitelist[]. To enable P2PDMA on Intel hosts, this series extendscpu_supports_p2pdma(), which so far covers AMD Zen and newer, with an explicit list of Intel Xeon server generations.Patch 1 moves the
CONFIG_X86#ifdef out ofcpu_supports_p2pdma(). Patch 2 is the v3 patch rebased on it, with Logan's Reviewed-by carried over; the Xeon list and the check are unchanged.Quoted 5 lines
Changes in v4:
- Add 1/2, moving theCONFIG_X86#ifdef out ofcpu_supports_p2pdma()(Logan Gunthorpe, Leon Romanovsky)
- Keep the #ifdef around the asm/ includes, as these headers exist only on x86 (Bjorn Helgaas)I'm confident that this is wrong usage of asm headers.
Thanks
Quoted 3 lines · Pavel E
Leon,
The #ifdef
CONFIG_X86incpu_supports_p2pdma()came with the AMD check.
This is due to poking at struct cpuinfo_x86, which is not ideal but understandable.
Quoted 6 lines
Would it work for you if I move the includes into that single #ifdef block, next to the CPU check? Some multi-arch code does the same:
https://git.kernel.org/torvalds/c/c7be64355fcc (
drivers/acpi/mipi-disco-img.c)
https://git.kernel.org/torvalds/c/7f3cfb7943d2 (drivers/cpufreq/cpufreq_ondemand.h)
Once the header files are properly exposed, clean up these other areas as well.
Thanks
Quoted 43 lines
Thanks,
PavelQuoted 39 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Tuesday, October 20, 2026 11:40 AM
To: Popov, Pavel E <[email protected]>
Cc: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu Rugina <[email protected]>; Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsQuoted 13 lines · Pavel Popov
VMware and Hyper-V expose passthrough devices to guest VMs without an explicit host bridge device. Consequently,
host_bridge_whitelist()cannot automatically identify the underlying host bridge structure, causing Peer-to-Peer DMA (P2PDMA) requests to be rejected unless the device IDs are explicitly listed in pci_p2pdma_whitelist[]. To enable P2PDMA on Intel hosts, this series extendscpu_supports_p2pdma(), which so far covers AMD Zen and newer, with an explicit list of Intel Xeon server generations.Patch 1 moves the
CONFIG_X86#ifdef out ofcpu_supports_p2pdma(). Patch 2 is the v3 patch rebased on it, with Logan's Reviewed-by carried over; the Xeon list and the check are unchanged.Quoted 5 lines
Changes in v4:
- Add 1/2, moving theCONFIG_X86#ifdef out ofcpu_supports_p2pdma()(Logan Gunthorpe, Leon Romanovsky)
- Keep the #ifdef around the asm/ includes, as these headers exist only on x86 (Bjorn Helgaas)I'm confident that this is wrong usage of asm headers.
Thanks
Quoted 2 lines
Once the header files are properly exposed, clean up these other areas as well.
Agreed, that would be a separate change, for the x86 maintainers to decide.
Thanks
Quoted 84 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Wednesday, October 21, 2026 12:35 AM
To: Popov, Pavel E <[email protected]>
Cc: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu Rugina <[email protected]>; Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsQuoted 3 lines · Pavel E
Leon,
The #ifdef
CONFIG_X86incpu_supports_p2pdma()came with the AMDcheck.
This is due to poking at
struct cpuinfo_x86, which is not ideal but understandable.Quoted 5 lines
Would it work for you if I move the includes into that single #ifdef block, next to the CPU check? Some multi-arch code does the same:
https://git.kernel.org/torvalds/c/c7be64355fcc (
drivers/acpi/mipi-disco-
img.c)Quoted 2 lines
https://git.kernel.org/torvalds/c/7f3cfb7943d2
(drivers/cpufreq/cpufreq_ondemand.h)Once the header files are properly exposed, clean up these other areas as well.
Thanks
Quoted 11 lines
Thanks,
PavelQuoted 7 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Tuesday, October 20, 2026 11:40 AM
To: Popov, Pavel E <[email protected]>
Cc: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu RuginaQuoted 10 lines
Quoted 10 lines
Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsOn Tue, Oct 20, 2026 at 10:37:34AM -0700, Pavel Popov wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
VMware and Hyper-V expose passthrough devices to guest VMs without an explicit host bridge device. Consequently,
host_bridge_whitelist()cannot automatically identify the underlying host bridge structure, causing Peer-to-Peer DMA (P2PDMA) requests to be rejected unless the device IDs are explicitly listed in pci_p2pdma_whitelist[]. To enable P2PDMA on Intel hosts, this series extendscpu_supports_p2pdma(), which so far covers AMD Zen and newer, with an explicit list of Intel Xeon servergenerations.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Patch 1 moves the
CONFIG_X86#ifdef out ofcpu_supports_p2pdma(). Patch 2 is the v3 patch rebased on it, with Logan's Reviewed-by carried over; the Xeon list and the check are unchanged.Changes in v4:
- Add 1/2, moving theCONFIG_X86#ifdef out of
cpu_supports_p2pdma()Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
(Logan Gunthorpe, Leon Romanovsky)
- Keep the #ifdef around the asm/ includes, as these headers exist only on x86 (Bjorn Helgaas)I'm confident that this is wrong usage of asm headers.
Thanks
Hi Bjorn,
Gentle ping on this series. Is this OK for v7.5?
Thanks,
Pavel
Quoted 70 lines
-----Original Message-----
From: Popov, Pavel E <[email protected]>
Sent: Tuesday, October 20, 2026 10:38 AM
To: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>
Cc: Popov, Pavel E <[email protected]>; Leon Romanovsky <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu Rugina <[email protected]>; Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsVMware and Hyper-V expose passthrough devices to guest VMs without an explicit host bridge device. Consequently,
host_bridge_whitelist()cannot automatically identify the underlying host bridge structure, causing Peer-to- Peer DMA (P2PDMA) requests to be rejected unless the device IDs are explicitly listed in pci_p2pdma_whitelist[]. To enable P2PDMA on Intel hosts, this series extendscpu_supports_p2pdma(), which so far covers AMD Zen and newer, with an explicit list of Intel Xeon server generations.Patch 1 moves the
CONFIG_X86#ifdef out ofcpu_supports_p2pdma(). Patch 2 is the v3 patch rebased on it, with Logan's Reviewed-by carried over; the Xeon list and the check are unchanged.Changes in v4:
- Add 1/2, moving theCONFIG_X86#ifdef out ofcpu_supports_p2pdma()(Logan Gunthorpe, Leon Romanovsky)
- Keep the #ifdef around the asm/ includes, as these headers exist only on x86 (Bjorn Helgaas)Changes in v3:
- Drop the hypervisor check and move the Xeon list intocpu_supports_p2pdma(), next to the AMD check, as suggested by Logan Gunthorpe and Leon Romanovsky [1]
- Fold the VMware and Hyper-V patches into one, as the check no longer depends on the hypervisorChanges in v2:
- Replace the Skylake-and-newer threshold with an explicit list of Intel Xeon server generations, from Skylake-SP to Diamond Rapids (Logan Gunthorpe)
- Move theCONFIG_X86#ifdef out ofhypervisor_supports_p2pdma()(Logan Gunthorpe)
- Rebased on current mainline[1] https://lore.kernel.org/r/20261016153147.GC219304@unreal
v3: https://lore.kernel.org/r/20261020151305.65218-1-
[email protected]
v2: https://lore.kernel.org/r/20261016223402.19991-1-
[email protected]
v1: https://lore.kernel.org/r/20261009154034.82321-1-
[email protected]Pavel Popov (2):
PCI/P2PDMA: MoveCONFIG_X86#ifdef out ofcpu_supports_p2pdma()PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsdrivers/pci/p2pdma.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)base-commit:
c03c1a14507dfaf8b856c2608f9ac216021fc222--
2.53.0
Quoted 3 lines · Pavel E
Hi Bjorn,
Gentle ping on this series. Is this OK for v7.5?
I would say no. An Intel employee was asked to clean up an Intel-created mess while upstreaming an Intel-specific patch.
Peer-to-peer is a general concept, and the code should reflect that. It is reasonable to expect you to join the effort and help clean it up.
Thanks
Quoted 75 lines
Thanks,
PavelQuoted 70 lines
-----Original Message-----
From: Popov, Pavel E <[email protected]>
Sent: Tuesday, October 20, 2026 10:38 AM
To: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>
Cc: Popov, Pavel E <[email protected]>; Leon Romanovsky <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu Rugina <[email protected]>; Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsVMware and Hyper-V expose passthrough devices to guest VMs without an explicit host bridge device. Consequently,
host_bridge_whitelist()cannot automatically identify the underlying host bridge structure, causing Peer-to- Peer DMA (P2PDMA) requests to be rejected unless the device IDs are explicitly listed in pci_p2pdma_whitelist[]. To enable P2PDMA on Intel hosts, this series extendscpu_supports_p2pdma(), which so far covers AMD Zen and newer, with an explicit list of Intel Xeon server generations.Patch 1 moves the
CONFIG_X86#ifdef out ofcpu_supports_p2pdma(). Patch 2 is the v3 patch rebased on it, with Logan's Reviewed-by carried over; the Xeon list and the check are unchanged.Changes in v4:
- Add 1/2, moving theCONFIG_X86#ifdef out ofcpu_supports_p2pdma()(Logan Gunthorpe, Leon Romanovsky)
- Keep the #ifdef around the asm/ includes, as these headers exist only on x86 (Bjorn Helgaas)Changes in v3:
- Drop the hypervisor check and move the Xeon list intocpu_supports_p2pdma(), next to the AMD check, as suggested by Logan Gunthorpe and Leon Romanovsky [1]
- Fold the VMware and Hyper-V patches into one, as the check no longer depends on the hypervisorChanges in v2:
- Replace the Skylake-and-newer threshold with an explicit list of Intel Xeon server generations, from Skylake-SP to Diamond Rapids (Logan Gunthorpe)
- Move theCONFIG_X86#ifdef out ofhypervisor_supports_p2pdma()(Logan Gunthorpe)
- Rebased on current mainline[1] https://lore.kernel.org/r/20261016153147.GC219304@unreal
v3: https://lore.kernel.org/r/20261020151305.65218-1-
[email protected]
v2: https://lore.kernel.org/r/20261016223402.19991-1-
[email protected]
v1: https://lore.kernel.org/r/20261009154034.82321-1-
[email protected]Pavel Popov (2):
PCI/P2PDMA: MoveCONFIG_X86#ifdef out ofcpu_supports_p2pdma()PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsdrivers/pci/p2pdma.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)base-commit:
c03c1a14507dfaf8b856c2608f9ac216021fc222--
2.53.0
Quoted 2 lines · Leon Romanovsky
Peer-to-peer is a general concept, and the code should reflect that. It is reasonable to expect you to join the effort and help clean it up.
I'm in. My proposal is to do it after this series, since this one unblocks P2PDMA in guests and the cleanup is out of PCI scope: even the minimal fix for p2pdma.c alone means changes under arch/x86, so it would no longer be a P2PDMA patch but an x86 header series with its own maintainers and review. That x86 header series is also the right place to drop the same guard from six other files, and I'm ready to do it:
drivers/acpi/mipi-disco-img.c
drivers/cpufreq/cpufreq_ondemand.h
drivers/gpu/drm/i915/intel_cpu_info.c
drivers/char/tpm/tpm.h
drivers/crypto/ccp/ccp-dev.c
include/linux/platform_data/x86/soc.h
Bjorn, is v4 OK for v7.5 as is? The x86 header series will follow on top.
Thanks,
Pavel
Quoted 106 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Wednesday, November 11, 2026 1:11 AM
To: Popov, Pavel E <[email protected]>
Cc: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu Rugina <[email protected]>; Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsQuoted 3 lines · Pavel E
Hi Bjorn,
Gentle ping on this series. Is this OK for v7.5?
I would say no. An Intel employee was asked to clean up an Intel-created mess while upstreaming an Intel-specific patch.
Peer-to-peer is a general concept, and the code should reflect that. It is reasonable to expect you to join the effort and help clean it up.
Thanks
Quoted 12 lines
Thanks,
PavelQuoted 8 lines
-----Original Message-----
From: Popov, Pavel E <[email protected]>
Sent: Tuesday, October 20, 2026 10:38 AM
To: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>
Cc: Popov, Pavel E <[email protected]>; Leon Romanovsky <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu RuginaQuoted 9 lines
Quoted 9 lines
Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsQuoted 7 lines
Quoted 7 lines
VMware and Hyper-V expose passthrough devices to guest VMs without an explicit host bridge device. Consequently,
host_bridge_whitelist()cannot automatically identify the underlying host bridge structure, causing Peer-to- Peer DMA (P2PDMA) requests to be rejected unless the device IDs are explicitly listed in pci_p2pdma_whitelist[]. To enable P2PDMA on Intel hosts, this series extendscpu_supports_p2pdma(), which so far covers AMD Zen andnewer, with an explicit list of Intel Xeon server generations.
Quoted 47 lines
Quoted 46 lines
Patch 1 moves the
CONFIG_X86#ifdef out ofcpu_supports_p2pdma(). Patch 2 is the v3 patch rebased on it, with Logan's Reviewed-by carried over; the Xeon list and the check are unchanged.Changes in v4:
- Add 1/2, moving theCONFIG_X86#ifdef out ofcpu_supports_p2pdma()(Logan Gunthorpe, Leon Romanovsky)
- Keep the #ifdef around the asm/ includes, as these headers exist only on x86 (Bjorn Helgaas)Changes in v3:
- Drop the hypervisor check and move the Xeon list intocpu_supports_p2pdma(), next to the AMD check, as suggested by Logan Gunthorpe and Leon Romanovsky [1]
- Fold the VMware and Hyper-V patches into one, as the check no longer depends on the hypervisorChanges in v2:
- Replace the Skylake-and-newer threshold with an explicit list of Intel Xeon server generations, from Skylake-SP to Diamond Rapids (Logan Gunthorpe)
- Move theCONFIG_X86#ifdef out ofhypervisor_supports_p2pdma()(Logan Gunthorpe)
- Rebased on current mainline[1] https://lore.kernel.org/r/20261016153147.GC219304@unreal
v3: https://lore.kernel.org/r/20261020151305.65218-1-
[email protected]
v2: https://lore.kernel.org/r/20261016223402.19991-1-
[email protected]
v1: https://lore.kernel.org/r/20261009154034.82321-1-
[email protected]Pavel Popov (2):
PCI/P2PDMA: MoveCONFIG_X86#ifdef out ofcpu_supports_p2pdma()PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsdrivers/pci/p2pdma.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)base-commit:
c03c1a14507dfaf8b856c2608f9ac216021fc222--
2.53.0
Quoted 11 lines · Pavel E
Quoted 2 lines · Leon Romanovsky
Peer-to-peer is a general concept, and the code should reflect that. It is reasonable to expect you to join the effort and help clean it up.
I'm in. My proposal is to do it after this series, since this one unblocks P2PDMA in guests and the cleanup is out of PCI scope: even the minimal fix for
p2pdma.calone means changes underarch/x86, so it would no longer be a P2PDMA patch but an x86 header series with its own maintainers and review. That x86 header series is also the right place to drop the same guard from six other files, and I'm ready to do it:
If you are ready, why hasn't it been done until now?
The claims of urgency are hard to take seriously: SKYLAKE_X was added to arch/x86/include/asm/intel-family.h in 2016, and now, ten years later, you are asking us to "do it urgently." I strongly suspect that if I don't bring up P2P at LPC, we won't see this patch for another ten years.
Even now, despite being asked to clean this up before the merge window, you still haven't done so. Trust is built by following through, not by making promises.
Quoted 10 lines
drivers/acpi/mipi-disco-img.c
drivers/cpufreq/cpufreq_ondemand.h
drivers/gpu/drm/i915/intel_cpu_info.c
drivers/char/tpm/tpm.h
drivers/crypto/ccp/ccp-dev.c
include/linux/platform_data/x86/soc.hBjorn, is v4 OK for v7.5 as is? The x86 header series will follow on top.
I disagree. You can't build this on top, as it would need to go through different trees and would likely cause merge conflicts. The cleanup series would have to touch the same lines in the PCI subsystem that you are changing now.
The only sane approach is to do the cleanup first and then build the p2p changes on top of it.
Thanks
Quoted 111 lines
Thanks,
PavelQuoted 106 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Wednesday, November 11, 2026 1:11 AM
To: Popov, Pavel E <[email protected]>
Cc: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu Rugina <[email protected]>; Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsQuoted 3 lines · Pavel E
Hi Bjorn,
Gentle ping on this series. Is this OK for v7.5?
I would say no. An Intel employee was asked to clean up an Intel-created mess while upstreaming an Intel-specific patch.
Peer-to-peer is a general concept, and the code should reflect that. It is reasonable to expect you to join the effort and help clean it up.
Thanks
Quoted 12 lines
Thanks,
PavelQuoted 8 lines
-----Original Message-----
From: Popov, Pavel E <[email protected]>
Sent: Tuesday, October 20, 2026 10:38 AM
To: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>
Cc: Popov, Pavel E <[email protected]>; Leon Romanovsky <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu RuginaQuoted 9 lines
Quoted 9 lines
Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsQuoted 7 lines
Quoted 7 lines
VMware and Hyper-V expose passthrough devices to guest VMs without an explicit host bridge device. Consequently,
host_bridge_whitelist()cannot automatically identify the underlying host bridge structure, causing Peer-to- Peer DMA (P2PDMA) requests to be rejected unless the device IDs are explicitly listed in pci_p2pdma_whitelist[]. To enable P2PDMA on Intel hosts, this series extendscpu_supports_p2pdma(), which so far covers AMD Zen andnewer, with an explicit list of Intel Xeon server generations.
Quoted 47 lines
Quoted 46 lines
Patch 1 moves the
CONFIG_X86#ifdef out ofcpu_supports_p2pdma(). Patch 2 is the v3 patch rebased on it, with Logan's Reviewed-by carried over; the Xeon list and the check are unchanged.Changes in v4:
- Add 1/2, moving theCONFIG_X86#ifdef out ofcpu_supports_p2pdma()(Logan Gunthorpe, Leon Romanovsky)
- Keep the #ifdef around the asm/ includes, as these headers exist only on x86 (Bjorn Helgaas)Changes in v3:
- Drop the hypervisor check and move the Xeon list intocpu_supports_p2pdma(), next to the AMD check, as suggested by Logan Gunthorpe and Leon Romanovsky [1]
- Fold the VMware and Hyper-V patches into one, as the check no longer depends on the hypervisorChanges in v2:
- Replace the Skylake-and-newer threshold with an explicit list of Intel Xeon server generations, from Skylake-SP to Diamond Rapids (Logan Gunthorpe)
- Move theCONFIG_X86#ifdef out ofhypervisor_supports_p2pdma()(Logan Gunthorpe)
- Rebased on current mainline[1] https://lore.kernel.org/r/20261016153147.GC219304@unreal
v3: https://lore.kernel.org/r/20261020151305.65218-1-
[email protected]
v2: https://lore.kernel.org/r/20261016223402.19991-1-
[email protected]
v1: https://lore.kernel.org/r/20261009154034.82321-1-
[email protected]Pavel Popov (2):
PCI/P2PDMA: MoveCONFIG_X86#ifdef out ofcpu_supports_p2pdma()PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsdrivers/pci/p2pdma.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)base-commit:
c03c1a14507dfaf8b856c2608f9ac216021fc222--
2.53.0
Quoted 2 lines · Leon Romanovsky
The only sane approach is to do the cleanup first and then build the p2p changes on top of it.
Done in v5 [1]. It adds an empty <asm-generic/cpu_device_id.h>, so <asm/cpu_device_id.h> can be included without #ifdef CONFIG_X86, and the P2PDMA patch sits on top of it. The <asm/intel-family.h> include is dropped, as <asm/cpu_device_id.h> already pulls it in on x86.
The follow-up series [2] removes the same #ifdef around the include in the other users (ACPI, cpufreq, i915, amdgpu, tpm, ccp, platform/x86).
Quoted 1 line
If you are ready, why hasn't it been done until now?
I missed your "general asm stubs" hint and read "properly exposed" as moving the x86 headers under include/linux/, with the aim of dropping CONFIG_X86 from the P2PDMA code entirely. As that is a much larger change, I proposed doing it later.
[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]
Thanks,
Pavel
Quoted 177 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Wednesday, November 11, 2026 12:10 PM
To: Popov, Pavel E <[email protected]>
Cc: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu Rugina <[email protected]>; Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsQuoted 11 lines · Pavel E
Quoted 2 lines · Leon Romanovsky
Peer-to-peer is a general concept, and the code should reflect that. It is reasonable to expect you to join the effort and help clean it up.
I'm in. My proposal is to do it after this series, since this one unblocks P2PDMA in guests and the cleanup is out of PCI scope: even the minimal fix for
p2pdma.calone means changes underarch/x86, so it would no longer be a P2PDMA patch but an x86 header series with its own maintainers and review. That x86 header series is also the right place to drop the same guard from six other files, and I'm ready to do it:If you are ready, why hasn't it been done until now?
The claims of urgency are hard to take seriously:
SKYLAKE_Xwas added toarch/x86/include/asm/intel-family.hin 2016, and now, ten years later, you are asking us to "do it urgently." I strongly suspect that if I don't bring up P2P at LPC, we won't see this patch for another ten years.Even now, despite being asked to clean this up before the merge window, you still haven't done so. Trust is built by following through, not by making promises.
Quoted 10 lines
drivers/acpi/mipi-disco-img.c
drivers/cpufreq/cpufreq_ondemand.h
drivers/gpu/drm/i915/intel_cpu_info.c
drivers/char/tpm/tpm.h
drivers/crypto/ccp/ccp-dev.c
include/linux/platform_data/x86/soc.hBjorn, is v4 OK for v7.5 as is? The x86 header series will follow on top.
I disagree. You can't build this on top, as it would need to go through different trees and would likely cause merge conflicts. The cleanup series would have to touch the same lines in the PCI subsystem that you are changing now.
The only sane approach is to do the cleanup first and then build the p2p changes on top of it.
Thanks
Quoted 11 lines
Thanks,
PavelQuoted 7 lines
-----Original Message-----
From: Leon Romanovsky <[email protected]>
Sent: Wednesday, November 11, 2026 1:11 AM
To: Popov, Pavel E <[email protected]>
Cc: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu RuginaQuoted 52 lines
Quoted 52 lines
Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsQuoted 3 lines · Pavel E
Hi Bjorn,
Gentle ping on this series. Is this OK for v7.5?
I would say no. An Intel employee was asked to clean up an Intel-created mess while upstreaming an Intel-specific patch.
Peer-to-peer is a general concept, and the code should reflect that. It is reasonable to expect you to join the effort and help clean it up.
Thanks
Quoted 12 lines
Thanks,
PavelQuoted 8 lines
-----Original Message-----
From: Popov, Pavel E <[email protected]>
Sent: Tuesday, October 20, 2026 10:38 AM
To: Bjorn Helgaas <[email protected]>; Logan Gunthorpe <[email protected]>
Cc: Popov, Pavel E <[email protected]>; Leon Romanovsky <[email protected]>; Lukas Wunner <[email protected]>; Jim Chow <[email protected]>; Radu RuginaQuoted 17 lines
Quoted 17 lines
Alexey Makhalov <[email protected]>; Wei Liu <[email protected]>; Michael Kelley <[email protected]>; Nathan Ciobanu <[email protected]>; bcm-kernel-feedback- [email protected]; [email protected]; linux- [email protected]; [email protected]; linux- [email protected]
Subject: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUsVMware and Hyper-V expose passthrough devices to guest VMs without an explicit host bridge device. Consequently,
host_bridge_whitelist()cannot automatically identify the underlying host bridge structure, causing Peer-to- Peer DMA (P2PDMA) requests to be rejected unless the device IDs are explicitly listed in pci_p2pdma_whitelist[]. To enable P2PDMA on Intel hosts, this series extendscpu_supports_p2pdma(), which so far covers AMD Zen andQuoted 8 lines
Quoted 8 lines
newer, with an explicit list of Intel Xeon server generations.
Quoted 7 lines
Quoted 7 lines
Patch 1 moves the
CONFIG_X86#ifdef out ofcpu_supports_p2pdma(). Patch 2 is the v3 patch rebased on it, with Logan's Reviewed-by carried over; the Xeon list and the check are unchanged.Changes in v4:
- Add 1/2, moving theCONFIG_X86#ifdef out of
cpu_supports_p2pdma()Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
(Logan Gunthorpe, Leon Romanovsky)
- Keep the #ifdef around the asm/ includes, as these headers exist only on x86 (Bjorn Helgaas)Changes in v3:
- Drop the hypervisor check and move the Xeon list intocpu_supports_p2pdma(), next to the AMD check, as suggested byLogan
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Gunthorpe and Leon Romanovsky [1]
- Fold the VMware and Hyper-V patches into one, as the check nolonger
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
depends on the hypervisor
Changes in v2:
- Replace the Skylake-and-newer threshold with an explicit list of Intel Xeon server generations, from Skylake-SP to Diamond Rapids (Logan Gunthorpe)
- Move theCONFIG_X86#ifdef out ofhypervisor_supports_p2pdma()(Logan Gunthorpe)
- Rebased on current mainline[1] https://lore.kernel.org/r/20261016153147.GC219304@unreal
v3: https://lore.kernel.org/r/20261020151305.65218-1-
[email protected]
v2: https://lore.kernel.org/r/20261016223402.19991-1-
[email protected]
v1: https://lore.kernel.org/r/20261009154034.82321-1-
[email protected]Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Pavel Popov (2):
PCI/P2PDMA: MoveCONFIG_X86#ifdef out of
cpu_supports_p2pdma()Quoted 11 lines
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs
drivers/pci/p2pdma.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)base-commit:
c03c1a14507dfaf8b856c2608f9ac216021fc222--
2.53.0