From: "H. Peter Anvin" <hpa@zytor.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: x32-abi@googlegroups.com, "H.J. Lu" <hjl.tools@gmail.com>,
GCC Development <gcc@gcc.gnu.org>,
GNU C Library <libc-alpha@sourceware.org>,
LKML <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@linux.intel.com>
Subject: Re: X32 psABI status
Date: Sun, 13 Feb 2011 14:46:55 -0800 [thread overview]
Message-ID: <4D585F5F.6030708@zytor.com> (raw)
In-Reply-To: <201102132328.15360.arnd@arndb.de>
On 02/13/2011 02:28 PM, Arnd Bergmann wrote:
> On Sunday 13 February 2011, H. Peter Anvin wrote:
>> The actual idea is to use the i386 compat ABI for memory layout, but
>> with a 64-bit register convention. That means that system calls that
>> don't make references to memory structures can simply use the 64-bit
>> system calls, otherwise we're planning to reuse the i386 compat system
>> calls, but invoke them via the syscall instruction (which requires a new
>> system call table) and to pass 64-bit arguments in single registers.
>
> As far as I know, any task can already call both the 32 and 64 bit syscall
> entry points on x86. Is there anything you can't do just as well by
> using a combination of the two methods, without introducing a third one?
We prototyped using the int $0x80 system call entry point. However,
there are two disadvantages:
a. the int $0x80 instruction is much slower than syscall. An actual
i386 process can use the syscall instruction which is disambiguated
by the CPU based on mode, but an x32 process is in the same CPU mode
as a normal 64-bit process.
b. 64-bit arguments have to be split between two registers for the
i386 entry points, requiring user-space stubs.
All in all, the cost of an extra system call table is quite modest. The
cost of an entire different ABI layer (supporting a new memory layout)
would be enormous, a.k.a. "not worth it", which is why the memory layout
of kernel objects needs to be compatible with i386.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2011-02-13 22:47 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-12 19:41 X32 psABI status H.J. Lu
2011-02-12 21:10 ` Florian Weimer
2011-02-12 21:29 ` H.J. Lu
2011-02-12 23:04 ` H. Peter Anvin
2011-02-13 3:02 ` Andrew Pinski
2011-02-13 8:48 ` Florian Weimer
2011-02-13 13:45 ` H.J. Lu
2011-02-13 15:07 ` Florian Weimer
2011-02-13 15:13 ` H.J. Lu
2011-02-13 15:21 ` Florian Weimer
2011-02-13 15:37 ` H.J. Lu
2011-02-13 16:35 ` Petr Baudis
2011-02-13 16:48 ` H.J. Lu
2011-02-13 17:37 ` Joseph S. Myers
2011-02-13 15:43 ` Maciej W. Rozycki
2011-02-13 15:57 ` H.J. Lu
2011-02-13 20:10 ` Arnd Bergmann
2011-02-13 21:10 ` H.J. Lu
2011-02-13 21:16 ` H. Peter Anvin
2011-02-13 21:28 ` H.J. Lu
2011-02-13 22:03 ` H. Peter Anvin
2011-02-13 22:12 ` H.J. Lu
2011-02-13 21:33 ` Alan Cox
2011-02-14 1:52 ` H. Peter Anvin
2011-02-13 22:27 ` H. Peter Anvin
2011-02-13 22:28 ` Arnd Bergmann
2011-02-13 22:46 ` H. Peter Anvin [this message]
2011-02-13 22:57 ` Arnd Bergmann
2011-02-13 23:03 ` H.J. Lu
2011-02-13 23:39 ` Alan Cox
2011-02-13 23:50 ` H.J. Lu
2011-02-14 1:59 ` H. Peter Anvin
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=4D585F5F.6030708@zytor.com \
--to=hpa@zytor.com \
--cc=arnd@arndb.de \
--cc=gcc@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=hpa@linux.intel.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-kernel@vger.kernel.org \
--cc=x32-abi@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox