Skip to contentSkip to conversation

buildsys: Stop checking for ESA/390 host

PATCH In review Philippe Mathieu-Daudé 4 participants 13 messages May 19 – May 29 Block layer

lore
Share & tools
lore
#0 lore raw

v2 cover buildsys: Stop checking for ESA/390 host

- Fix MAINTAINERS entries
- Remove s390 check in ./configure
- Replace __s390__ -> __s390x__

Philippe Mathieu-Daudé (4):
MAINTAINERS: Fix s390x storage key/attribute device paths
MAINTAINERS: Fix tcg/s390x/ path
buildsys: Stop checking for ESA/390 host tests/tcg: Explicitly check for 64-bit z/Architecture

 MAINTAINERS                    |  6 +++---
 configure                      | 12 ++----------
 include/qemu/cacheflush.h      |  2 +-
 include/qemu/timer.h           |  2 +-
 tests/tcg/multiarch/nop_func.h |  2 +-
 block/file-posix.c             |  2 +-
 disas/disas-host.c             |  2 +-
 util/cacheflush.c              |  2 +-
 8 files changed, 11 insertions(+), 19 deletions(-)
Signature · 1 line
2.53.0
#1 lore raw

PATCH v2 1/4 MAINTAINERS: Fix s390x storage key/attribute device paths

Fixes 56e34834029 ("MAINTAINERS: split out s390x sections")
---
 MAINTAINERS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
MAINTAINERS +2 -2
index eda1e84268a..7749fe7f9bc 100644
@@ -2975,7 +2975,7 @@ M: Halil Pasic <[email protected]>
 M: Christian Borntraeger <[email protected]>
 R: Jason Herne <[email protected]>
 S: Supported
-F: hw/s390x/storage-keys.h
+F: include/hw/s390x/storage-keys.h
 F: hw/s390x/s390-skeys*.c
 L: [email protected]
 
@@ -2984,7 +2984,7 @@ M: Halil Pasic <[email protected]>
 M: Christian Borntraeger <[email protected]>
 R: Jason Herne <[email protected]>
 S: Supported
-F: hw/s390x/storage-attributes.h
+F: include/hw/s390x/storage-attributes.h
 F: hw/s390x/s390-stattrib*.c
 L: [email protected]
 
Signature · 1 line
2.53.0
Reviewed-by on v2 1/4
#2 lore raw

Re: [PATCH v2 1/4] MAINTAINERS: Fix s390x storage key/attribute device paths

Quoted 21 lines · Philippe Mathieu-Daudé
Fixes 56e34834029 ("MAINTAINERS: split out s390x sections")
---
  MAINTAINERS | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
MAINTAINERS +1 -1
index eda1e84268a..7749fe7f9bc 100644
@@ -2975,7 +2975,7 @@ M: Halil Pasic <[email protected]>
  M: Christian Borntraeger <[email protected]>
  R: Jason Herne <[email protected]>
  S: Supported
-F: hw/s390x/storage-keys.h
+F: include/hw/s390x/storage-keys.h
  F: hw/s390x/s390-skeys*.c
  L: [email protected]
 

MAINTAINERS M: Halil Pasic <[email protected]> · line 2989

Quoted 7 lines
MAINTAINERS +1 -1
@@ -2984,7 +2984,7 @@ M: Halil Pasic <[email protected]>
  M: Christian Borntraeger <[email protected]>
  R: Jason Herne <[email protected]>
  S: Supported
-F: hw/s390x/storage-attributes.h
+F: include/hw/s390x/storage-attributes.h
  F: hw/s390x/s390-stattrib*.c
  L: [email protected]
#3 lore raw

PATCH v2 2/4 MAINTAINERS: Fix tcg/s390x/ path

In reply to Philippe Mathieu-Daudé

This folder was renamed in commit 3704993f545 ("tcg/s390x: Rename from tcg/s390").

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
index 7749fe7f9bc..92b875ddfc1 100644
@@ -4180,7 +4180,7 @@ F: disas/riscv*.[ch]
 S390 TCG target
 M: Richard Henderson <[email protected]>
 S: Maintained
-F: tcg/s390/
+F: tcg/s390x/
 L: [email protected]
 
 SPARC TCG target
Signature · 1 line
2.53.0
Reviewed-by on v2 2/4
#4 lore raw

Re: [PATCH v2 2/4] MAINTAINERS: Fix tcg/s390x/ path

Quoted 8 lines · Philippe Mathieu-Daudé

This folder was renamed in commit 3704993f545 ("tcg/s390x: Rename from tcg/s390").

---
  MAINTAINERS | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

r~

Quoted 14 lines
MAINTAINERS +1 -1
index 7749fe7f9bc..92b875ddfc1 100644
@@ -4180,7 +4180,7 @@ F: disas/riscv*.[ch]
  S390 TCG target
  M: Richard Henderson <[email protected]>
  S: Maintained
-F: tcg/s390/
+F: tcg/s390x/
  L: [email protected]
 
  SPARC TCG target
Reviewed-by on v2 2/4
#5 lore raw

Re: [PATCH v2 2/4] MAINTAINERS: Fix tcg/s390x/ path

In reply to Philippe Mathieu-Daudé
Quoted 14 lines · Philippe Mathieu-Daudé

This folder was renamed in commit 3704993f545 ("tcg/s390x: Rename from tcg/s390").

---
  MAINTAINERS | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +0 -0
index 7749fe7f9bc..92b875ddfc1 100644

MAINTAINERS F: disas/riscv*.[ch] · line 4184

Quoted 6 lines
MAINTAINERS +1 -1
@@ -4180,7 +4180,7 @@ F: disas/riscv*.[ch]
  S390 TCG target
  M: Richard Henderson <[email protected]>
  S: Maintained
-F: tcg/s390/
+F: tcg/s390x/
  L: [email protected]
#6 lore raw

PATCH v2 3/4 buildsys: Stop checking for ESA/390 host

In reply to Philippe Mathieu-Daudé

We still build QEMU tools on 32-bit hosts (see commit cf634dfcd8f), however no OS supported by QEMU still runs on ESA/390 (Linux dropped support in release 4.1 in 2015).

Remove the configure check, directly checking for the 64-bit z/Architecture.

Also per commit 3704993f545 from 2020:

"we don't support s390, only 64-bit s390x hosts".

---
 configure                 | 12 ++----------
 include/qemu/cacheflush.h |  2 +-
 include/qemu/timer.h      |  2 +-
 block/file-posix.c        |  2 +-
 disas/disas-host.c        |  2 +-
 util/cacheflush.c         |  2 +-
 6 files changed, 7 insertions(+), 15 deletions(-)
configure +2 -10
index eea90306728..513ef7a153d 100755
@@ -401,12 +401,8 @@ elif check_define _ARCH_PPC64 ; then
   fi
 elif check_define __mips64 ; then
   cpu="mips64"
-elif check_define __s390__ ; then
-  if check_define __s390x__ ; then
-    cpu="s390x"
-  else
-    cpu="s390"
-  fi
+elif check_define __s390x__ ; then
+  cpu="s390x"
 elif check_define __riscv && check_define _LP64 ; then
   cpu="riscv64"
 elif check_define __aarch64__ ; then
@@ -469,10 +465,6 @@ case "$cpu" in
     linux_arch=riscv
     ;;
 
-  s390)
-    linux_arch=s390
-    CPU_CFLAGS="-m31"
-    ;;
   s390x)
     host_arch=s390x
     linux_arch=s390
include/qemu/cacheflush.h +1 -1
index 8c64b878145..0618966ddde 100644
@@ -19,7 +19,7 @@
  * mappings of the same physical page(s).
  */
 
-#if defined(__x86_64__) || defined(__s390__)
+#if defined(__x86_64__) || defined(__s390x__)
 
 static inline void flush_idcache_range(uintptr_t rx, uintptr_t rw, size_t len)
 {
include/qemu/timer.h +1 -1
index b931181f53d..fc021f8f966 100644
@@ -889,7 +889,7 @@ static inline int64_t cpu_get_host_ticks(void)
     return val;
 }
 
-#elif defined(__s390__)
+#elif defined(__s390x__)
 
 static inline int64_t cpu_get_host_ticks(void)
 {
block/file-posix.c +1 -1
index e49b13d6abb..5019ddade9b 100644
@@ -79,7 +79,7 @@
 #include <linux/hdreg.h>
 #include <linux/magic.h>
 #include <scsi/sg.h>
-#ifdef __s390__
+#ifdef __s390x__
 #include <asm/dasd.h>
 #endif
 #ifndef FS_NOCOW_FL
disas/disas-host.c +1 -1
index 7cf432938e0..d41235250a0 100644
@@ -74,7 +74,7 @@ static void initialize_debug_host(CPUDebug *s)
     s->info.print_insn = print_insn_little_mips;
 #elif defined(__m68k__)
     s->info.print_insn = print_insn_m68k;
-#elif defined(__s390__)
+#elif defined(__s390x__)
     s->info.cap_arch = CS_ARCH_SYSZ;
     s->info.cap_insn_unit = 2;
     s->info.cap_insn_split = 6;
util/cacheflush.c +1 -1
index c043c5f881a..77440ddb478 100644
@@ -223,7 +223,7 @@ static void __attribute__((constructor)) init_cache_info(void)
  * Architecture (+ OS) specific cache flushing mechanisms.
  */
 
-#if defined(__x86_64__) || defined(__s390__)
+#if defined(__x86_64__) || defined(__s390x__)
 
 /* Caches are coherent and do not require flushing; symbol inline. */
 
Signature · 1 line
2.53.0
Reviewed-by on v2 3/4
#7 lore raw
Quoted 12 lines · Philippe Mathieu-Daudé

We still build QEMU tools on 32-bit hosts (see commit cf634dfcd8f), however no OS supported by QEMU still runs on ESA/390 (Linux dropped support in release 4.1 in 2015).

Remove the configure check, directly checking for the 64-bit z/Architecture.

Also per commit 3704993f545 from 2020:

   "we don't support s390, only 64-bit s390x hosts".
Quoted 8 lines
---
  configure                 | 12 ++----------
  include/qemu/cacheflush.h |  2 +-
  include/qemu/timer.h      |  2 +-
  block/file-posix.c        |  2 +-
  disas/disas-host.c        |  2 +-
  util/cacheflush.c         |  2 +-
  6 files changed, 7 insertions(+), 15 deletions(-)

r~

Reviewed-by on v2 3/4
#8 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 3 lines · Philippe Mathieu-Daudé

We still build QEMU tools on 32-bit hosts (see commit cf634dfcd8f), however no OS supported by QEMU still runs on ESA/390 (Linux dropped support in release 4.1 in 2015).

Technically, the 64-bit Linux kernels on IBM Z still supported 32-bit userspace until recently:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8e0b986c59c67e08ada646249f834655a9e6da16

... which got released with Linux v6.19. So there theoretically could still be Linux distros around that use a 64-bit kernel with a 32-bit userspace. Practically, I haven't seens such a setup in ages, so I think it is safe to go ahead with this patch.

Thus:

Quoted 112 lines

Remove the configure check, directly checking for the 64-bit z/Architecture.

Also per commit 3704993f545 from 2020:

   "we don't support s390, only 64-bit s390x hosts".
---
  configure                 | 12 ++----------
  include/qemu/cacheflush.h |  2 +-
  include/qemu/timer.h      |  2 +-
  block/file-posix.c        |  2 +-
  disas/disas-host.c        |  2 +-
  util/cacheflush.c         |  2 +-
  6 files changed, 7 insertions(+), 15 deletions(-)
configure +2 -10
index eea90306728..513ef7a153d 100755
@@ -401,12 +401,8 @@ elif check_define _ARCH_PPC64 ; then
    fi
  elif check_define __mips64 ; then
    cpu="mips64"
-elif check_define __s390__ ; then
-  if check_define __s390x__ ; then
-    cpu="s390x"
-  else
-    cpu="s390"
-  fi
+elif check_define __s390x__ ; then
+  cpu="s390x"
  elif check_define __riscv && check_define _LP64 ; then
    cpu="riscv64"
  elif check_define __aarch64__ ; then
@@ -469,10 +465,6 @@ case "$cpu" in
      linux_arch=riscv
      ;;
 
-  s390)
-    linux_arch=s390
-    CPU_CFLAGS="-m31"
-    ;;
    s390x)
      host_arch=s390x
      linux_arch=s390
include/qemu/cacheflush.h +1 -1
index 8c64b878145..0618966ddde 100644
@@ -19,7 +19,7 @@
   * mappings of the same physical page(s).
   */
 
-#if defined(__x86_64__) || defined(__s390__)
+#if defined(__x86_64__) || defined(__s390x__)
 
  static inline void flush_idcache_range(uintptr_t rx, uintptr_t rw, size_t len)
  {
include/qemu/timer.h +1 -1
index b931181f53d..fc021f8f966 100644
@@ -889,7 +889,7 @@ static inline int64_t cpu_get_host_ticks(void)
      return val;
  }
 
-#elif defined(__s390__)
+#elif defined(__s390x__)
 
  static inline int64_t cpu_get_host_ticks(void)
  {
block/file-posix.c +1 -1
index e49b13d6abb..5019ddade9b 100644
@@ -79,7 +79,7 @@
  #include <linux/hdreg.h>
  #include <linux/magic.h>
  #include <scsi/sg.h>
-#ifdef __s390__
+#ifdef __s390x__
  #include <asm/dasd.h>
  #endif
  #ifndef FS_NOCOW_FL
disas/disas-host.c +1 -1
index 7cf432938e0..d41235250a0 100644
@@ -74,7 +74,7 @@ static void initialize_debug_host(CPUDebug *s)
      s->info.print_insn = print_insn_little_mips;
  #elif defined(__m68k__)
      s->info.print_insn = print_insn_m68k;
-#elif defined(__s390__)
+#elif defined(__s390x__)
      s->info.cap_arch = CS_ARCH_SYSZ;
      s->info.cap_insn_unit = 2;
      s->info.cap_insn_split = 6;
util/cacheflush.c +1 -1
index c043c5f881a..77440ddb478 100644
@@ -223,7 +223,7 @@ static void __attribute__((constructor)) init_cache_info(void)
   * Architecture (+ OS) specific cache flushing mechanisms.
   */
 
-#if defined(__x86_64__) || defined(__s390__)
+#if defined(__x86_64__) || defined(__s390x__)
 
  /* Caches are coherent and do not require flushing; symbol inline. */
 
#9 lore raw

PATCH v2 4/4 tests/tcg: Explicitly check for 64-bit z/Architecture

In reply to Philippe Mathieu-Daudé

We do not support the 32-bit ESA/390 target, only the 64-bit z/Architecture.

---
 tests/tcg/multiarch/nop_func.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/tcg/multiarch/nop_func.h +1 -1
index f714d210000..26d3a76eb62 100644
@@ -15,7 +15,7 @@ static const char nop_func[] = {
     0x1e, 0xff, 0x2f, 0xe1,     /* bx lr */
 #elif defined(__riscv)
     0x67, 0x80, 0x00, 0x00,     /* ret */
-#elif defined(__s390__)
+#elif defined(__s390x__)
     0x07, 0xfe,                 /* br %r14 */
 #elif defined(__i386__) || defined(__x86_64__)
     0xc3,                       /* ret */
Signature · 1 line
2.53.0
Reviewed-by on v2 4/4
#10 lore raw

Re: [PATCH v2 4/4] tests/tcg: Explicitly check for 64-bit z/Architecture

Quoted 13 lines · Philippe Mathieu-Daudé

We do not support the 32-bit ESA/390 target, only the 64-bit z/Architecture.

---
  tests/tcg/multiarch/nop_func.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tests/tcg/multiarch/nop_func.h +0 -0
index f714d210000..26d3a76eb62 100644

tests/tcg/multiarch/nop_func.h static const char nop_func[] = { · line 21

Quoted 8 lines
tests/tcg/multiarch/nop_func.h +1 -1
@@ -15,7 +15,7 @@ static const char nop_func[] = {
      0x1e, 0xff, 0x2f, 0xe1,     /* bx lr */
  #elif defined(__riscv)
      0x67, 0x80, 0x00, 0x00,     /* ret */
-#elif defined(__s390__)
+#elif defined(__s390x__)
      0x07, 0xfe,                 /* br %r14 */
  #elif defined(__i386__) || defined(__x86_64__)
      0xc3,                       /* ret */

r~

Reviewed-by on v2 4/4
#11 lore raw

Re: [PATCH v2 4/4] tests/tcg: Explicitly check for 64-bit z/Architecture

In reply to Philippe Mathieu-Daudé
Quoted 13 lines · Philippe Mathieu-Daudé

We do not support the 32-bit ESA/390 target, only the 64-bit z/Architecture.

---
  tests/tcg/multiarch/nop_func.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tests/tcg/multiarch/nop_func.h +0 -0
index f714d210000..26d3a76eb62 100644

tests/tcg/multiarch/nop_func.h static const char nop_func[] = { · line 21

Quoted 8 lines
tests/tcg/multiarch/nop_func.h +1 -1
@@ -15,7 +15,7 @@ static const char nop_func[] = {
      0x1e, 0xff, 0x2f, 0xe1,     /* bx lr */
  #elif defined(__riscv)
      0x67, 0x80, 0x00, 0x00,     /* ret */
-#elif defined(__s390__)
+#elif defined(__s390x__)
      0x07, 0xfe,                 /* br %r14 */
  #elif defined(__i386__) || defined(__x86_64__)
      0xc3,                       /* ret */
#12 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 10 lines · Philippe Mathieu-Daudé

- Fix MAINTAINERS entries
- Remove s390 check in ./configure
- Replace __s390__ -> __s390x__

Philippe Mathieu-Daudé (4):
MAINTAINERS: Fix s390x storage key/attribute device paths
MAINTAINERS: Fix tcg/s390x/ path
buildsys: Stop checking for ESA/390 host tests/tcg: Explicitly check for 64-bit z/Architecture

Quoted 10 lines
 MAINTAINERS                    |  6 +++---
 configure                      | 12 ++----------
 include/qemu/cacheflush.h      |  2 +-
 include/qemu/timer.h           |  2 +-
 tests/tcg/multiarch/nop_func.h |  2 +-
 block/file-posix.c             |  2 +-
 disas/disas-host.c             |  2 +-
 util/cacheflush.c              |  2 +-
 8 files changed, 11 insertions(+), 19 deletions(-)

Thanks, queued patches 1-3 (3 with context tweak) to s390-next.