Re: [PATCH] iommu/amd: Remove iommu_group_mutex_assert() from amd_iommu_clear_gcr3()
Jason Gunthorpe <[email protected]>
| Newsgroups | dev.linux.lists.iommu |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Aug 14, 2026 at 10:40:29AM +0000, Vasant Hegde wrote: > Remove the iommu_group_mutex_assert() call from > amd_iommu_clear_gcr3(), since PASID teardown via the mmu_notifier > release path is a legitimate caller that does not and need not hold > the group mutex. Why doesn't it? Right below this line is: gcr3_info->pasid_cnt--; Which certainly needs the lock. In the ARM driver this async release notifier was pretty tricky to lock properly. It just updates the equivilent to the GCR3 entry to make it disabled and doesn't touch anything else. This is locked in a way so that concurrent domain detach doesn't face any races. AMD should have the same basic design here too. Jason