x86/cpufeatures: Enable/unmask SEV-SNP CPU feature
authorMichael Roth <michael.roth@amd.com>
Fri, 26 Jan 2024 04:11:22 +0000 (22:11 -0600)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 29 Jan 2024 19:34:19 +0000 (20:34 +0100)
With all the required host changes in place, it should now be possible
to initialize SNP-related MSR bits, set up RMP table enforcement, and
initialize SNP support in firmware while maintaining legacy support for
SEV/SEV-ES guests. Go ahead and enable the SNP feature now.

Signed-off-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20240126041126.1927228-23-michael.roth@amd.com
arch/x86/include/asm/disabled-features.h

index fc13bf759e3e2cff36197f24c22f1d2344e1ac2b..3332d2940020615229f2dd54863705af58a48c6d 100644 (file)
 #define DISABLE_IBT    (1 << (X86_FEATURE_IBT & 31))
 #endif
 
+#ifdef CONFIG_KVM_AMD_SEV
+#define DISABLE_SEV_SNP                0
+#else
 #define DISABLE_SEV_SNP                (1 << (X86_FEATURE_SEV_SNP & 31))
+#endif
 
 /*
  * Make sure to add features to the correct mask