On Mon, Mar 01, 2021 at 03:00:11PM -0800, Jacob Pan wrote: > > functionality is not a problem without this patch on x86. But I think > I feel the reason that x86 doesn't care is that mm->pasid is not used > unless bind_mm is called.
I think vt-d also maintains the global_svm_list, that tells whether a PASID is already allocated for the mm. The SMMU driver relies only on iommu_sva_alloc_pasid() for this. > For the fork children even mm->pasid is non-zero, > it has no effect since it is not loaded onto MSRs. > Perhaps you could also add a check or WARN_ON(!mm->pasid) in load_pasid()? > > > we do need to have this patch in the kernel because PASID is per addr > > space and two addr spaces shouldn't have the same PASID. > > > Agreed. > > > Who will accept this patch? It's not clear from get_maintainers.pl, but I guess it should go via linux-mm. Since the list wasn't cc'd on the original patch, I resent it. Thanks, Jean