[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230227084016.3368-9-santosh.shukla@amd.com>
Date: Mon, 27 Feb 2023 14:10:13 +0530
From: Santosh Shukla <santosh.shukla@....com>
To: <kvm@...r.kernel.org>, <seanjc@...gle.com>
CC: <pbonzini@...hat.com>, <jmattson@...gle.com>, <joro@...tes.org>,
<linux-kernel@...r.kernel.org>, <mail@...iej.szmigiero.name>,
<mlevitsk@...hat.com>, <thomas.lendacky@....com>,
<vkuznets@...hat.com>
Subject: [PATCHv4 08/11] x86/cpu: Add CPUID feature bit for VNMI
VNMI feature allows the hypervisor to inject NMI into the guest w/o
using Event injection mechanism, The benefit of using VNMI over the
event Injection that does not require tracking the Guest's NMI state and
intercepting the IRET for the NMI completion. VNMI achieves that by
exposing 3 capability bits in VMCB intr_cntrl which helps with
virtualizing NMI injection and NMI_Masking.
The presence of this feature is indicated via the CPUID function
0x8000000A_EDX[25].
Reviewed-by: Maxim Levitsky <mlevitsk@...hat.com>
Signed-off-by: Santosh Shukla <santosh.shukla@....com>
---
arch/x86/include/asm/cpufeatures.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index cdb7e1492311..b3ae49f36008 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -365,6 +365,7 @@
#define X86_FEATURE_VGIF (15*32+16) /* Virtual GIF */
#define X86_FEATURE_X2AVIC (15*32+18) /* Virtual x2apic */
#define X86_FEATURE_V_SPEC_CTRL (15*32+20) /* Virtual SPEC_CTRL */
+#define X86_FEATURE_AMD_VNMI (15*32+25) /* Virtual NMI */
#define X86_FEATURE_SVME_ADDR_CHK (15*32+28) /* "" SVME addr check */
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 */
--
2.25.1
Powered by blists - more mailing lists