Re: [PATCH v2 4/5] iommu: Support mm PASID 1:n with sva domains
From: Baolu Lu
Date: Thu Aug 31 2023 - 03:35:47 EST
On 2023/8/31 14:42, Vasant Hegde wrote:
Also in this function (mm_pasid_drop()), should we check/free sva domains?
No, the driver must support a SVA domain with an empty mm_struct, eg
by hooking release.
Sorry. Looks like confused you. Looking into code I got this.
My question was: when PASID is enabled, is there any chance of mm_pasid_drop()
getting called before freeing all SVA domains?
I remember we have discussed this during sva development. If I remember
it correctly, in any case, mm_pasid_drop() will be called after the
device is closed. The device driver will detach the sva domains in the
close path.
Best regards,
baolu