On Fri, Sep 18, 2026 at 02:05:24PM -0300, Jason Gunthorpe wrote:
> On Fri, Sep 18, 2026 at 03:42:28PM +0200, Thomas Hellström wrote:
> > 
> > 1) Xe attachment check if pci_p2pdma_distance() returns OK for the
> > path. Then Xe always sets up dma-addresses using dma_map_resource(). 
> 
> Open coding pci_p2pdma_distance() in drivers is a hack. Using
> dma_map_resource() like this was never "allowed".
> 
> We've fixed things so these hacks are not needed, the drivers need to
> move over to things like dma_buf_phys_vec_to_sgt() and the hmm helpers
> to use the DMA API correctly.

And this brings us back to my original question: what exactly should I
change in this series, given that it works as expected for all users of
the existing DMA and P2P APIs without any additional "hacks"? This
includes, for example, VFIO, iommufd, and RDMA. In our internal tests,
the GPU driver converted to use these interfaces also works as expected.

IMHO, it is time to update XE too.

Thanks

Reply via email to