WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] 32/64-bit hypercall interface - padding

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] 32/64-bit hypercall interface - padding
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Tue, 4 Oct 2005 11:07:58 -0500
Cc: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 04 Oct 2005 16:06:34 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <b5dd9fb6e98fefb024f3832a356f1d7b@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <A95E2296287EAD4EB592B5DEEFCE0E9D32E0D9@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <200510031416.10948.hollisb@xxxxxxxxxx> <b5dd9fb6e98fefb024f3832a356f1d7b@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.8.2
On Monday 03 October 2005 17:17, Keir Fraser wrote:
> On 3 Oct 2005, at 20:16, Hollis Blanchard wrote:
> >> However, since we're not actually changing the size of any types, this
> >> change isn't essential to rush through before 3.0, though it might be
> >> nice as it should be very low risk.
> >
> > I'm working on this patch now.
> >
>
> Well, at least this patch will be benign, but on its own it is also
> *totally* pointless. You can't use it to get 64-bit struct arrangement
> on 32-bit builds because it will leave pointers as 32-bit aligned and
> sized fields.

As part of the patch, I'm converting pointers to also use the new type, and 
casting the users appropriately.

> We could macro up pointer fields I suppose: 
> #define XENIF_PTR(type, name) type name
> So that macro can be overridden to get 64-bit sized and aligned pointer
> fields?

So you would use the above macro above for x86, and so continue with the 
existing unstable interface, but this would allow PPC to define its own 
macro, and thus have a 32/64-bit clean interface? Like this?
        #define XENIF_PTR(type, name) u64 name
And then casts would still be needed to work with those values, right?

> And ureg_t is a name that's bound to clash with something down the
> road. Maybe xenreg_t, or even just be explicit about what it is and
> call it xenif_ulong_t?

I don't like calling it a "ulong," because it isn't, and neither is it a 
"register" size...

-- 
Hollis Blanchard
IBM Linux Technology Center

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel