[GIT PULL] iommu: Kill off pgsize_bitmap field from struct iommu_ops
Alex Williamson
alex.williamson at redhat.com
Wed Apr 1 09:45:39 PDT 2015
On Wed, 2015-04-01 at 12:53 +0100, Will Deacon wrote:
> On Tue, Mar 31, 2015 at 04:50:50PM +0100, Alex Williamson wrote:
> > It makes sense to me that supported page sizes has a similar problem to
> > IOMMU_CACHE; IOMMU mappings can be made that are dependent on the
> > composition of the domain at the time of mapping and there's no
> > requirement that all the IOMMU hardware units support the exact same
> > features. VFIO already assumes that separate domains don't necessarily
> > use the same ops and we make sure mappings and un-mappings are aligned
> > to the smallest common size. We'll have some work to do though if there
> > is no common size between the domains and we may need to add a test to
> > our notion of compatible domains if pgsize_bitmap moves from iommu_ops
> > (sorry, I forget whether you already had a patch for that in this pull
> > request). Thanks,
>
> The series updates vfio_pgsize_bitmap to use the domains, so dma_do_map
> will fail if there's no common page size amongst the IOMMUs referenced
> by the container. That preserves the existing behaviour, but I'm not
> sure why it's actually required. Couldn't we potentially allow different
> domains to use different page sizes?
We can. I think the only thing we're trying to do with it now is
confirm that the user mapping meets the minimum size and alignment
requirements of the IOMMU. We don't use it as a basis for our actual
mappings, it's the IOMMU API's job to do that. Thanks,
Alex
More information about the linux-arm-kernel
mailing list