diff options
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 751ce73c6e1b..adb0ba025702 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -1511,9 +1511,11 @@ static void __detach_device(struct device *dev) | |||
1511 | 1511 | ||
1512 | /* | 1512 | /* |
1513 | * If we run in passthrough mode the device must be assigned to the | 1513 | * If we run in passthrough mode the device must be assigned to the |
1514 | * passthrough domain if it is detached from any other domain | 1514 | * passthrough domain if it is detached from any other domain. |
1515 | * Make sure we can deassign from the pt_domain itself. | ||
1515 | */ | 1516 | */ |
1516 | if (iommu_pass_through && dev_data->domain == NULL) | 1517 | if (iommu_pass_through && |
1518 | (dev_data->domain == NULL && domain != pt_domain)) | ||
1517 | __attach_device(dev, pt_domain); | 1519 | __attach_device(dev, pt_domain); |
1518 | } | 1520 | } |
1519 | 1521 | ||