xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dongxiao Xu <dongxiao.xu@intel.com>
To: xen-devel@lists.xen.org
Cc: eddie.dong@intel.com, jun.nakajima@intel.com
Subject: [PATCH v3 03/11] nested vmx: expose bit 55 of IA32_VMX_BASIC_MSR to guest VMM
Date: Thu,  6 Dec 2012 09:09:21 +0800	[thread overview]
Message-ID: <1354756169-12370-4-git-send-email-dongxiao.xu@intel.com> (raw)
In-Reply-To: <1354756169-12370-1-git-send-email-dongxiao.xu@intel.com>

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 xen/arch/x86/hvm/vmx/vvmx.c        |    6 +++++-
 xen/include/asm-x86/hvm/vmx/vvmx.h |    6 ++++++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index eb10bbf..ec5e8a7 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -1311,9 +1311,10 @@ int nvmx_msr_read_intercept(unsigned int msr, u64 *msr_content)
     switch (msr) {
     case MSR_IA32_VMX_BASIC:
         data = VVMCS_REVISION | ((u64)PAGE_SIZE) << 32 | 
-               ((u64)MTRR_TYPE_WRBACK) << 50;
+               ((u64)MTRR_TYPE_WRBACK) << 50 | VMX_BASIC_DEFAULT1_ZERO;
         break;
     case MSR_IA32_VMX_PINBASED_CTLS:
+    case MSR_IA32_VMX_TRUE_PINBASED_CTLS:
         /* 1-seetings */
         data = PIN_BASED_EXT_INTR_MASK |
                PIN_BASED_NMI_EXITING |
@@ -1322,6 +1323,7 @@ int nvmx_msr_read_intercept(unsigned int msr, u64 *msr_content)
         data = ((data | tmp) << 32) | (tmp);
         break;
     case MSR_IA32_VMX_PROCBASED_CTLS:
+    case MSR_IA32_VMX_TRUE_PROCBASED_CTLS:
         /* 1-seetings */
         data = CPU_BASED_HLT_EXITING |
                CPU_BASED_VIRTUAL_INTR_PENDING |
@@ -1353,6 +1355,7 @@ int nvmx_msr_read_intercept(unsigned int msr, u64 *msr_content)
         data = (data << 32) | tmp;
         break;
     case MSR_IA32_VMX_EXIT_CTLS:
+    case MSR_IA32_VMX_TRUE_EXIT_CTLS:
         /* 1-seetings */
         tmp = VMX_EXIT_CTLS_DEFAULT1;
         data = VM_EXIT_ACK_INTR_ON_EXIT |
@@ -1367,6 +1370,7 @@ int nvmx_msr_read_intercept(unsigned int msr, u64 *msr_content)
         data = ((data | tmp) << 32) | tmp;
         break;
     case MSR_IA32_VMX_ENTRY_CTLS:
+    case MSR_IA32_VMX_TRUE_ENTRY_CTLS:
         /* 1-seetings */
         tmp = VMX_ENTRY_CTLS_DEFAULT1;
         data = VM_ENTRY_LOAD_GUEST_PAT |
diff --git a/xen/include/asm-x86/hvm/vmx/vvmx.h b/xen/include/asm-x86/hvm/vmx/vvmx.h
index dce2cd8..2caad9f 100644
--- a/xen/include/asm-x86/hvm/vmx/vvmx.h
+++ b/xen/include/asm-x86/hvm/vmx/vvmx.h
@@ -45,6 +45,12 @@ struct nestedvmx {
 /* bit 0-8, and 12 must be 1 */
 #define VMX_ENTRY_CTLS_DEFAULT1		0x11ff
 
+/* 
+ * bit 55 of IA32_VMX_BASIC MSR, indicating whether any VMX controls that
+ * default to 1 may be cleared to 0.
+ */
+#define VMX_BASIC_DEFAULT1_ZERO		(1ULL << 55)
+
 /*
  * Encode of VMX instructions base on Table 24-11 & 24-12 of SDM 3B
  */
-- 
1.7.1

  parent reply	other threads:[~2012-12-06  1:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06  1:09 [PATCH v3 00/11] nested vmx: bug fixes and feature enabling Dongxiao Xu
2012-12-06  1:09 ` [PATCH v3 01/11] nested vmx: emulate MSR bitmaps Dongxiao Xu
2012-12-06  1:09 ` [PATCH v3 02/11] nested vmx: use literal name instead of hard numbers Dongxiao Xu
2012-12-06  1:09 ` Dongxiao Xu [this message]
2012-12-06 11:45   ` [PATCH v3 03/11] nested vmx: expose bit 55 of IA32_VMX_BASIC_MSR to guest VMM Jan Beulich
2012-12-06 12:25     ` Xu, Dongxiao
2012-12-06  1:09 ` [PATCH v3 04/11] nested vmx: fix rflags status in virtual vmexit Dongxiao Xu
2012-12-06  1:09 ` [PATCH v3 05/11] nested vmx: fix handling of RDTSC Dongxiao Xu
2012-12-06  1:09 ` [PATCH v3 06/11] nested vmx: fix DR access VM exit Dongxiao Xu
2012-12-06  1:09 ` [PATCH v3 07/11] nested vmx: enable IA32E mode while do VM entry Dongxiao Xu
2012-12-06  1:09 ` [PATCH v3 08/11] nested vmx: enable "Virtualize APIC accesses" feature for L1 VMM Dongxiao Xu
2012-12-06  1:09 ` [PATCH v3 09/11] nested vmx: enable PAUSE and RDPMC exiting " Dongxiao Xu
2012-12-06  1:09 ` [PATCH v3 10/11] nested vmx: fix interrupt delivery to L2 guest Dongxiao Xu
2012-12-06  1:09 ` [PATCH v3 11/11] nested vmx: check host ability when intercept MSR read Dongxiao Xu
2012-12-06 11:49   ` Jan Beulich
2012-12-06 11:40 ` [PATCH v3 00/11] nested vmx: bug fixes and feature enabling Jan Beulich
2012-12-06 12:15   ` Xu, Dongxiao

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=1354756169-12370-4-git-send-email-dongxiao.xu@intel.com \
    --to=dongxiao.xu@intel.com \
    --cc=eddie.dong@intel.com \
    --cc=jun.nakajima@intel.com \
    --cc=xen-devel@lists.xen.org \
    /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).