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

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

To: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: 32/64-bit hypercall interface
From: Andi Kleen <ak@xxxxxxx>
Date: 04 Oct 2005 14:08:21 +0200
Cc: Jeremy Katz <katzj@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Delivery-date: Tue, 04 Oct 2005 12:05:54 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D32E11A@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D32E11A@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
"Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx> writes:
> 
> Just changing the tools API to all u64 seems pointless, as if you're
> using a 64 bit hypervisor it seems perfectly reasonable to insist on
> using 64 bit tools -- every other system binary on your 64 bit
> redhat/suse install is going to be specially compiled for 64 bit, so why
> not yout hypervisor tools! 

Actually a 64bit kernel works just fine with a full 32bit userland
(with only a few minor exception of some tools which were too broken
to be emulated - most notable one is iptables) People using
distributions where using true 64bit is unusually hard or broken (like on a
unnamed particular big community distribution) tend to use this setup.

I use it also regularly for testing.

On the other hand if the people need some tools as 64bit anyways
then they can install 64bit hypervisor tools too. If you do that
you should make it easy to install under a different prefix though.

> If we're going to make a change at all, switching to using ureg (or
> similar) rather than 'long' is the thing to do to. This makes the job of
> implementing some future compat layer very slightly easier, and helps
> the Power guys do their funky 64-bit-tools-as-a-32-bit-binary thing. [*]

There are some traps. e.g. i386 has a different alignment for u64 (4
bytes) rather than the natural 8 bytes used on 64bits which causes
many problems (like the iptables issue mentioned above). If you use
this way use a new type which is long long
__attribute__((aligned(8))), not just long long.

-Andi

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