On Fri, Nov 08, 2024 at 11:38:46AM -0400, Jason Gunthorpe wrote: > > > What I'm thinking about is replacing code like the above with something like: > > > > > > if (p2p_provider) > > > return DMA_MAPPING_ERROR; > > > > > > And the caller is the one that would have done is_pci_p2pdma_page() > > > and either passes p2p_provider=NULL or page->pgmap->p2p_provider. > > > > And where do you get that one from? > > Which one? The p2p_provider thing (whatever that will actually be).