]> git.ipfire.org Git - thirdparty/qemu.git/commit
linux-user/elfload: Fix /proc/cpuinfo features: on s390x
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 27 Jun 2023 15:13:33 +0000 (17:13 +0200)
committerThomas Huth <thuth@redhat.com>
Tue, 18 Jul 2023 07:36:27 +0000 (09:36 +0200)
commit7f114a580710b3b2a7e3a3a30e2096e804b0fcb6
tree53888a9749b2eb5fccff4d78b42415fc65d5bfde
parentd9458f990afa1633b99d0d897d3e48689d6a01ed
linux-user/elfload: Fix /proc/cpuinfo features: on s390x

elf_hwcap_str() takes a bit number, but compares it for equality with
the HWCAP_S390_* masks. This causes /proc/cpuinfo to display incorrect
hwcaps.

Fix by introducing the HWCAP_S390_NR_* constants and using them in
elf_hwcap_str() instead of the HWCAP_S390_*. While at it, add the
missing nnpa, pcimio and sie hwcaps from the latest kernel.

Output before:

features : esan3 zarch stfle msa

Output after:

features : esan3 zarch stfle msa ldisp eimm etf3eh highgprs vx vxe

Fixes: e19807bee357 ("linux-user/elfload: Introduce elf_hwcap_str() on s390x")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230627151356.273259-1-iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
include/elf.h
linux-user/elfload.c