[PATCH v2 2/2] PCI/P2PDMA: Allow P2PDMA in Hyper-V guests on Intel hosts

From: Pavel Popov

Date: Fri Oct 16 2026 - 18:34:21 EST


Peer-to-Peer DMA (P2PDMA) between two devices requires either a shared
upstream bridge or a host bridge matching pci_p2pdma_whitelist[]. 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.

The P2PDMA host bridge check does not work in a Hyper-V guest. Apply
the same bypass as for VMware, on the same Intel Xeon generations.

Tested with the Intel Level Zero P2P benchmark (ze_peer) on Arc Pro B60
cards in a Linux guest on Windows Server 2025 (Emerald Rapids host).

Signed-off-by: Pavel Popov <pavel.e.popov@xxxxxxxxx>
---
drivers/pci/p2pdma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index 1b4886d4f9be..9d643dd41008 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -557,7 +557,8 @@ static const struct x86_cpu_id hypervisor_p2pdma_cpu_ids[] = {
static bool hypervisor_supports_p2pdma(void)
{
/* Hypervisor hides host topology, allow p2pdma on whitelisted CPUs */
- if (hypervisor_is_type(X86_HYPER_VMWARE))
+ if (hypervisor_is_type(X86_HYPER_VMWARE) ||
+ hypervisor_is_type(X86_HYPER_MS_HYPERV))
return x86_match_cpu(hypervisor_p2pdma_cpu_ids);

return false;
--
2.53.0