RE: [PATCH v2 1/2] PCI/P2PDMA: Allow P2PDMA in VMware guests on Intel hosts

From: Popov, Pavel E

Date: Fri Oct 16 2026 - 20:32:38 EST


Logan,

> Why does this now need to be related to the hypervisor? Wouldn't it
> make sense to do this check regardless of whether VMware is involved?

The whitelist decides per host bridge, and a global CPU check would
override it on these CPUs, for example:

- It allows VMD domains, CXL 1.1 devices and other RCiEPs, which are
not whitelisted.
- It overrides the emulated topology in KVM/QEMU guests, which already
decides P2P there.
- It makes the existing QAT, DSA and IAA whitelist entries pointless,
since any RCiEP would be allowed.

Limiting it to the hypervisor keeps the whitelist logic unchanged on
bare metal and in other guests.

Thanks,
Pavel

> -----Original Message-----
> From: Logan Gunthorpe <logang@xxxxxxxxxxxx>
> Sent: Friday, October 16, 2026 3:55 PM
> To: Popov, Pavel E <pavel.e.popov@xxxxxxxxx>; Bjorn Helgaas
> <bhelgaas@xxxxxxxxxx>
> Cc: Jim Chow <jim.chow@xxxxxxxxxxxx>; Radu Rugina
> <radu.rugina@xxxxxxxxxxxx>; Alexey Makhalov
> <alexey.makhalov@xxxxxxxxxxxx>; Wei Liu <wei.liu@xxxxxxxxxx>; Michael
> Kelley <mhklinux@xxxxxxxxxxx>; Lukas Wunner <lukas@xxxxxxxxx>; Leon
> Romanovsky <leonro@xxxxxxxxxx>; Nathan Ciobanu
> <nathan.d.ciobanu@xxxxxxxxxxxxxxx>; bcm-kernel-feedback-
> list@xxxxxxxxxxxx; virtualization@xxxxxxxxxxxxxxx; linux-
> hyperv@xxxxxxxxxxxxxxx; linux-pci@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2 1/2] PCI/P2PDMA: Allow P2PDMA in VMware guests
> on Intel hosts
>
>
>
> On 2026-10-16 16:34, Pavel Popov wrote:
> > +#ifdef CONFIG_X86
> > +/* CPUs whose host bridges support p2pdma, see pci_p2pdma_whitelist[]
> > +*/ static const struct x86_cpu_id hypervisor_p2pdma_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 hypervisor_supports_p2pdma(void) {
> > + /* Hypervisor hides host topology, allow p2pdma on whitelisted CPUs
> */
> > + if (hypervisor_is_type(X86_HYPER_VMWARE))
> > + return x86_match_cpu(hypervisor_p2pdma_cpu_ids);
> > +
> > + return false;
> > +}
> One quick thought, after a very quick pass at this:
>
> Why does this now need to be related to the hypervisor? Wouldn't it make
> sense to do this check regardless of whether VMWare is involved?
>
> Logan