]> git.proxmox.com Git - mirror_qemu.git/commitdiff
linux-user/elfload: Expose get_elf_hwcap() on s390x
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 5 Jun 2023 11:39:48 +0000 (13:39 +0200)
committerThomas Huth <thuth@redhat.com>
Mon, 5 Jun 2023 18:48:34 +0000 (20:48 +0200)
It is required for implementing /proc/cpuinfo emulation.

Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230605113950.1169228-3-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
linux-user/elfload.c
linux-user/loader.h

index 418ad92598cc13348d9d6b1e45e2d5104caa6760..49ec9ccc944b59dadf5bc80fec7eff9da5cbb4a7 100644 (file)
@@ -1583,7 +1583,7 @@ static inline void init_thread(struct target_pt_regs *regs,
 #define GET_FEATURE(_feat, _hwcap) \
     do { if (s390_has_feat(_feat)) { hwcap |= _hwcap; } } while (0)
 
-static uint32_t get_elf_hwcap(void)
+uint32_t get_elf_hwcap(void)
 {
     /*
      * Let's assume we always have esan3 and zarch.
index f375ee0679b0d300eb626f91eab9e7dd93f62f1e..ad6ca9dbe3598d5d5edcbd1b59060f53e8956da0 100644 (file)
@@ -56,4 +56,8 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src,
 
 extern unsigned long guest_stack_size;
 
+#ifdef TARGET_S390X
+uint32_t get_elf_hwcap(void);
+#endif
+
 #endif /* LINUX_USER_LOADER_H */