From 8939ddf6d65264cf9f014ffd7c9bff02ad9626e6 Mon Sep 17 00:00:00 2001 From: Joerg Roedel Date: Fri, 12 Jun 2015 14:40:01 +0200 Subject: [PATCH] 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 Tested-by: Baoquan He Signed-off-by: Joerg Roedel --- drivers/iommu/intel-iommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.39.2