Skip to content

Commit 2896ba4

Browse files
committed
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: 2cc13bb ("iommu: Disable passthrough mode when SME is active") Signed-off-by: Joerg Roedel <[email protected]>
1 parent d127bc9 commit 2896ba4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iommu/iommu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ static int __init iommu_subsys_init(void)
120120
else
121121
iommu_set_default_translated(false);
122122

123-
if (iommu_default_passthrough() && sme_active()) {
124-
pr_info("SME detected - Disabling default IOMMU Passthrough\n");
123+
if (iommu_default_passthrough() && mem_encrypt_active()) {
124+
pr_info("Memory encryption detected - Disabling default IOMMU Passthrough\n");
125125
iommu_set_default_translated(false);
126126
}
127127
}

0 commit comments

Comments
 (0)