From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Cc: sukadev@linux.vnet.ibm.com, npiggin@gmail.com
Subject: Re: powerpc/64s: Fix NULL AT_BASE_PLATFORM when using DT CPU features
Date: Wed, 14 Mar 2018 20:24:57 +1100 (AEDT) [thread overview]
Message-ID: <401RBx67Bzz9sVK@ozlabs.org> (raw)
In-Reply-To: <20180313231411.9537-1-mpe@ellerman.id.au>
On Tue, 2018-03-13 at 23:14:11 UTC, Michael Ellerman wrote:
> When running virtualised the powerpc kernel is able to run the system
> in "compat mode" - which means the kernel and hardware are pretending
> to userspace that the CPU is an older version than it actually is.
>
> AT_BASE_PLATFORM is an AUXV entry that we export to userspace for use
> when we're running in that mode, which tells userspace the "platform"
> string for the real CPU version, as opposed to the faked version.
>
> Although we don't support compat mode when using DT CPU features, and
> arguably don't need to set AT_BASE_PLATFORM, the existing cputable
> based code always sets it even when we're running bare metal. That
> means the lack of AT_BASE_PLATFORM is a user-visible artifact of the
> fact that the kernel is using DT CPU features, which we don't want.
>
> So set it in the DT CPU features code also.
>
> This results in eg:
> $ LD_SHOW_AUXV=1 /bin/true | grep "AT_.*PLATFORM"
> AT_PLATFORM: power9
> AT_BASE_PLATFORM:power9
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Applied to powerpc fixes.
https://git.kernel.org/powerpc/c/e4b79900222b8cccd4da4a7a89581f
cheers
prev parent reply other threads:[~2018-03-14 9:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 23:14 [PATCH] powerpc/64s: Fix NULL AT_BASE_PLATFORM when using DT CPU features Michael Ellerman
2018-03-13 23:36 ` Nicholas Piggin
2018-03-14 9:24 ` Michael Ellerman [this message]
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=401RBx67Bzz9sVK@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=sukadev@linux.vnet.ibm.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).