Skip to contentSkip to conversation

x86: Fix allowed IA32_VMX_VMCS_ENUM values

PATCH Applied [email protected] 3 participants 3 messages Apr 15, 2019 – Apr 16, 2019 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Fix allowed IA32_VMX_VMCS_ENUM values

From: Nadav Amit <[email protected]>

According to the SDM, IA32_VMX_VMCS_ENUM indicates to software the highest index value used in the encoding of any field supported by the
processor: Bits 9:1 contain the highest index value used for any VMCS encoding.

---
 x86/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/vmx.c +1 -1
index 6ba56bc..f713ada 100644
@@ -1470,7 +1470,7 @@ static void test_vmx_caps(void)
 
 	val = rdmsr(MSR_IA32_VMX_VMCS_ENUM);
 	report("MSR_IA32_VMX_VMCS_ENUM",
-	       (val & 0x3e) >= 0x2a &&
+	       (val & 0x1fe) >= 0x2a &&
 	       (val & 0xfffffffffffffc01Ull) == 0);
 
 	val = rdmsr(MSR_IA32_VMX_EPT_VPID_CAP);
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Mon, Apr 15, 2019 at 03:21:04PM -0700, [email protected] wrote:

From: Nadav Amit <[email protected]>

According to the SDM, IA32_VMX_VMCS_ENUM indicates to software the highest index value used in the encoding of any field supported by the
processor: Bits 9:1 contain the highest index value used for any VMCS encoding.

---

maintainer Applied
#2 lore raw
In reply to [email protected]
Quoted 18 lines · On 16/04/19 00:21, [email protected] wrote:

From: Nadav Amit <[email protected]>

According to the SDM, IA32_VMX_VMCS_ENUM indicates to software the highest index value used in the encoding of any field supported by the
processor: Bits 9:1 contain the highest index value used for any VMCS encoding.

---
 x86/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
x86/vmx.c +0 -0
index 6ba56bc..f713ada 100644

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

Quoted 8 lines
x86/vmx.c +1 -1
@@ -1470,7 +1470,7 @@ static void test_vmx_caps(void)
 
 	val = rdmsr(MSR_IA32_VMX_VMCS_ENUM);
 	report("MSR_IA32_VMX_VMCS_ENUM",
-	       (val & 0x3e) >= 0x2a &&
+	       (val & 0x1fe) >= 0x2a &&
 	       (val & 0xfffffffffffffc01Ull) == 0);
 
 	val = rdmsr(MSR_IA32_VMX_EPT_VPID_CAP);

Queued, thanks.

Paolo