From: "Jan Beulich" Subject: Re: [PATCH v3 03/11] nested vmx: expose bit 55 of IA32_VMX_BASIC_MSR to guest VMM Date: Thu, 06 Dec 2012 11:45:49 +0000 Message-ID: <50C0937D02000078000AE806@nat28.tlf.novell.com> References: <1354756169-12370-1-git-send-email-dongxiao.xu@intel.com> <1354756169-12370-4-git-send-email-dongxiao.xu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1354756169-12370-4-git-send-email-dongxiao.xu@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dongxiao Xu Cc: eddie.dong@intel.com, jun.nakajima@intel.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 06.12.12 at 02:09, Dongxiao Xu wrote: > --- 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 > */ I assume this relates to /* * To use EPT we expect to be able to clear certain intercepts. * We check VMX_BASIC_MSR[55] to correctly handle default controls. */ uint32_t must_be_one, must_be_zero, msr = MSR_IA32_VMX_PROCBASED_CTLS; if ( vmx_basic_msr_high & (1u << 23) ) msr = MSR_IA32_VMX_TRUE_PROCBASED_CTLS; in xen/arch/x86/hvm/vmx/vmcs.c. If so, please use the new constant there too, to point out that connection. That may require moving this to a different header file. Jan