aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel-iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2015-06-12 08:40:01 -0400
committerJoerg Roedel <jroedel@suse.de>2015-06-16 04:59:35 -0400
commit8939ddf6d65264cf9f014ffd7c9bff02ad9626e6 (patch)
tree6682340f0e2940871ba2bdab662389fe808f51a7 /drivers/iommu/intel-iommu.c
parent60b523ecfede05796aa77024b3960fecabab4de7 (diff)
iommu/vt-d: Enable Translation only if it was previously disabled
Do not touch the TE bit unless we know translation is disabled. Tested-by: ZhenHua Li <zhen-hual@hp.com> Tested-by: Baoquan He <bhe@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
-rw-r--r--drivers/iommu/intel-iommu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index e40c858a84fe..a98a7b27aca1 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -3204,7 +3204,9 @@ domains_done:
3204 if (ret) 3204 if (ret)
3205 goto free_iommu; 3205 goto free_iommu;
3206 3206
3207 iommu_enable_translation(iommu); 3207 if (!translation_pre_enabled(iommu))
3208 iommu_enable_translation(iommu);
3209
3208 iommu_disable_protect_mem_regions(iommu); 3210 iommu_disable_protect_mem_regions(iommu);
3209 } 3211 }
3210 3212