Skip to contentSkip to conversation

x86: VMX: MSR_IA32_VMX_MISC[30] is not MBZ

PATCH Applied Nadav Amit 2 participants 2 messages Oct 3, 2019 KVM

lore
Share & tools
lore

Nadav Amit

author
#0 lore raw

PATCH 1/1 x86: VMX: MSR_IA32_VMX_MISC[30] is not MBZ

MSR_IA32_VMX_MISC[30] tells whehter "VM entry allows injection of a software interrupt, software exception, or privileged software exception with an instruction length of 0".

In other words, it is not MBZ (must be zero), so do not check that it is cleared.

---
 x86/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/vmx.c +1 -1
index d518102..647ab49 100644
@@ -1486,7 +1486,7 @@ static void test_vmx_caps(void)
 	report("MSR_IA32_VMX_MISC",
 	       (!(ctrl_cpu_rev[1].clr & CPU_URG) || val & (1ul << 5)) &&
 	       ((val >> 16) & 0x1ff) <= 256 &&
-	       (val & 0xc0007e00) == 0);
+	       (val & 0x80007e00) == 0);
 
 	for (n = 0; n < ARRAY_SIZE(vmx_ctl_msr); n++) {
 		ctrl.val = rdmsr(vmx_ctl_msr[n].index);
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 18 lines · Nadav Amit

MSR_IA32_VMX_MISC[30] tells whehter "VM entry allows injection of a software interrupt, software exception, or privileged software exception with an instruction length of 0".

In other words, it is not MBZ (must be zero), so do not check that it is cleared.

---
 x86/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/vmx.c +0 -0
index d518102..647ab49 100644

x86/vmx.c static void test_vmx_caps(void) · line 1492

Quoted 8 lines
x86/vmx.c +1 -1
@@ -1486,7 +1486,7 @@ static void test_vmx_caps(void)
 	report("MSR_IA32_VMX_MISC",
 	       (!(ctrl_cpu_rev[1].clr & CPU_URG) || val & (1ul << 5)) &&
 	       ((val >> 16) & 0x1ff) <= 256 &&
-	       (val & 0xc0007e00) == 0);
+	       (val & 0x80007e00) == 0);
 
 	for (n = 0; n < ARRAY_SIZE(vmx_ctl_msr); n++) {
 		ctrl.val = rdmsr(vmx_ctl_msr[n].index);

Queued, thanks.

Paolo