On Wed, Sep 02, 2026 at 03:34:18PM +0200, Christian König wrote:
On 9/2/26 12:59, Leon Romanovsky wrote: ...
The PCI_P2PDMA_MAP_BUS_ADDR is not supported by DMA-buf and as far as I can see is a complete dead end.
Maybe you mean DRM, but VFIO works perfectly with PCI_P2PDMA_MAP_BUS_ADDR flow in DMA-buf. What am I missing?
Well not quite.
The approach PCI_P2PDMA_MAP_BUS_ADDR takes is fundamentally tied to only map a physical CPU address into a PCI address and doesn't take into account that in a lot of configurations the CPU can't access all resources.
It is called PCI P2P. If the flow only uses PCI devices it should always work because it relies on PCI spec things that happen outside the CPU.
It does not try to solve the general embedded problem of arbitary communication between blocks inside a SOC, scale up networks, and so on.
So, yes, it does not solve every problem DMA buf faces, but no it is not a "Dead end" as it 100% solves PCI to PCI communication which is still a very common use case.
DMA buf users that are exporting from a PCI device, over PCI MMIO should be using this API. It is the only way to do PCI to PCI communication correctly in the kernel.
Jason