On Wed, Dec 02, 2026 at 02:54:07PM +1100, Alistair Popple wrote:
So what I'm hearing is that the exporter should be unmapping as a defense against bad importers. I can definitely understand why that might be useful, especially as some kind of debug thing, but I don't think we should be basing the whole API design around the concept we can't trust importer to implement the contract correctly. Especially as that defense might not actually exist in a lot of cases anyway (eg. IOMMU disabled), in which case you have no choice but to trust the importer got things right.
+1
I also sense there might be a deeper belief that the mapping of a resource (ie. the IOVA) is something owned by the resource rather than the user of that resource.
Well, this would be wrong. The IOVA is owned by the DMA API, the DMA API is owned by its bound driver. In the kernel it is *never* owned by the memory object being mapped by it.
Jason