Commit 2896ba40 authored by Joerg Roedel's avatar Joerg Roedel

iommu: Don't use sme_active() in generic code

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: 2cc13bb4 ("iommu: Disable passthrough mode when SME is active")
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent d127bc9b
...@@ -120,8 +120,8 @@ static int __init iommu_subsys_init(void) ...@@ -120,8 +120,8 @@ static int __init iommu_subsys_init(void)
else else
iommu_set_default_translated(false); iommu_set_default_translated(false);
if (iommu_default_passthrough() && sme_active()) { if (iommu_default_passthrough() && mem_encrypt_active()) {
pr_info("SME detected - Disabling default IOMMU Passthrough\n"); pr_info("Memory encryption detected - Disabling default IOMMU Passthrough\n");
iommu_set_default_translated(false); iommu_set_default_translated(false);
} }
} }
......
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