On Mon, 2014-03-17 at 10:51 -0600, Alex Williamson wrote: > > In order to maintain the trivial callback you suggest, the IOTLB would > need to guarantee that the physical addresses are not accessible prior > to the callback. Without such a guarantee, we can't unpin the pages and > the callback wouldn't be able to do anything more than collect a list of > pages to later unpin. For reducing IOTLB flushes maybe that still makes > sense, but it does seem like it could easily get ugly. For instance, > the callback would need the option to return -errno if it runs out of > resources, so the IOMMU driver would need the ability to reinstate the > last chunk.
Well, unless they're your own pages and you can (ab)use pg->freelist to make a list of them without having to actually do any allocations? But yeah, that's the API that's on offer from the IOMMU side I think. You get to choose if it's acceptable to you or not. If not, we need to revert to the simpler iommu_iova_to_phys() option. -- dwmw2
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu