On Mon, 2014-03-17 at 09:44 -0600, Alex Williamson wrote: > > > As mentioned on irc, I think this could probably be made to work and > doing a callback would likely give the IOMMU driver the most flexibility > versus some sort of interface for iommu_iova_to_phys() to return the > mapping size.
Is it acceptable to have an API which says that the physical address may *still* be accessible through the IOTLB until iommu_unmap() returns? Even *after* the callback has been called for that physical address? We have the physical addresses to hand as we clear the PTEs, of course. But we haven't flushed the IOTLB yet. It would be painful to keep a *list* of pages and then call the callback after the IOTLB is flushed; we'd prefer to punt that cost to the caller, if the caller needs to worry about use-after-free problems. If that's too much of a pain, then maybe augmenting iova_to_phys() might be the better option...? -- dwmw2
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
