> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Thursday, May 5, 2022 9:55 PM > > On Thu, May 05, 2022 at 11:03:18AM +0000, Tian, Kevin wrote: > > > iiuc the purpose of 'write-protection' here is to capture in-fly dirty pages > > in the said race window until unmap and iotlb is invalidated is completed. > > No, the purpose is to perform "unmap" without destroying the dirty bit > in the process. > > If an IOMMU architecture has a way to render the page unmaped and > flush back the dirty bit/not destroy then it doesn't require a write > protect pass. > Yes, I see the point now. As you said let's consider it only when there is a real use case requiring such atomicity.