summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2015-06-12 14:40:01 +0200
committerJoerg Roedel <jroedel@suse.de>2015-06-16 10:59:35 +0200
commit8939ddf6d65264cf9f014ffd7c9bff02ad9626e6 (patch)
tree6682340f0e2940871ba2bdab662389fe808f51a7 /drivers
parent60b523ecfede05796aa77024b3960fecabab4de7 (diff)
downloadlinux-stable-8939ddf6d65264cf9f014ffd7c9bff02ad9626e6.tar.gz
linux-stable-8939ddf6d65264cf9f014ffd7c9bff02ad9626e6.tar.bz2
linux-stable-8939ddf6d65264cf9f014ffd7c9bff02ad9626e6.zip
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')
-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:
if (ret)
goto free_iommu;
- iommu_enable_translation(iommu);
+ if (!translation_pre_enabled(iommu))
+ iommu_enable_translation(iommu);
+
iommu_disable_protect_mem_regions(iommu);
}