Linux virtualization list
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: "Popov, Pavel E" <pavel.e.popov@intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Logan Gunthorpe <logang@deltatee.com>,
	Lukas Wunner <lukas@wunner.de>, Jim Chow <jim.chow@broadcom.com>,
	Radu Rugina <radu.rugina@broadcom.com>,
	Alexey Makhalov <alexey.makhalov@broadcom.com>,
	Wei Liu <wei.liu@kernel.org>,
	Michael Kelley <mhklinux@outlook.com>,
	Nathan Ciobanu <nathan.d.ciobanu@linux.intel.com>,
	"bcm-kernel-feedback-list@broadcom.com"
	<bcm-kernel-feedback-list@broadcom.com>,
	"virtualization@lists.linux.dev" <virtualization@lists.linux.dev>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs
Date: Wed, 21 Oct 2026 10:34:43 +0300	[thread overview]
Message-ID: <20261021073443.GP64621@unreal> (raw)
In-Reply-To: <LV2PR11MB6070E19D3A0CCA50943D7499B2672@LV2PR11MB6070.namprd11.prod.outlook.com>

On Tue, Oct 20, 2026 at 07:37:32PM +0000, Popov, Pavel E wrote:
> Leon,
> 
> The #ifdef CONFIG_X86 in cpu_supports_p2pdma() came with the AMD check.

This is due to poking at `struct cpuinfo_x86`, which is not ideal but
understandable.

> 
> 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

> 
> Thanks,
> Pavel
> 
> > -----Original Message-----
> > From: Leon Romanovsky <leon@kernel.org>
> > Sent: Tuesday, October 20, 2026 11:40 AM
> > To: Popov, Pavel E <pavel.e.popov@intel.com>
> > Cc: Bjorn Helgaas <bhelgaas@google.com>; Logan Gunthorpe
> > <logang@deltatee.com>; Lukas Wunner <lukas@wunner.de>; Jim Chow
> > <jim.chow@broadcom.com>; Radu Rugina <radu.rugina@broadcom.com>;
> > Alexey Makhalov <alexey.makhalov@broadcom.com>; Wei Liu
> > <wei.liu@kernel.org>; Michael Kelley <mhklinux@outlook.com>; Nathan
> > Ciobanu <nathan.d.ciobanu@linux.intel.com>; bcm-kernel-feedback-
> > list@broadcom.com; virtualization@lists.linux.dev; linux-
> > hyperv@vger.kernel.org; linux-pci@vger.kernel.org; linux-
> > kernel@vger.kernel.org
> > Subject: Re: [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon
> > server CPUs
> > 
> > On Tue, Oct 20, 2026 at 10:37:34AM -0700, Pavel Popov wrote:
> > > 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)
> > 
> > I'm confident that this is wrong usage of asm headers.
> > 
> > Thanks

      reply	other threads:[~2026-10-21  7:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20 17:37 [PATCH v4 0/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs Pavel Popov
2026-10-20 17:37 ` [PATCH v4 1/2] PCI/P2PDMA: Move CONFIG_X86 #ifdef out of cpu_supports_p2pdma() Pavel Popov
2026-10-20 17:39   ` sashiko-bot
2026-10-20 17:37 ` [PATCH v4 2/2] PCI/P2PDMA: Allow P2PDMA on Intel Xeon server CPUs Pavel Popov
2026-10-20 17:40   ` sashiko-bot
2026-10-20 18:40 ` [PATCH v4 0/2] " Leon Romanovsky
2026-10-20 19:37   ` Popov, Pavel E
2026-10-21  7:34     ` Leon Romanovsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261021073443.GP64621@unreal \
    --to=leon@kernel.org \
    --cc=alexey.makhalov@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=jim.chow@broadcom.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=lukas@wunner.de \
    --cc=mhklinux@outlook.com \
    --cc=nathan.d.ciobanu@linux.intel.com \
    --cc=pavel.e.popov@intel.com \
    --cc=radu.rugina@broadcom.com \
    --cc=virtualization@lists.linux.dev \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox