iommu/vt-d: Detach domain when move device out of group
PATCH 1/1 iommu/vt-d: Detach domain when move device out of group
When removing a device from an iommu group, the domain should be detached from the device. Otherwise, the stale domain info will still be cached by the driver and the driver will refuse to attach any domain to the device again.
Cc Ashok Raj <[email protected]>
Cc Jacob Pan <[email protected]>
Cc Kevin Tian <[email protected]>
Fixes b7297783c2bb6 ("iommu/vt-d: Remove duplicated code for device hotplug")
Reported-and-tested-by Vlad Buslov <[email protected]>
Suggested-by Robin Murphy <[email protected]>
Signed-off-by Lu Baolu <[email protected]>
--- drivers/iommu/intel-iommu.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/iommu/intel-iommu.c +2 -0
@@ -5316,6 +5316,8 @@ static void intel_iommu_remove_device(struct device *dev)if (!iommu)return ; +dmar_remove_one_dev_info (dev); +iommu_group_remove_device (dev);iommu_device_unlink (&iommu->iommu, dev);
Signature · 1 line
2.17.1
Joerg Roedel
maintainerQuoted 2 lines · Lu Baolu
drivers/iommu/intel-iommu.c | 2 ++ 1 file changed, 2 insertions(+)
Applied to iommu/fixes, thanks.
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu