From: "Jan Beulich" Subject: Re: Is: PVH + ARM new hypercalls. Was: Re: [PATCH]: PVH: specify xen features strings cleany for PVH Date: Tue, 29 Jan 2013 10:48:12 +0000 Message-ID: <5107B6FC02000078000BA589@nat28.tlf.novell.com> References: <50FD3D6202000078000B7CE4@nat28.tlf.novell.com> <20130122151241.7ed034f4@mantra.us.oracle.com> <50FFABE702000078000B88E1@nat28.tlf.novell.com> <20130123144347.78ba0a3f@mantra.us.oracle.com> <51010A1802000078000B9027@nat28.tlf.novell.com> <20130124151336.311c3456@mantra.us.oracle.com> <51024A2602000078000B9786@nat28.tlf.novell.com> <1359108703.10051.5.camel@zakaz.uk.xensource.com> <51026C3602000078000B9911@nat28.tlf.novell.com> <1359110621.10051.25.camel@zakaz.uk.xensource.com> <20130128162607.GA7223@konrad-lan.dumpdata.com> <20130128185737.55ec65f8@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130128185737.55ec65f8@mantra.us.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: Konrad Rzeszutek Wilk , KonradRzeszutek Wilk , Ian Campbell , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 29.01.13 at 03:57, Mukesh Rathor wrote: > On xen side I added the ifdef: > > #if __XEN_INTERFACE_VERSION__ < 0x00040300 > unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) > */ > #else > 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; > #endif > > but it doesn't matter on linux side, so up to you. But I'd still prefer for this to go away again - you could simply use gdt_frames[0] for gdtaddr and gdt_ents for the (normalized) gdtsz. And if you nevertheless go the union route, call it "gdt" instead of "u" and drop the gdt/gdt_ prefixes from the member names (yes, I know, grepping and cscoping for such member is more difficult, but I continue to see more advantage in avoiding the redundancy). Jan