Messages in this thread | | | Date | Wed, 6 Apr 2022 10:06:14 -0300 | From | Jason Gunthorpe <> | Subject | Re: [PATCH RFC v2 03/11] iommu/sva: Add iommu_domain type for SVA |
| |
On Wed, Apr 06, 2022 at 01:32:07PM +0100, Robin Murphy wrote: > a particular IOMMU instance, and potentially allocate separate domains for > separate devices to represent the same address space, much like > vfio_iommu_type1_attach_group() does.
I think this VFIO code also needs some more work, it currently assumes that if the domain ops are the same then the domains are compatible, and that is not true for ARM SMMU drivers.
I've been thinking of adding a domain callback 'can device attach' and replacing the ops compare with that instead.
> It's not really worth IOMMU drivers trying to support a domain spanning > potentially-heterogeneous instances internally, since they can't reasonably > know what matters in any particular situation.
In the long run I think it will be worth optimizing. If the SMMU instances can share IOPTE memory then we get two wins - memory reduction and reduced work to read dirty bits.
The dirty read in particular is very performance sensitive so if real work loads have many SMMUs per VM it will become a pain point.
Jason
| |