Skip to content

Commit

Permalink
iommu: Don't use sme_active() in generic code
Browse files Browse the repository at this point in the history
Switch to the generic function mem_encrypt_active() because
sme_active() is x86 specific and can't be called from
generic code on other platforms than x86.

Fixes: 2cc13bb ("iommu: Disable passthrough mode when SME is active")
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Joerg Roedel committed Sep 3, 2019
1 parent d127bc9 commit 2896ba4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iommu/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ static int __init iommu_subsys_init(void)
else
iommu_set_default_translated(false);

if (iommu_default_passthrough() && sme_active()) {
pr_info("SME detected - Disabling default IOMMU Passthrough\n");
if (iommu_default_passthrough() && mem_encrypt_active()) {
pr_info("Memory encryption detected - Disabling default IOMMU Passthrough\n");
iommu_set_default_translated(false);
}
}
Expand Down

0 comments on commit 2896ba4

Please sign in to comment.