Re: [PATCH 2/2] dma-buf: Document how exporters and importers agree on mapping lifetime

From: Jason Gunthorpe

Date: Tue Sep 01 2026 - 12:26:54 EST


On Mon, Aug 31, 2026 at 11:22:24AM +0200, Christian König wrote:

> > So, to answer the question, we need to document how these flows are
> > identified and how they differ.
>
> Mhm, that's the point I don't think they differ that much.

For the importer there are clearly different things that imply
different HW capabilities:

pinned means the importer doesn't provide any way to stop DMA

revocable means the importer must be able to stop DMA and
possibly suffer user visble errors in the process

movable means the importer must be able to pause DMA and never suffer
errors while the memory location is moving.

The whole reason we have these levels is because they reflect very
real levels of HW support on the importer side. I think it is worth
documenting it at least for the sake of people implementing importer
HW to understand the rules

Yes you can use the APIs more flexilby, but not beyound the HW
enforced limits above.

> Completely revoking is just a special case of moving the backing
> store to an inaccessible place and not making it accessible again on
> the next map call.

In a very general abstract sense maybe, but that model doesn't match
how the importer HW implementations work.

Jason