From: "Jan Beulich" Subject: Re: [V11 PATCH 19/21] PVH xen: VMX support of PVH guest creation/destruction Date: Fri, 23 Aug 2013 10:14:11 +0100 Message-ID: <5217440302000078000EDF4F@nat28.tlf.novell.com> References: <1377220750-19514-1-git-send-email-mukesh.rathor@oracle.com> <1377220750-19514-20-git-send-email-mukesh.rathor@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 1VCnRf-0003hw-5A for xen-devel@lists.xenproject.org; Fri, 23 Aug 2013 09:14:15 +0000 In-Reply-To: <1377220750-19514-20-git-send-email-mukesh.rathor@oracle.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: Mukesh Rathor Cc: xen-devel List-Id: xen-devel@lists.xenproject.org >>> 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? Jan