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] [PATCH, fixed] linux/x86: use sysenter/syscall for 32-bi

To: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH, fixed] linux/x86: use sysenter/syscall for 32-bit apps on 64-bit Xen
From: Andi Kleen <ak@xxxxxxx>
Date: Wed, 24 Oct 2007 16:28:32 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 24 Oct 2007 07:29:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <471F6EEB.76E4.0078.0@xxxxxxxxxx>
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: SUSE Linux Products GmbH, Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg)
References: <46BAE3D7.76E4.0078.0@xxxxxxxxxx> <C344DFA6.17565%Keir.Fraser@xxxxxxxxxxxx> <471F6EEB.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
On Wednesday 24 October 2007 16:12:27 Jan Beulich wrote:
> >However, in case (2) the i386 guest kernel unconditionally goes for
> >sysenter, and the hypervisor will accept this because CPUID has advertised
> >SEP. *But* AMD CPUs do not support sysenter except in legacy mode! The
> >correct thing to do is to use syscall. The hypervisor 32-on-64 compat code
> >would accept CALLBACKTYPE_syscall, but the Linux i386 code here doesn't
> >appear to make use of it. So I would imagine that the i386 kernel running on
> >AMD hardware would cause all user processes to crash when they SYSENTER.
> 
> I intentionally avoided adding syscall stuff to the 32-bit kernel, since that 
> isn't
> there in the native kernel either (as it's not really usable on native). 
> Therefore  
> I'd suggest clearing SEP for pv32-on-64 guests in emulate_forced_invalid_op().

Perhaps pointing out the obvious; but your comment seems a little strange
or I am misunderstanding something. 

Of course does a 32bit kernel native kernel use  SYSENTER. 

The only CPU with SYSCALL and no SYSENTER was AMD K6, but there SYSCALL
was slightly different and unusable (IIRC).

So it always uses SYSENTER because it SYSCALL doesn't make sense.

But for compat tasks running on a 64bit kernel obviously SYSCALL
has to be used and that is what the native kernel does transparently 
using the  32bit vsyscall page.

-Andi


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