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: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH, fixed] linux/x86: use sysenter/syscall for 32-bit apps on 64-bit Xen
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Wed, 24 Oct 2007 15:12:27 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Andi Kleen <ak@xxxxxxx>
Delivery-date: Wed, 24 Oct 2007 07:11:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C344DFA6.17565%Keir.Fraser@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>
References: <46BAE3D7.76E4.0078.0@xxxxxxxxxx> <C344DFA6.17565%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>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().

Jan


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