aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/amd_iommu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 9aa135d4453f..a8e74c34dd27 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -1141,6 +1141,15 @@ static void __detach_device(struct protection_domain *domain, u16 devid)
1141 1141
1142 /* ready */ 1142 /* ready */
1143 spin_unlock(&domain->lock); 1143 spin_unlock(&domain->lock);
1144
1145 /*
1146 * If we run in passthrough mode the device must be assigned to the
1147 * passthrough domain if it is detached from any other domain
1148 */
1149 if (iommu_pass_through) {
1150 struct amd_iommu *iommu = amd_iommu_rlookup_table[devid];
1151 __attach_device(iommu, pt_domain, devid);
1152 }
1144} 1153}
1145 1154
1146/* 1155/*