From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH v4 1/4] Nested VMX: check VMX capability before read VMX related MSRs Date: Mon, 23 Sep 2013 10:50:27 -0400 Message-ID: <52405533.6000805@oracle.com> References: <52402E3202000078000F5665@nat28.tlf.novell.com> <52402FA702000078000F568C@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VO7R3-0004iC-6E for xen-devel@lists.xenproject.org; Mon, 23 Sep 2013 14:48:25 +0000 In-Reply-To: <52402FA702000078000F568C@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Yang Z Zhang , xen-devel , Eddie Dong , Jun Nakajima List-Id: xen-devel@lists.xenproject.org On 09/23/2013 06:10 AM, Jan Beulich wrote: > --- a/xen/arch/x86/hvm/vmx/vvmx.c > +++ b/xen/arch/x86/hvm/vmx/vvmx.c > @@ -1813,12 +1813,33 @@ int nvmx_handle_invvpid(struct cpu_user_ > int nvmx_msr_read_intercept(unsigned int msr, u64 *msr_content) > { > struct vcpu *v = current; > + unsigned int ecx, dummy; > u64 data = 0, host_data = 0; > int r = 1; > > if ( !nestedhvm_enabled(v->domain) ) > return 0; > > + /* VMX capablity MSRs are available only when guest supports VMX. */ > + hvm_cpuid(0x1, &dummy, &dummy, &ecx, &dummy); Depending on order in which you are going to commit patches you could change hvm_cpuid() dummy arguments to NULLs to make use of your "make hvm_cpuid() ..." patch. In [3/4] as well. -boris