From: Yang Zhang <yang.z.zhang@intel.com>
To: xen-devel@lists.xensource.com
Cc: Yang Zhang <yang.z.zhang@Intel.com>,
Andrew.Cooper3@citrix.com, eddie.dong@intel.com,
JBeulich@suse.com
Subject: [PATCH v3 2/3] Nested VMX: Clear bit 31 of IA32_VMX_BASIC MSR
Date: Wed, 11 Sep 2013 10:52:39 +0800 [thread overview]
Message-ID: <1378867960-10950-3-git-send-email-yang.z.zhang@intel.com> (raw)
In-Reply-To: <1378867960-10950-1-git-send-email-yang.z.zhang@intel.com>
From: Yang Zhang <yang.z.zhang@Intel.com>
The bit 31 of revision_id will set to 1 if vmcs shadowing enabled. And
according intel SDM, the bit 31 of IA32_VMX_BASIC MSR is always 0. So we
cannot set low 32 bit of IA32_VMX_BASIC to revision_id directly. Must clear
the bit 31 to 0.
Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
xen/arch/x86/hvm/vmx/vvmx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index 554d5c0..48cfbc6 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1850,7 +1850,7 @@ int nvmx_msr_read_intercept(unsigned int msr, u64 *msr_content)
switch (msr) {
case MSR_IA32_VMX_BASIC:
data = (host_data & (~0ul << 32)) |
- ((v->arch.hvm_vmx.vmcs)->vmcs_revision_id);
+ (v->arch.hvm_vmx.vmcs->vmcs_revision_id & 0x7fffffff);
break;
case MSR_IA32_VMX_PINBASED_CTLS:
case MSR_IA32_VMX_TRUE_PINBASED_CTLS:
--
1.7.1
next prev parent reply other threads:[~2013-09-11 2:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 2:52 [PATCH v3 0/3] Nested VMX: fix bugs when reading VMX MSRs Yang Zhang
2013-09-11 2:52 ` [PATCH v3 1/3] Nested VMX: Check VMX capability before read VMX related MSRs Yang Zhang
2013-09-11 7:31 ` Jan Beulich
2013-09-11 8:35 ` Andrew Cooper
2013-09-11 8:47 ` Zhang, Yang Z
2013-09-11 2:52 ` Yang Zhang [this message]
2013-09-11 7:31 ` [PATCH v3 2/3] Nested VMX: Clear bit 31 of IA32_VMX_BASIC MSR Jan Beulich
2013-09-11 2:52 ` [PATCH v3 3/3] Nested VMX: Fix IA32_VMX_CR4_FIXED1 msr emulation Yang Zhang
2013-09-11 7:39 ` Jan Beulich
2013-09-17 2:25 ` Zhang, Yang Z
2013-09-17 6:21 ` Jan Beulich
2013-09-22 5:34 ` Zhang, Yang Z
2013-09-23 10:15 ` Jan Beulich
2013-09-24 1:19 ` Zhang, Yang Z
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=1378867960-10950-3-git-send-email-yang.z.zhang@intel.com \
--to=yang.z.zhang@intel.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=eddie.dong@intel.com \
--cc=xen-devel@lists.xensource.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).