On 6/27/23 17:13, Ilya Leoshkevich wrote:
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<i...@linux.ibm.com>
---
  include/elf.h        | 66 +++++++++++++++++++++++++++++++-------------
  linux-user/elfload.c | 41 ++++++++++++++-------------
  2 files changed, 69 insertions(+), 38 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to