From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [RFC PATCH 1/15]: PVH xen: turn gdb_frames/gdt_ents into union Date: Mon, 14 Jan 2013 16:45:14 -0800 Message-ID: <20130114164514.4a11db43@mantra.us.oracle.com> References: <20130111172522.6e73d884@mantra.us.oracle.com> <50F3F7AF02000078000B53DB@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <50F3F7AF02000078000B53DB@nat28.tlf.novell.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: Jan Beulich Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Mon, 14 Jan 2013 11:18:55 +0000 "Jan Beulich" wrote: > >>> On 12.01.13 at 02:25, Mukesh Rathor > >>> wrote: > > --- a/xen/include/public/arch-x86/xen.h Tue Oct 30 18:12:11 > > 2012 +0000 +++ b/xen/include/public/arch-x86/xen.h Fri Jan > > 11 16:19:40 2013 -0800 @@ -157,7 +157,16 @@ 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 { > > + /* GDT (machine frames, # ents) */ > > + unsigned long gdt_frames[16], gdt_ents; > > + } pv; > > + struct { > > + /* PVH: GDTR addr and size */ > > + unsigned long gdtaddr, gdtsz; > > + } pvh; > > + } u; > > This, being a public header, needs a __XEN_INTERFACE_VERSION__ > guard so that consumers updating the header (without updating > their interface version) would still build. Done. Thanks. +#if __XEN_INTERFACE_VERSION__ < 0x00040300 + unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */ +#else union { struct { /* GDT (machine frames, # ents) */ @@ -167,6 +170,7 @@ struct vcpu_guest_context { unsigned long gdtaddr, gdtsz; } pvh; } u; +#endif