From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [V11 PATCH 19/21] PVH xen: VMX support of PVH guest creation/destruction Date: Fri, 23 Aug 2013 17:27:05 -0700 Message-ID: <20130823172705.7d19cf14@mantra.us.oracle.com> References: <1377220750-19514-1-git-send-email-mukesh.rathor@oracle.com> <1377220750-19514-20-git-send-email-mukesh.rathor@oracle.com> <5217440302000078000EDF4F@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VD1hU-0007VL-L6 for xen-devel@lists.xenproject.org; Sat, 24 Aug 2013 00:27:32 +0000 In-Reply-To: <5217440302000078000EDF4F@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: xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, 23 Aug 2013 10:14:11 +0100 "Jan Beulich" wrote: > >>> On 23.08.13 at 03:19, Mukesh Rathor > >>> wrote: > > static void vmx_update_guest_cr(struct vcpu *v, unsigned int cr) > > { > > + /* > > + * PVH guest never causes CR3 write vmexit. This is called > > during the guest > > + * setup. > > + */ > > + if ( is_pvh_vcpu(v) && cr != 3 ) > > + { > > + printk(XENLOG_G_ERR > > + "PVH: d%d v%d unexpected cr%d update at rip:%lx\n", > > + v->domain->domain_id, v->vcpu_id, cr, > > __vmread(GUEST_RIP)); > > + return; > > + } > > + > > vmx_vmcs_enter(v); > > > > switch ( cr ) > > @@ -1183,7 +1195,7 @@ static void vmx_update_guest_cr(struct vcpu > > *v, unsigned int cr) /* CR2 is updated in exit stub. */ > > break; > > case 3: > > - if ( paging_mode_hap(v->domain) ) > > + if ( paging_mode_hap(v->domain) && !is_pvh_vcpu(v) ) > > This seems redundant with the check above? We are trying to avoid unnecessary call to vmx_load_pdptrs(v). -Mukesh