x86/svm: Add Enumerations for the SVM virtual NMI

Introduce the cpuid bit for the SVM vNMI feature support for the x86\AMD
platforms. The feature support is indicated by the CPUID
Fn8000_000A_EDX[25] = 1.

Add defines for the three SVM's Virtual NMI (vNMI) managements bits in the
VMCB structure's vintr_t:

vintr_t(11) - Virtual NMI is pending.
vintr_t(12) - Virtual NMI is masked.
vintr_t(26) - Enable NMI virtualization.

Signed-off-by: Abdelkareem Abdelsaamad <abdelkareem.abdelsaamad@citrix.com>
Reviewed-by: Teddy Astie <teddy.astie@vates.tech>
Acked-by: Jan Beulich <jbeulich@suse.com>
master commit: 0294292b4c
master date: 2026-02-23 08:41:32 +0100
This commit is contained in:
Abdelkareem Abdelsaamad authored and Jan Beulich committed 2026-06-03 11:36:14 +02:00
1 parent 16e9e6245c
commit 02bcb4ece7
2 files changed
+8 -2

No files matched your search

+2
View File
@@ -37,6 +37,7 @@ extern u32 svm_feature_flags;
#define SVM_FEATURE_VGIF 16 /* Virtual GIF */
#define SVM_FEATURE_SSS 19 /* NPT Supervisor Shadow Stacks */
#define SVM_FEATURE_SPEC_CTRL 20 /* MSR_SPEC_CTRL virtualisation */
#define SVM_FEATURE_VNMI 25 /* Virtual NMI */
static inline bool cpu_has_svm_feature(unsigned int feat)
{
@@ -56,5 +57,6 @@ static inline bool cpu_has_svm_feature(unsigned int feat)
#define cpu_has_svm_vloadsave cpu_has_svm_feature(SVM_FEATURE_VLOADSAVE)
#define cpu_has_svm_sss cpu_has_svm_feature(SVM_FEATURE_SSS)
#define cpu_has_svm_spec_ctrl cpu_has_svm_feature(SVM_FEATURE_SPEC_CTRL)
#define cpu_has_svm_vnmi cpu_has_svm_feature(SVM_FEATURE_VNMI)
#endif /* __ASM_X86_HVM_SVM_H__ */
+6 -2
View File
@@ -338,13 +338,17 @@ typedef union
u64 tpr: 8;
u64 irq: 1;
u64 vgif: 1;
u64 rsvd0: 6;
u64 : 1;
u64 vnmi_pending: 1;
u64 vnmi_blocking:1;
u64 : 3;
u64 prio: 4;
u64 ign_tpr: 1;
u64 rsvd1: 3;
u64 intr_masking: 1;
u64 vgif_enable: 1;
u64 rsvd2: 6;
u64 vnmi_enable: 1;
u64 : 5;
u64 vector: 8;
u64 rsvd3: 24;
} fields;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.