diff options
author | Brijesh Singh <brijesh.singh@amd.com> | 2022-02-24 19:55:49 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2022-04-06 14:02:34 +0300 |
commit | f742b90e61bb53b27771f64bdae05db03a6ab1f2 (patch) | |
tree | 67e176343fb8dc60a5e69746f2b4e2c15fbb7056 /arch/x86/coco | |
parent | bcce829083339bf862d66df602cbb111943da8fb (diff) | |
download | linux-f742b90e61bb53b27771f64bdae05db03a6ab1f2.tar.xz |
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/coco')
-rw-r--r-- | arch/x86/coco/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/coco/core.c b/arch/x86/coco/core.c index fc1365dd927e..dafd4881ce29 100644 --- a/arch/x86/coco/core.c +++ b/arch/x86/coco/core.c @@ -57,6 +57,9 @@ static bool amd_cc_platform_has(enum cc_attr attr) return (sev_status & MSR_AMD64_SEV_ENABLED) && !(sev_status & MSR_AMD64_SEV_ES_ENABLED); + case CC_ATTR_GUEST_SEV_SNP: + return sev_status & MSR_AMD64_SEV_SNP_ENABLED; + default: return false; } |