From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH 10/18 V2]: PVH xen: introduce vmx_pvh.c and pvh.c Date: Tue, 2 Apr 2013 18:42:07 -0700 Message-ID: <20130402184207.0bf73b9d@mantra.us.oracle.com> References: <20130315174145.4bc0e78f@mantra.us.oracle.com> <20130318163206.GM24560@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130318163206.GM24560@phenom.dumpdata.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: Konrad Rzeszutek Wilk Cc: "Xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Mon, 18 Mar 2013 12:32:06 -0400 Konrad Rzeszutek Wilk wrote: > On Fri, Mar 15, 2013 at 05:41:45PM -0700, Mukesh Rathor wrote: > > + tmp_ar = __vmread(GUEST_GS_AR_BYTES); > > + } else if (sel == (unsigned int)regs->fs) { > > + *base = __vmread(GUEST_FS_BASE); > > + *limit = __vmread(GUEST_FS_LIMIT); > > + tmp_ar = __vmread(GUEST_FS_AR_BYTES); > > + } else if (sel == (unsigned int)regs->es) { > > + *base = __vmread(GUEST_ES_BASE); > > + *limit = __vmread(GUEST_ES_LIMIT); > > + tmp_ar = __vmread(GUEST_ES_AR_BYTES); > > + } else { > > + printk("Unmatched segment selector:%d\n", sel); > > + return 0; > > + } > > + > > + if (tmp_ar & X86_SEG_AR_CS_LM_ACTIVE) { /* x86 > > mess!! */ > > + *base = 0UL; > > + *limit = ~0UL; > > + } > > + /* Fixup ar so that it looks the same as in native mode */ > > + *ar = (tmp_ar << 8); > > I am not sure I follow. Are you doing this to fit in the other bits > of the segment (the upper limit)? Shouldn't the caller of > vmx_pvh_read_descriptor do this? It follows the semantics of the existing read_descriptor() function. thanks Mukesh