Hi Praan, On 10/06/2026 16:27, Pranjal Shrivastava wrote: > On Fri, May 29, 2026 at 08:05:53PM -0300, Jason Gunthorpe wrote: >> On Wed, May 27, 2026 at 03:09:46PM -0600, Alex Williamson wrote: >>> This deserves a /* CONFIG_PCI_P2PDMA */ reference like the previous >>> long span, though potentially a better solution would be to split the >>> core code out to a separate file with shared header. I asked opus to >>> see what this would look like and it generated the patch below >>> (unverified, compile tested only). Bigger diff, harder to follow >>> blame, but the shape of the core is much more apparent. You're welcome >>> to take or leave it. >> >> I think it is a good idea, it will make it easier to add more stuff to >> these different aspects. >> >> Really they are now two different things with one layered on top of >> the other. >> > > A little late to this party. I agree with this split per status quo. > Although, one observation from me, I've posted a concurrent RFC [1] that > implements ZONE_DEVICE P2P registration for VFIO. That work relies on > pci_p2pdma_add_resource(), which requires ZONE_DEVICE and the full > CONFIG_PCI_P2PDMA stack rather than just the CORE part. > > I guess I can be careful to guard the ZONE_DEVICE P2P registration > feature in VFIO with the full PCI_P2PDMA config. Apart from that, this > split provides a clean foundation for both series to coexist.
Thanks for the heads-up/Cc. >From your description, I agree, just depend on/select CONFIG_PCI_P2PDMA as usual. The only new thing in this split is the CONFIG_PCI_P2PDMA_CORE allows the subset, but the default case (as used by a couple of other drivers) stays the same. I just posted a v3 including this split so you can see it in practice. (I'd done part of it manually anyway so just finished it off, not character-identical to Alex's patch but does the same thing.) Thanks, Matt > > Thanks, > Praan > > [1] https://lore.kernel.org/all/[email protected]/
