[PATCH v2 3/4] iommu/arm-smmu-v3: Add support for dirty tracking in domain alloc
Jason Gunthorpe
jgg at nvidia.com
Thu Feb 22 05:11:01 PST 2024
On Thu, Feb 22, 2024 at 12:24:06PM +0000, Shameerali Kolothum Thodi wrote:
> > > Ok. But do we really need to check this in attach()? As dirty_ops are added only
> > > if it is requested in alloc_user() and there we return err when hardware doesn't
> > > have the capability. So not sure how this matters in attach() path. May be I am
> > > missing something.
> >
> > That's when you create the domain with dev A. Afterwards that dev A is
> > attached,
> > but later on you can attach another device B to the domain. So this check is
> > there such that a domain with dirty tracking ops set will only have devices in
> > there that support dirty tracking.
>
> But that only matters if dev B is on different smmu without dbm capability, right?
> In that case we already fail the attach with,
>
> >>> } else if (smmu_domain->smmu != smmu)
> > >>> ret = -EINVAL;
> > >>>
>
> Is that right?
Right. Relaxing this is on my list :\
The other two drivers don't have this limitation so needed the check
that Joao described.
Jason
More information about the linux-arm-kernel
mailing list