On Wed, Nov 19, 2025 at 03:11:01PM +0100, Christian König wrote:
I miss interpreted the call to pci_p2pdma_map_type() here in that now the DMA-buf code decides if transactions go over the root complex or not.
Oh, that's not it at all. I think you get it, but just to be really clear:
This code is taking a physical address from the exporter and determining how it MUST route inside the fabric. There is only one single choice with no optionality.
The exporter already decided if it will go over the host bridge by providing an address that must use a host bridge path.
But the exporter can call pci_p2pdma_map_type() even before calling this function, so that looks fine to me.
Yes, the exporter needs to decide where the data is placed before it tries to map it into the SGT.
Jason