From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [V10 PATCH 10/23] PVH xen: domain create, context switch related code changes Date: Thu, 25 Jul 2013 18:02:44 -0700 Message-ID: <20130725180244.485912df@mantra.us.oracle.com> References: <1374631171-15224-1-git-send-email-mukesh.rathor@oracle.com> <1374631171-15224-11-git-send-email-mukesh.rathor@oracle.com> <20130725140157.GC87903@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130725140157.GC87903@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: Xen-devel@lists.xensource.com, keir.xen@gmail.com List-Id: xen-devel@lists.xenproject.org On Thu, 25 Jul 2013 15:01:57 +0100 Tim Deegan wrote: > At 18:59 -0700 on 23 Jul (1374605958), Mukesh Rathor wrote: > > @@ -861,7 +865,7 @@ int arch_set_info_guest( > > > > if ( !cr3_page ) > > rc = -EINVAL; > > - else if ( paging_mode_refcounts(d) ) > > + else if ( paging_mode_refcounts(d) || is_pvh_vcpu(v) ) > > Isn't paging_mode_refcounts() true for all PVH vcpus/domains? (This > code is OK - I just want to check that I've understood what's going > on.) Yes it is. > > /* nothing */; > > else if ( cr3_page == v->arch.old_guest_table ) > > { > > @@ -893,8 +897,15 @@ int arch_set_info_guest( > > /* handled below */; > > else if ( !compat ) > > { > > + /* PVH 32bitfixme. */ > > + if ( is_pvh_vcpu(v) ) > > + { > > + v->arch.cr3 = page_to_mfn(cr3_page); > > Not page_to_maddr()? I guess that with paging_mode_translate(), > arch.cr3 doesn't actually get used. Oops, yes, it should be page_to_maddr, and you just saved future debugging. > > + v->arch.hvm_vcpu.guest_cr[3] = c.nat->ctrlreg[3]; > > + } > > + > > v->arch.guest_table = pagetable_from_page(cr3_page); > > - if ( c.nat->ctrlreg[1] ) > > + if ( c.nat->ctrlreg[1] && !is_pvh_vcpu(v) ) > > If you're respinning this patch, maybe use is_pv_vcpu() here? Ok. thanks Mukesh