From: Kishon Vijay Abraham I Date: Thu, 28 Aug 2025 11:13:15 +0000 (+0530) Subject: x86/sev: Enable NMI support for Secure AVIC X-Git-Tag: v6.18-rc1~185^2~7^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28bbfad229e4addf9990279c73c07b762b4a04e4;p=thirdparty%2Fkernel%2Fstable.git x86/sev: Enable NMI support for Secure AVIC Now that support to send NMI IPI and support to inject NMI from the hypervisor has been added, set V_NMI_ENABLE in the VINTR_CTRL field of the VMSA to enable NMI for Secure AVIC guests. [ bp: Zap useless brackets. ] Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Neeraj Upadhyay Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tianyu Lan Link: https://lore.kernel.org/20250828111315.208959-1-Neeraj.Upadhyay@amd.com --- diff --git a/arch/x86/coco/sev/core.c b/arch/x86/coco/sev/core.c index 37b1d41e68d0d..e4740611228dc 100644 --- a/arch/x86/coco/sev/core.c +++ b/arch/x86/coco/sev/core.c @@ -975,7 +975,7 @@ static int wakeup_cpu_via_vmgexit(u32 apic_id, unsigned long start_ip, unsigned vmsa->x87_fcw = AP_INIT_X87_FCW_DEFAULT; if (cc_platform_has(CC_ATTR_SNP_SECURE_AVIC)) - vmsa->vintr_ctrl |= V_GIF_MASK; + vmsa->vintr_ctrl |= V_GIF_MASK | V_NMI_ENABLE_MASK; /* SVME must be set. */ vmsa->efer = EFER_SVME;