Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH v5 0/3] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs
@ 2026-11-11 23:44 Pavel Popov
  2026-11-11 23:44 ` [PATCH v5 1/3] asm-generic: Add <asm-generic/cpu_device_id.h> Pavel Popov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pavel Popov @ 2026-11-11 23:44 UTC (permalink / raw)
  To: Bjorn Helgaas, Logan Gunthorpe, Arnd Bergmann
  Cc: Pavel Popov, Leon Romanovsky, Lukas Wunner, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, Jim Chow,
	Radu Rugina, Alexey Makhalov, Wei Liu, Michael Kelley,
	Nathan Ciobanu, bcm-kernel-feedback-list, virtualization,
	linux-hyperv, linux-arch, linux-pci, linux-kernel

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 adds a generic <asm/cpu_device_id.h>, so that generic code can
include it without #ifdef CONFIG_X86.
Patch 2 moves the CONFIG_X86 #ifdef out of cpu_supports_p2pdma(); this
is the v4 1/2 patch, unchanged.
Patch 3 is the v4 2/2 patch with Logan's Reviewed-by carried over; the
only change is in the includes.

Arnd, if 1/3 looks OK to you, could it go through the PCI tree
together with 2/3 and 3/3?

The other users of <asm/cpu_device_id.h> and <asm/intel-family.h>
under #ifdef CONFIG_X86 (ACPI, cpufreq, i915, amdgpu, tpm, ccp,
platform/x86) are converted in a follow-up series on top of this one.

Based on mainline (7.4-rc2+). Built with x86_64 and arm64
allmodconfig, each patch separately.

Changes in v5:
- Add 1/3, a generic <asm/cpu_device_id.h>, so the include no longer
  needs #ifdef CONFIG_X86 (Leon Romanovsky)
- Drop the <asm/intel-family.h> include, <asm/cpu_device_id.h>
  includes it on x86

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

v4: https://lore.kernel.org/r/20261020173736.81755-1-pavel.e.popov@intel.com
v3: https://lore.kernel.org/r/20261020151305.65218-1-pavel.e.popov@intel.com
v2: https://lore.kernel.org/r/20261016223402.19991-1-pavel.e.popov@intel.com
v1: https://lore.kernel.org/r/20261009154034.82321-1-pavel.e.popov@intel.com

Pavel Popov (3):
  asm-generic: Add <asm-generic/cpu_device_id.h>
  PCI/P2PDMA: Move CONFIG_X86 #ifdef out of cpu_supports_p2pdma()
  PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs

 drivers/pci/p2pdma.c                | 30 +++++++++++++++++++++++++++--
 include/asm-generic/Kbuild          |  1 +
 include/asm-generic/cpu_device_id.h |  5 +++++
 3 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 include/asm-generic/cpu_device_id.h


base-commit: 067c5c24cef23d913b67eaaf71ae67e7169a6620
-- 
2.54.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-12  0:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 23:44 [PATCH v5 0/3] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs Pavel Popov
2026-11-11 23:44 ` [PATCH v5 1/3] asm-generic: Add <asm-generic/cpu_device_id.h> Pavel Popov
2026-11-12  0:52   ` sashiko-bot
2026-11-11 23:44 ` [PATCH v5 2/3] PCI/P2PDMA: Move CONFIG_X86 #ifdef out of cpu_supports_p2pdma() Pavel Popov
2026-11-12  0:53   ` sashiko-bot
2026-11-11 23:44 ` [PATCH v5 3/3] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs Pavel Popov
2026-11-12  0:58   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox