From: Ian Campbell Subject: Re: [PATCH v1 1/8]: PVH basic and hader file changes Date: Mon, 24 Sep 2012 12:29:19 +0100 Message-ID: <1348486159.3452.61.camel@zakaz.uk.xensource.com> References: <20120921121511.30001c08@mantra.us.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: Stefano Stabellini Cc: "Xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Mon, 2012-09-24 at 12:26 +0100, Stefano Stabellini wrote: > > diff --git a/arch/x86/include/asm/xen/interface.h b/arch/x86/include/asm/xen/interface.h > > index cbf0c9d..1d22131 100644 > > --- a/arch/x86/include/asm/xen/interface.h > > +++ b/arch/x86/include/asm/xen/interface.h > > @@ -136,7 +136,13 @@ struct vcpu_guest_context { > > struct cpu_user_regs user_regs; /* User-level CPU registers */ > > struct trap_info trap_ctxt[256]; /* Virtual IDT */ > > unsigned long ldt_base, ldt_ents; /* LDT (linear address, # ents) */ > > - unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */ > > + union { > > + struct { > > + /* PV: GDT (machine frames, # ents).*/ > > + unsigned long gdt_frames[16], gdt_ents; > > + }; > > + unsigned long gdtaddr, gdtsz; /* PVH: GDTR addr and size */ > > + }; > > unsigned long kernel_ss, kernel_sp; /* Virtual TSS (only SS1/SP1) */ > > /* NB. User pagetable on x86/64 is placed in ctrlreg[1]. */ > > unsigned long ctrlreg[8]; /* CR0-CR7 (control registers) */ > > I think I'll be fully able to understand what these are for only after I > read the Xen side patches... Also won't this cause gdtaddr and gdtsz to share the same storage, since they are immediately inside a union -- I suspect that isn't what was wanted!