On Fri, Apr 29, 2022 at 05:40:56PM +0100, Joao Martins wrote: > > A common use model might be to just destroy the iommu_domain without > > doing stop so prefering the clearing io page table at stop might be a > > better overall design. > > If we want to ensure that the IOPTE dirty state is immutable before start > and after stop maybe this behaviour could be a new flag in the set-dirty-tracking > (or be implicit as you suggest). but ... hmm, at the same time, I wonder if > it's better to let userspace fetch the dirties that were there /right after stopping/ > (via GET_DIRTY_IOVA) rather than just discarding them implicitly at SET_DIRTY_TRACKING(0|1). It is not immutable, it is just the idea that there are no left over false-dirties after start returns. Combined with the realization that in many cases we don't need to stop, but will just destroy the whole iommu_domain Jason