On Fri, Nov 08, 2024 at 11:02:26AM -0400, Jason Gunthorpe wrote: > It is fully OK? Can't dma_map_page() trigger swiotlb? It must not do > that for P2P. How does it know the difference if it just gets a phys? dma_direct_map_page checks for p2p pages in the swiotlb bounce path already in the current kernel, and dma_map_sg relies on exactly that check to prevent bouncing for p2p.