From: Mukesh Rathor Subject: Re: [V10 PATCH 10/23] PVH xen: domain create, context switch related code changes Date: Wed, 7 Aug 2013 18:40:06 -0700 Message-ID: <20130807184006.14862c33@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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: "xen-devel@lists.xensource.com" , "keir.xen@gmail.com" List-Id: xen-devel@lists.xenproject.org On Wed, 7 Aug 2013 11:24:42 +0100 George Dunlap wrote: ......... > > index 412971e..ece11e4 100644 > > --- a/xen/arch/x86/mm.c > > +++ b/xen/arch/x86/mm.c > > @@ -4334,6 +4334,9 @@ void destroy_gdt(struct vcpu *v) > > int i; > > unsigned long pfn; > > > > + if ( is_pvh_vcpu(v) ) > > + return; > > There seems to be some inconsistency with where this is supposed to be > checked -- in domain_relinquish_resources(), destroy_gdt() is only > called for pv domains (gated on is_pv_domain); but in > arch_set_info_guest(), it *was* gated on being PV, but with the PVH > changes it's still being called. > > Either this should only be called for PV domains (and this check > should be an ASSERT), or it should be called regardless of the type of > domain. I prefer the first if possible. In the original version it was being called for pv domains only, and I had checks in the caller. But, Jan preferred the check in destroy_gdt() so I moved it to destroy_gdt(). thanks mukesh