aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/mem_encrypt.c
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2022-02-24 10:55:49 -0600
committerBorislav Petkov <bp@suse.de>2022-04-06 13:02:34 +0200
commitf742b90e61bb53b27771f64bdae05db03a6ab1f2 (patch)
tree67e176343fb8dc60a5e69746f2b4e2c15fbb7056 /arch/x86/mm/mem_encrypt.c
parentx86/sev: Detect/setup SEV/SME features earlier in boot (diff)
downloadlinux-dev-f742b90e61bb53b27771f64bdae05db03a6ab1f2.tar.xz
linux-dev-f742b90e61bb53b27771f64bdae05db03a6ab1f2.zip
x86/mm: Extend cc_attr to include AMD SEV-SNP
The CC_ATTR_GUEST_SEV_SNP can be used by the guest to query whether the SNP (Secure Nested Paging) feature is active. Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20220307213356.2797205-10-brijesh.singh@amd.com
Diffstat (limited to 'arch/x86/mm/mem_encrypt.c')
-rw-r--r--arch/x86/mm/mem_encrypt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c
index 50d209939c66..f85868c031c6 100644
--- a/arch/x86/mm/mem_encrypt.c
+++ b/arch/x86/mm/mem_encrypt.c
@@ -62,6 +62,10 @@ static void print_mem_encrypt_feature_info(void)
if (cc_platform_has(CC_ATTR_GUEST_STATE_ENCRYPT))
pr_cont(" SEV-ES");
+ /* Secure Nested Paging */
+ if (cc_platform_has(CC_ATTR_GUEST_SEV_SNP))
+ pr_cont(" SEV-SNP");
+
pr_cont("\n");
}