summaryrefslogtreecommitdiffstats
path: root/arch/x86/realmode
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2021-09-09 00:58:38 +0200
committerBorislav Petkov <bp@suse.de>2021-10-04 11:47:09 +0200
commit6283f2effbd62a71a7c29062f8093c335ff3ea89 (patch)
tree7de804f610f1317ec4688c51f7d82b41530efd40 /arch/x86/realmode
parentx86/sev: Replace occurrences of sev_active() with cc_platform_has() (diff)
downloadlinux-6283f2effbd62a71a7c29062f8093c335ff3ea89.tar.xz
linux-6283f2effbd62a71a7c29062f8093c335ff3ea89.zip
x86/sev: Replace occurrences of sev_es_active() with cc_platform_has()
Replace uses of sev_es_active() with the more generic cc_platform_has() using CC_ATTR_GUEST_STATE_ENCRYPT. If future support is added for other memory encyrption techonologies, the use of CC_ATTR_GUEST_STATE_ENCRYPT can be updated, as required. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20210928191009.32551-8-bp@alien8.de
Diffstat (limited to 'arch/x86/realmode')
-rw-r--r--arch/x86/realmode/init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c
index c878c5ee5a4c..4a3da7592b99 100644
--- a/arch/x86/realmode/init.c
+++ b/arch/x86/realmode/init.c
@@ -2,7 +2,6 @@
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/memblock.h>
-#include <linux/mem_encrypt.h>
#include <linux/cc_platform.h>
#include <linux/pgtable.h>
@@ -48,7 +47,7 @@ static void sme_sev_setup_real_mode(struct trampoline_header *th)
if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
th->flags |= TH_FLAGS_SME_ACTIVE;
- if (sev_es_active()) {
+ if (cc_platform_has(CC_ATTR_GUEST_STATE_ENCRYPT)) {
/*
* Skip the call to verify_cpu() in secondary_startup_64 as it
* will cause #VC exceptions when the AP can't handle them yet.