On Mon, 2026-09-21 at 08:43 +0200, Christian König wrote:
On 9/18/26 19:05, Jason Gunthorpe wrote:
On Fri, Sep 18, 2026 at 03:42:28PM +0200, Thomas Hellström wrote:
- 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.
That is a completely broken approach as well since it limits the exported resources to addresses the CPU can reach.
And this would be OK for pcie_p2p, but not for other fast interconnects, right? Or is this problematic also for pcie_p2p?
Thanks, Thomas