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: <ak@xxxxxxx>
Subject: [Xen-devel] RE: 32/64-bit hypercall interface
From: "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Date: Tue, 4 Oct 2005 09:03:51 -0700
Cc: Jeremy Katz <katzj@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Delivery-date: Tue, 04 Oct 2005 16:39:35 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcXI3LfeNRJ1sq/pRp21wEVgezPMHgAF6bwg
Thread-topic: 32/64-bit hypercall interface
ak@xxxxxxx wrote:
> "Nakajima, Jun" <jun.nakajima@xxxxxxxxx> writes:
>> 
>> The 32-bit and 64-bit hypercall ABI cannot be identical on x86
>> because of the generic ABI difference between 32-bit and 64-bit.
> 
> You use a custom ABI for hypercalls anyways, so you can define
> it to be the same with some care. That is the approach that is
> used by some newer subsystems in the Linux kernel.
> 
In 32-bit, there are a couple of different instructions used for system
calls, e.g. "int N", sysenter, and syscall. Some x86 CPUs support only
sysenter, and some syscall, and "int N" is always available and it is
the one used for 32-bit hypercalls. In 64-bit, the situation is much
better, and we are using syscall for hypercalls, which is always
available and can be more efficient than "int N". 

I don't think we should use "int N" sacrificing the good feature for
64-bit when we can handle 32-bit hypercalls using a compatibility layer.
I also think using the existing ABI convention is much better whenever
possible and appropriate because we don't need to re-invent the wheel.
After all, the only difference between system call and hyper call
basically is the system/hypercall number.

> In my experience even people with the best intentions tend to get that
> wrong at some point because there are some subtle issues so having the
> additional safety net of a compat layer is still a good idea. It would
> only emulate the ones that went wrong.
> 
> -Andi

I agree. 

Jun
---
Intel Open Source Technology Center

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

<Prev in Thread] Current Thread [Next in Thread>