Message ID | 20190415222104.21367-1-nadav.amit@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86: Fix allowed IA32_VMX_VMCS_ENUM values | expand |
On Mon, Apr 15, 2019 at 03:21:04PM -0700, nadav.amit@gmail.com wrote: > From: Nadav Amit <nadav.amit@gmail.com> > > 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. > > Signed-off-by: Nadav Amit <nadav.amit@gmail.com> > --- Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
On 16/04/19 00:21, nadav.amit@gmail.com wrote: > From: Nadav Amit <nadav.amit@gmail.com> > > 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. > > Signed-off-by: Nadav Amit <nadav.amit@gmail.com> > --- > x86/vmx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/x86/vmx.c b/x86/vmx.c > index 6ba56bc..f713ada 100644 > --- a/x86/vmx.c > +++ b/x86/vmx.c > @@ -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
diff --git a/x86/vmx.c b/x86/vmx.c index 6ba56bc..f713ada 100644 --- a/x86/vmx.c +++ b/x86/vmx.c @@ -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);