From: Nathan Lynch <ntl@pobox.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org, roland@redhat.com
Subject: AT_BASE_PLATFORM (v2)
Date: Tue, 15 Jul 2008 18:58:49 -0500 [thread overview]
Message-ID: <1216166331-14810-1-git-send-email-ntl@pobox.com> (raw)
Background:
Some IBM POWER-based systems have the ability to run in a
"compatibility" mode which mostly appears to the OS as a different
processor from the actual hardware. This feature of the platform is
useful for live partition migration and for backwards compatibility
with old kernels on new hardware. For example, a Power6 system may
appear to be a Power5+, which makes the AT_PLATFORM value "power5+".
Problem:
Booting a system in a compatibility mode means that ld.so may load
libraries that are inappropriately tuned for the real
microarchitecture, and apps that use JIT techniques do not have the
right information for generating tuned code. While the AT_PLATFORM
auxiliary vector entry correctly indicates the ISA supported, it does
not accurately reflect the underlying microarchitecture in this case,
and there is no good way for userspace to get this information.
Proposed solution:
Add an AT_BASE_PLATFORM auxiliary vector entry which indicates the
microarchitecture. This entry uses the same string format as
AT_PLATFORM, and is readily usable by ld.so and other applications.
Other solutions that have been suggested but found wanting:
- Use a bit in AT_HWCAP to indicate compat mode -- this is not
expressive enough. It's not possible to derive the microarchitecture
from the combination of AT_PLATFORM's value and a single bit.
- Use dsocaps -- this seems to be a ld.so-specific interface and not
easily usable by other programs. ld.so/glibc is not the only program
that can use knowledge of the microarchitecture.
The following two patches:
- add the base support to binfmt_elf.c for AT_BASE_PLATFORM
- implement AT_BASE_PLATFORM for powerpc
Changes since v1:
- increment AT_VECTOR_SIZE_BASE
- define AT_BASE_PLATFORM in generic code instead of powerpc
next reply other threads:[~2008-07-15 23:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 23:58 Nathan Lynch [this message]
2008-07-15 23:58 ` [PATCH] elf loader support for auxvec base platform string Nathan Lynch
2008-07-17 6:35 ` Benjamin Herrenschmidt
2008-07-17 7:09 ` Andrew Morton
2008-07-17 17:39 ` Nathan Lynch
2008-07-17 22:19 ` [PATCH v3] " Nathan Lynch
2008-07-17 22:42 ` Andrew Morton
2008-07-17 23:35 ` John Reiser
2008-07-18 18:28 ` Nathan Lynch
2008-07-18 20:31 ` John Reiser
2008-07-18 20:52 ` Andrew Morton
2008-07-21 3:24 ` Benjamin Herrenschmidt
2008-07-21 3:40 ` Andrew Morton
2008-07-21 9:33 ` Benjamin Herrenschmidt
2008-07-21 18:48 ` [PATCH v4] " Nathan Lynch
2008-07-22 2:03 ` Benjamin Herrenschmidt
2008-07-17 16:10 ` [PATCH] " Linus Torvalds
2008-07-17 19:35 ` Nathan Lynch
2008-07-21 3:19 ` Benjamin Herrenschmidt
2008-07-15 23:58 ` [PATCH] enable AT_BASE_PLATFORM aux vector for powerpc Nathan Lynch
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=1216166331-14810-1-git-send-email-ntl@pobox.com \
--to=ntl@pobox.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=roland@redhat.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;
as well as URLs for NNTP newsgroup(s).