linux-user: elf: s390x: Prepare for Vector enhancements facility
authorDavid Hildenbrand <david@redhat.com>
Tue, 8 Jun 2021 09:23:35 +0000 (11:23 +0200)
committerCornelia Huck <cohuck@redhat.com>
Mon, 21 Jun 2021 06:48:21 +0000 (08:48 +0200)
Let's check for S390_FEAT_VECTOR_ENH and set HWCAP_S390_VXRS_EXT
accordingly. Add all missing HWCAP defined in upstream Linux.

Cc: Laurent Vivier <laurent@vivier.eu>
Acked-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20210608092337.12221-25-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
include/elf.h
linux-user/elfload.c

index 033bcc95767131f8ada30993700f0a64ecb2eca1..811bf4a1cb5cc9e271ac09c65b1554350a929c26 100644 (file)
@@ -605,6 +605,13 @@ typedef struct {
 #define HWCAP_S390_HIGH_GPRS    512
 #define HWCAP_S390_TE           1024
 #define HWCAP_S390_VXRS         2048
+#define HWCAP_S390_VXRS_BCD     4096
+#define HWCAP_S390_VXRS_EXT     8192
+#define HWCAP_S390_GS           16384
+#define HWCAP_S390_VXRS_EXT2    32768
+#define HWCAP_S390_VXRS_PDE     65536
+#define HWCAP_S390_SORT         131072
+#define HWCAP_S390_DFLT         262144
 
 /* M68K specific definitions. */
 /* We use the top 24 bits to encode information about the
index 17ab06f612dd811e55c744bbae8a7d82183c42b6..4b0172339eff37c46675e4e98877f629d635c56b 100644 (file)
@@ -1376,6 +1376,7 @@ static uint32_t get_elf_hwcap(void)
         hwcap |= HWCAP_S390_ETF3EH;
     }
     GET_FEATURE(S390_FEAT_VECTOR, HWCAP_S390_VXRS);
+    GET_FEATURE(S390_FEAT_VECTOR_ENH, HWCAP_S390_VXRS_EXT);
 
     return hwcap;
 }