From: Richard Henderson <rth@twiddle.net>
To: David Hildenbrand <david@redhat.com>, qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>, Riku Voipio <riku.voipio@iki.fi>,
Cornelia Huck <cohuck@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Laurent Vivier <laurent@vivier.eu>,
qemu-s390x@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v1] linux-user: elf: ELF_HWCAP for s390x
Date: Tue, 4 Jun 2019 08:00:20 -0500 [thread overview]
Message-ID: <a48caa15-dafa-2f03-9fd2-769adf613ed2@twiddle.net> (raw)
In-Reply-To: <20190604093656.23565-1-david@redhat.com>
On 6/4/19 4:36 AM, David Hildenbrand wrote:
> + if (s390_has_feat(S390_FEAT_ESAN3)) {
> + hwcap |= HWCAP_S390_ESAN3;
> + }
> + if (s390_has_feat(S390_FEAT_ZARCH)) {
> + hwcap |= HWCAP_S390_ZARCH;
> + }
While it's nice and symetrical testing these two features, I don't think they
can ever be false.
> + if (s390_has_feat(S390_FEAT_STFLE)) {
> + hwcap |= HWCAP_S390_STFLE;
> + }
> + if (s390_has_feat(S390_FEAT_MSA)) {
> + hwcap |= HWCAP_S390_MSA;
> + }
> + if (s390_has_feat(S390_FEAT_LONG_DISPLACEMENT)) {
> + hwcap |= HWCAP_S390_LDISP;
> + }
> + if (s390_has_feat(S390_FEAT_EXTENDED_IMMEDIATE)) {
> + hwcap |= HWCAP_S390_EIMM;
> + }
> + if (s390_has_feat(S390_FEAT_EXTENDED_TRANSLATION_3) &&
> + s390_has_feat(S390_FEAT_ETF3_ENH)) {
> + hwcap |= HWCAP_S390_ETF3EH;
> + }
> + /* 31-bit processes can use 64-bit registers */
> + hwcap |= HWCAP_S390_HIGH_GPRS;
And certainly this could never be set unless ZARCH, otherwise you have no
64-bit registers. ;-)
So maybe clearer to just start with
hwcap = HWCAP_S390_ESAN3 | HWCAP_S390_ZARCH | HWCAP_S390_HIGH_GPRS;
and continue from there.
Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2019-06-04 13:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 9:36 [Qemu-devel] [PATCH v1] linux-user: elf: ELF_HWCAP for s390x David Hildenbrand
2019-06-04 12:54 ` Laurent Vivier
2019-06-04 13:28 ` David Hildenbrand
2019-06-04 13:00 ` Richard Henderson [this message]
2019-06-04 13:27 ` David Hildenbrand
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=a48caa15-dafa-2f03-9fd2-769adf613ed2@twiddle.net \
--to=rth@twiddle.net \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=riku.voipio@iki.fi \
--cc=thuth@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 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.