]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/cpufeatures: Add "Allowed SEV Features" Feature
authorKishon Vijay Abraham I <kvijayab@amd.com>
Mon, 10 Mar 2025 20:16:02 +0000 (15:16 -0500)
committerSean Christopherson <seanjc@google.com>
Fri, 25 Apr 2025 23:19:55 +0000 (16:19 -0700)
Add CPU feature detection for "Allowed SEV Features" to allow the
Hypervisor to enforce that SEV-ES and SEV-SNP guest VMs cannot
enable features (via SEV_FEATURES) that the Hypervisor does not
support or wish to be enabled.

Signed-off-by: Kishon Vijay Abraham I <kvijayab@amd.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Kim Phillips <kim.phillips@amd.com>
Link: https://lore.kernel.org/r/20250310201603.1217954-2-kim.phillips@amd.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/cpufeatures.h

index 6c2c152d8a67b9bf5836d4fe4860476684f282ff..e95a8e9ef22b36582ec09682e573ab0775cc24fd 100644 (file)
 #define X86_FEATURE_DEBUG_SWAP         (19*32+14) /* "debug_swap" SEV-ES full debug state swap support */
 #define X86_FEATURE_RMPREAD            (19*32+21) /* RMPREAD instruction */
 #define X86_FEATURE_SEGMENTED_RMP      (19*32+23) /* Segmented RMP support */
+#define X86_FEATURE_ALLOWED_SEV_FEATURES (19*32+27) /* Allowed SEV Features */
 #define X86_FEATURE_SVSM               (19*32+28) /* "svsm" SVSM present */
 #define X86_FEATURE_HV_INUSE_WR_ALLOWED        (19*32+30) /* Allow Write to in-use hypervisor-owned pages */