Commit 8939ddf6 authored by Joerg Roedel's avatar Joerg Roedel

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: default avatarZhenHua Li <zhen-hual@hp.com>
Tested-by: default avatarBaoquan He <bhe@redhat.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 60b523ec
......@@ -3204,7 +3204,9 @@ static int __init init_dmars(void)
if (ret)
goto free_iommu;
iommu_enable_translation(iommu);
if (!translation_pre_enabled(iommu))
iommu_enable_translation(iommu);
iommu_disable_protect_mem_regions(iommu);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment