All of lore.kernel.org
 help / color / mirror / Atom feed
From: nadav.amit@gmail.com
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, Nadav Amit <nadav.amit@gmail.com>
Subject: [PATCH] x86: Fix allowed IA32_VMX_VMCS_ENUM values
Date: Mon, 15 Apr 2019 15:21:04 -0700	[thread overview]
Message-ID: <20190415222104.21367-1-nadav.amit@gmail.com> (raw)

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);
-- 
2.17.1


             reply	other threads:[~2019-04-15 22:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 22:21 nadav.amit [this message]
2019-04-15 23:29 ` [PATCH] x86: Fix allowed IA32_VMX_VMCS_ENUM values Sean Christopherson
2019-04-16  8:28 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190415222104.21367-1-nadav.amit@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.