[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/3] Nested VMX: Check VMX capability before read VMX related MSRs.
>>> On 05.09.13 at 04:57, Yang Zhang <yang.z.zhang@xxxxxxxxx> wrote: > --- a/xen/arch/x86/hvm/vmx/vvmx.c > +++ b/xen/arch/x86/hvm/vmx/vvmx.c > @@ -1820,6 +1820,24 @@ int nvmx_msr_read_intercept(unsigned int msr, u64 > *msr_content) > if ( !nestedhvm_enabled(v->domain) ) > return 0; > > + /* > + * VMX capablitys MSRs available only when guest > + * support VMX. > + */ > + hvm_cpuid(0x1, &eax, &ebx, &ecx, &edx); > + if ( !(ecx & cpufeat_mask(X86_FEATURE_VMXE)) ) > + return 0; > + > + /* > + * Those MSRs available only when bit 55 of > + * MSR_IA32_VMX_BASIC is set. > + */ > + rdmsrl(MSR_IA32_VMX_BASIC, data); > + if ( msr >= MSR_IA32_VMX_TRUE_PINBASED_CTLS && > + msr <= MSR_IA32_VMX_TRUE_ENTRY_CTLS && > + !(data & VMX_BASIC_DEFAULT1_ZERO) ) Indentation. Jan > + return 0; > + > rdmsrl(msr, host_data); > > /* _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |