From: "Jan Beulich" Subject: Re: [PATCH 01/17] [V3]PVH xen: turn gdb_frames/gdt_ents into union Date: Mon, 15 Apr 2013 15:54:59 +0100 Message-ID: <516C30E302000078000CD45F@nat28.tlf.novell.com> References: <1365814977-736-1-git-send-email-mukesh.rathor@oracle.com> <1365814977-736-2-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: <1365814977-736-2-git-send-email-mukesh.rathor@oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mukesh Rathor Cc: xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 13.04.13 at 03:02, Mukesh Rathor wrote: > --- a/xen/include/public/arch-x86/xen.h > +++ b/xen/include/public/arch-x86/xen.h > @@ -170,7 +170,21 @@ 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) */ > +#if __XEN_INTERFACE_VERSION__ < 0x00040300 Now that 4.3 isn't the goal anymore, this should be updated accordingly. > unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */ > +#else > + union { > + struct { > + /* GDT (machine frames, # ents) */ > + unsigned long frames[16], num_ents; > + } pv; > + struct { > + /* PVH: GDTR addr and size */ > + uint64_t addr; I'd have preferred you to call this "base", but anyway... Jan > + uint16_t limit; > + } pvh; > + } gdt; > +#endif > 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) */