From: Joerg Roedel <[email protected]>

Do not touch the TE bit unless we know translation is
disabled.

Signed-off-by: Joerg Roedel <[email protected]>
---
 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 b47def6..ad72c6d 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -3184,7 +3184,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);
        }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to