Skip to content

Commit

Permalink
iommu/vt-d: Enable Translation only if it was previously disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel committed Jun 16, 2015
1 parent 60b523e commit 8939ddf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8939ddf

Please sign in to comment.