Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/sev: Indicate the SEV-SNP guest supports Secure AVIC

Now that Secure AVIC support is complete, make it part of to the SNP present
features.

Co-developed-by: Kishon Vijay Abraham I <kvijayab@amd.com>
Signed-off-by: Kishon Vijay Abraham I <kvijayab@amd.com>
Signed-off-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tianyu Lan <tiala@microsoft.com>
Link: https://lore.kernel.org/20250828113225.209174-1-Neeraj.Upadhyay@amd.com

authored by

Neeraj Upadhyay and committed by
Borislav Petkov (AMD)
27a17e02 952aefee

+8 -1
+8 -1
arch/x86/boot/compressed/sev.c
··· 238 238 MSR_AMD64_SNP_SECURE_AVIC | \ 239 239 MSR_AMD64_SNP_RESERVED_MASK) 240 240 241 + #ifdef CONFIG_AMD_SECURE_AVIC 242 + #define SNP_FEATURE_SECURE_AVIC MSR_AMD64_SNP_SECURE_AVIC 243 + #else 244 + #define SNP_FEATURE_SECURE_AVIC 0 245 + #endif 246 + 241 247 /* 242 248 * SNP_FEATURES_PRESENT is the mask of SNP features that are implemented 243 249 * by the guest kernel. As and when a new feature is implemented in the 244 250 * guest kernel, a corresponding bit should be added to the mask. 245 251 */ 246 252 #define SNP_FEATURES_PRESENT (MSR_AMD64_SNP_DEBUG_SWAP | \ 247 - MSR_AMD64_SNP_SECURE_TSC) 253 + MSR_AMD64_SNP_SECURE_TSC | \ 254 + SNP_FEATURE_SECURE_AVIC) 248 255 249 256 u64 snp_get_unsupported_features(u64 status) 250 257 {