On Fri, May 24, 2019 at 12:40:57PM +0000, Koenig, Christian wrote: > Sounds sane to me as well. > > But since I don't have a struct pages backing my PCI BAR I won't be able > to use pci_p2pdma_map_sg. > > How should we work around that? I think we've got two escalation levels here: (1) fix the NVMe/RDMA p2p breakage for 5.2-rc - for that we just need the above fix in the p2p map_sg routine (and add an unmap_sg routine there) (2) figure out how to handle the switched case for your code. I'm not sure about that yet, and without a struct page we'd have to somehow track the relationship explicitly.