From: Andi Kleen <ak@suse.de>
To: Jan Beulich <jbeulich@novell.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH, fixed] linux/x86: use sysenter/syscall for 32-bit apps on 64-bit Xen
Date: Wed, 24 Oct 2007 16:28:32 +0200 [thread overview]
Message-ID: <200710241628.32900.ak@suse.de> (raw)
In-Reply-To: <471F6EEB.76E4.0078.0@novell.com>
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
next prev parent reply other threads:[~2007-10-24 14:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-09 7:52 [PATCH, fixed] linux/x86: use sysenter/syscall for 32-bit apps on 64-bit Xen Jan Beulich
2007-10-24 10:40 ` Keir Fraser
2007-10-24 14:12 ` Jan Beulich
2007-10-24 14:12 ` Keir Fraser
2007-10-24 14:28 ` Andi Kleen [this message]
2007-10-24 14:31 ` Keir Fraser
-- strict thread matches above, loose matches on Subject: below --
2007-10-24 14:15 Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710241628.32900.ak@suse.de \
--to=ak@suse.de \
--cc=jbeulich@novell.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.