[PATCH v2 4/4] vfio/pci: Allow MMIO regions to be exported through dma-buf
Jason Gunthorpe
jgg at nvidia.com
Wed Sep 7 16:47:24 UTC 2022
On Wed, Sep 07, 2022 at 05:31:14PM +0100, Robin Murphy wrote:
> The only trouble is that it's not geared for *PCI* P2P when that may or may
> not happen entirely upstream of IOMMU translation.
This is why PCI users have to call the pci_distance stuff before using
dma_map_resource(), it ensures the PCI fabric is setup in a way that
is consistent with the iommu. eg if we have IOMMU turned on then the
fabric must have ACS/etc to ensure that all TLPs are translated.
PCI P2P is very complicated and fragile, sadly.
Thanks,
Jason
More information about the dri-devel
mailing list