When a device is deassigned from the domain it is required to remove the iommu group.
If we don't remove the group, the next time when we assign a device, SME and S2CR will not be setup correctly for the device because of that SMMU fault will be observed. Signed-off-by: Rahul Singh <[email protected]> --- xen/drivers/passthrough/arm/smmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/drivers/passthrough/arm/smmu.c b/xen/drivers/passthrough/arm/smmu.c index 5cacb2dd99..9a31c332d0 100644 --- a/xen/drivers/passthrough/arm/smmu.c +++ b/xen/drivers/passthrough/arm/smmu.c @@ -1690,6 +1690,8 @@ static void arm_smmu_detach_dev(struct iommu_domain *domain, struct device *dev) if (cfg) arm_smmu_master_free_smes(cfg); + iommu_group_put(dev_iommu_group(dev)); + dev_iommu_group(dev) = NULL; } #if 0 /* -- 2.25.1
