Re: [PATCH rc v8 4/8] iommu: Fix pasid attach in pci_dev_reset_iommu_prepare/done()

From: Baolu Lu

Date: Mon Apr 27 2026 - 04:39:31 EST


On 4/25/2026 9:15 AM, Nicolin Chen wrote:
Now the helpers handle per-gdev resets. Replace __iommu_set_group_pasid()
with set_dev_pasid() accordingly, in the pci_dev_reset_iommu_done().

Also add max_pasids check as other callers.

Fixes: c279e83953d9 ("iommu: Introduce pci_dev_reset_iommu_prepare/done()")
Cc:stable@xxxxxxxxxxxxxxx
Reported-by: Shuai Xue<xueshuai@xxxxxxxxxxxxxxxxx>
Closes:https://lore.kernel.org/all/ad858513-09fc-455e-bbc5- fe38a225cc78@xxxxxxxxxxxxxxxxx/
Reviewed-by: Shuai Xue<xueshuai@xxxxxxxxxxxxxxxxx>
Reviewed-by: Jason Gunthorpe<jgg@xxxxxxxxxx>
Reviewed-by: Kevin Tian<kevin.tian@xxxxxxxxx>
Signed-off-by: Nicolin Chen<nicolinc@xxxxxxxxxx>
---
drivers/iommu/iommu.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)

Reviewed-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>