* [PATCH 0/3] linux-user, configure: fix CPU canonicalization
@ 2023-08-07 9:48 Paolo Bonzini
2023-08-07 9:48 ` [PATCH 1/3] configure: fix detection for x32 linux-user Paolo Bonzini
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Paolo Bonzini @ 2023-08-07 9:48 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, philmd
The CPU model has to be canonicalized to what Meson wants in the cross
file, to what Linux uses for its asm-$ARCH directories, and to what
QEMU uses for its user-mode emulation host/$ARCH directories. Do
all three in a single case statement, and check that the Linux and
QEMU directories actually exist.
At a small cost in repeated lines, this ensures that there are no hidden
ordering requirements between the case statements. In particular, commit
89e5b7935e9 ("configure: Fix linux-user host detection for riscv64",
2023-08-06) broke ppc64le because it assigned host_arch based on a
non-canonicalized version of $cpu.
While doing this, I noticed that linux-user won't work on x32, alpha
and 32-bit s390 these days, due to missing common-user/ fragments.
The first two patches clean up the directories.
Paolo Bonzini (3):
linux-user: fix detection for x32
linux-user: cleanup unused linux-user/include/host directories
configure: unify case statements for CPU canonicalization
configure | 157 +++++++++++---------
linux-user/include/host/alpha/host-signal.h | 55 -------
linux-user/include/host/s390/host-signal.h | 138 -----------------
linux-user/include/host/x32/host-signal.h | 1 -
4 files changed, 87 insertions(+), 264 deletions(-)
delete mode 100644 linux-user/include/host/alpha/host-signal.h
delete mode 100644 linux-user/include/host/s390/host-signal.h
delete mode 100644 linux-user/include/host/x32/host-signal.h
--
2.41.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/3] configure: fix detection for x32 linux-user
2023-08-07 9:48 [PATCH 0/3] linux-user, configure: fix CPU canonicalization Paolo Bonzini
@ 2023-08-07 9:48 ` Paolo Bonzini
2023-08-10 10:31 ` Philippe Mathieu-Daudé
2023-08-07 9:48 ` [PATCH 2/3] linux-user: cleanup unused linux-user/include/host directories Paolo Bonzini
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2023-08-07 9:48 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, philmd
x32 uses the same signal handling fragments as x86_64, since host_arch
is set to x86_64 when Meson runs. Remove the unnecessary forwarder and
set the host_arch variable properly in configure.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 2 ++
linux-user/include/host/x32/host-signal.h | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
delete mode 100644 linux-user/include/host/x32/host-signal.h
diff --git a/configure b/configure
index 98dc78280e6..484d38d81f4 100755
--- a/configure
+++ b/configure
@@ -472,6 +472,8 @@ fi
case "$cpu" in
riscv*)
host_arch=riscv ;;
+ x32)
+ host_arch=x86_64 ;;
*)
host_arch="$cpu" ;;
esac
diff --git a/linux-user/include/host/x32/host-signal.h b/linux-user/include/host/x32/host-signal.h
deleted file mode 100644
index 26800591d3b..00000000000
--- a/linux-user/include/host/x32/host-signal.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "../x86_64/host-signal.h"
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/3] linux-user: cleanup unused linux-user/include/host directories
2023-08-07 9:48 [PATCH 0/3] linux-user, configure: fix CPU canonicalization Paolo Bonzini
2023-08-07 9:48 ` [PATCH 1/3] configure: fix detection for x32 linux-user Paolo Bonzini
@ 2023-08-07 9:48 ` Paolo Bonzini
2023-08-07 16:53 ` Ilya Leoshkevich
2023-08-07 9:48 ` [PATCH 3/3] configure: unify case statements for CPU canonicalization Paolo Bonzini
2023-08-07 16:13 ` [PATCH 0/3] linux-user, configure: fix " Richard Henderson
3 siblings, 1 reply; 11+ messages in thread
From: Paolo Bonzini @ 2023-08-07 9:48 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, philmd
Alpha and 31-bit s390 lack the assembly fragment to handle signals
occurring at the same time as system calls, so they cannot run
linux-user emulation anymore. Drop the host-signal.h files for
them.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
linux-user/include/host/alpha/host-signal.h | 55 --------
linux-user/include/host/s390/host-signal.h | 138 --------------------
2 files changed, 193 deletions(-)
delete mode 100644 linux-user/include/host/alpha/host-signal.h
delete mode 100644 linux-user/include/host/s390/host-signal.h
diff --git a/linux-user/include/host/alpha/host-signal.h b/linux-user/include/host/alpha/host-signal.h
deleted file mode 100644
index 4f9e2abc4b0..00000000000
--- a/linux-user/include/host/alpha/host-signal.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * host-signal.h: signal info dependent on the host architecture
- *
- * Copyright (c) 2003-2005 Fabrice Bellard
- * Copyright (c) 2021 Linaro Limited
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING file in the top-level directory.
- */
-
-#ifndef ALPHA_HOST_SIGNAL_H
-#define ALPHA_HOST_SIGNAL_H
-
-/* The third argument to a SA_SIGINFO handler is ucontext_t. */
-typedef ucontext_t host_sigcontext;
-
-static inline uintptr_t host_signal_pc(host_sigcontext *uc)
-{
- return uc->uc_mcontext.sc_pc;
-}
-
-static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
-{
- uc->uc_mcontext.sc_pc = pc;
-}
-
-static inline void *host_signal_mask(host_sigcontext *uc)
-{
- return &uc->uc_sigmask;
-}
-
-static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
-{
- uint32_t *pc = (uint32_t *)host_signal_pc(uc);
- uint32_t insn = *pc;
-
- /* XXX: need kernel patch to get write flag faster */
- switch (insn >> 26) {
- case 0x0d: /* stw */
- case 0x0e: /* stb */
- case 0x0f: /* stq_u */
- case 0x24: /* stf */
- case 0x25: /* stg */
- case 0x26: /* sts */
- case 0x27: /* stt */
- case 0x2c: /* stl */
- case 0x2d: /* stq */
- case 0x2e: /* stl_c */
- case 0x2f: /* stq_c */
- return true;
- }
- return false;
-}
-
-#endif
diff --git a/linux-user/include/host/s390/host-signal.h b/linux-user/include/host/s390/host-signal.h
deleted file mode 100644
index e6d3ec26dc7..00000000000
--- a/linux-user/include/host/s390/host-signal.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * host-signal.h: signal info dependent on the host architecture
- *
- * Copyright (c) 2003-2005 Fabrice Bellard
- * Copyright (c) 2021 Linaro Limited
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING file in the top-level directory.
- */
-
-#ifndef S390_HOST_SIGNAL_H
-#define S390_HOST_SIGNAL_H
-
-/* The third argument to a SA_SIGINFO handler is ucontext_t. */
-typedef ucontext_t host_sigcontext;
-
-static inline uintptr_t host_signal_pc(host_sigcontext *uc)
-{
- return uc->uc_mcontext.psw.addr;
-}
-
-static inline void host_signal_set_pc(host_sigcontext *uc, uintptr_t pc)
-{
- uc->uc_mcontext.psw.addr = pc;
-}
-
-static inline void *host_signal_mask(host_sigcontext *uc)
-{
- return &uc->uc_sigmask;
-}
-
-static inline bool host_signal_write(siginfo_t *info, host_sigcontext *uc)
-{
- uint16_t *pinsn = (uint16_t *)host_signal_pc(uc);
-
- /*
- * ??? On linux, the non-rt signal handler has 4 (!) arguments instead
- * of the normal 2 arguments. The 4th argument contains the "Translation-
- * Exception Identification for DAT Exceptions" from the hardware (aka
- * "int_parm_long"), which does in fact contain the is_write value.
- * The rt signal handler, as far as I can tell, does not give this value
- * at all. Not that we could get to it from here even if it were.
- * So fall back to parsing instructions. Treat read-modify-write ones as
- * writes, which is not fully correct, but for tracking self-modifying code
- * this is better than treating them as reads. Checking si_addr page flags
- * might be a viable improvement, albeit a racy one.
- */
- /* ??? This is not even close to complete. */
- switch (pinsn[0] >> 8) {
- case 0x50: /* ST */
- case 0x42: /* STC */
- case 0x40: /* STH */
- case 0x44: /* EX */
- case 0xba: /* CS */
- case 0xbb: /* CDS */
- return true;
- case 0xc4: /* RIL format insns */
- switch (pinsn[0] & 0xf) {
- case 0xf: /* STRL */
- case 0xb: /* STGRL */
- case 0x7: /* STHRL */
- return true;
- }
- break;
- case 0xc6: /* RIL-b format insns */
- switch (pinsn[0] & 0xf) {
- case 0x0: /* EXRL */
- return true;
- }
- break;
- case 0xc8: /* SSF format insns */
- switch (pinsn[0] & 0xf) {
- case 0x2: /* CSST */
- return true;
- }
- break;
- case 0xe3: /* RXY format insns */
- switch (pinsn[2] & 0xff) {
- case 0x50: /* STY */
- case 0x24: /* STG */
- case 0x72: /* STCY */
- case 0x70: /* STHY */
- case 0x8e: /* STPQ */
- case 0x3f: /* STRVH */
- case 0x3e: /* STRV */
- case 0x2f: /* STRVG */
- return true;
- }
- break;
- case 0xe6:
- switch (pinsn[2] & 0xff) {
- case 0x09: /* VSTEBRH */
- case 0x0a: /* VSTEBRG */
- case 0x0b: /* VSTEBRF */
- case 0x0e: /* VSTBR */
- case 0x0f: /* VSTER */
- case 0x3f: /* VSTRLR */
- return true;
- }
- break;
- case 0xe7:
- switch (pinsn[2] & 0xff) {
- case 0x08: /* VSTEB */
- case 0x09: /* VSTEH */
- case 0x0a: /* VSTEG */
- case 0x0b: /* VSTEF */
- case 0x0e: /* VST */
- case 0x1a: /* VSCEG */
- case 0x1b: /* VSCEF */
- case 0x3e: /* VSTM */
- case 0x3f: /* VSTL */
- return true;
- }
- break;
- case 0xeb: /* RSY format insns */
- switch (pinsn[2] & 0xff) {
- case 0x14: /* CSY */
- case 0x30: /* CSG */
- case 0x31: /* CDSY */
- case 0x3e: /* CDSG */
- case 0xe4: /* LANG */
- case 0xe6: /* LAOG */
- case 0xe7: /* LAXG */
- case 0xe8: /* LAAG */
- case 0xea: /* LAALG */
- case 0xf4: /* LAN */
- case 0xf6: /* LAO */
- case 0xf7: /* LAX */
- case 0xfa: /* LAAL */
- case 0xf8: /* LAA */
- return true;
- }
- break;
- }
- return false;
-}
-
-#endif
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/3] configure: unify case statements for CPU canonicalization
2023-08-07 9:48 [PATCH 0/3] linux-user, configure: fix CPU canonicalization Paolo Bonzini
2023-08-07 9:48 ` [PATCH 1/3] configure: fix detection for x32 linux-user Paolo Bonzini
2023-08-07 9:48 ` [PATCH 2/3] linux-user: cleanup unused linux-user/include/host directories Paolo Bonzini
@ 2023-08-07 9:48 ` Paolo Bonzini
2023-08-07 13:35 ` Paolo Bonzini
2023-08-07 13:45 ` Peter Maydell
2023-08-07 16:13 ` [PATCH 0/3] linux-user, configure: fix " Richard Henderson
3 siblings, 2 replies; 11+ messages in thread
From: Paolo Bonzini @ 2023-08-07 9:48 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, philmd, Joel Stanley
The CPU model has to be canonicalized to what Meson wants in the cross
file, to what Linux uses for its asm-$ARCH directories, and to what
QEMU uses for its user-mode emulation host/$ARCH directories. Do
all three in a single case statement, and check that the Linux and
QEMU directories actually exist.
At a small cost in repeated lines, this ensures that there are no hidden
ordering requirements between the case statements. In particular, commit
89e5b7935e9 ("configure: Fix linux-user host detection for riscv64",
2023-08-06) broke ppc64le because it assigned host_arch based on a
non-canonicalized version of $cpu.
Reported-by: Joel Stanley <joel@jms.id.au>
Fixes: 89e5b7935e9 ("configure: Fix linux-user host detection for riscv64", 2023-08-06)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 159 +++++++++++++++++++++++++++++-------------------------
1 file changed, 87 insertions(+), 72 deletions(-)
diff --git a/configure b/configure
index 484d38d81f4..fb213412d7c 100755
--- a/configure
+++ b/configure
@@ -469,59 +469,104 @@ else
echo "WARNING: unrecognized host CPU, proceeding with 'uname -m' output '$cpu'"
fi
-case "$cpu" in
- riscv*)
- host_arch=riscv ;;
- x32)
- host_arch=x86_64 ;;
- *)
- host_arch="$cpu" ;;
-esac
-
-# Normalise host CPU name and set multilib cflags. The canonicalization
-# isn't really necessary, because the architectures that we check for
-# should not hit the 'uname -m' case, but better safe than sorry.
+# Normalise host CPU name to the values used by Meson cross files and in source
+# directories, and set multilib cflags. The canonicalization isn't really
+# necessary, because the architectures that we check for should not hit the
+# 'uname -m' case, but better safe than sorry.
+#
# Note that this case should only have supported host CPUs, not guests.
+# Please keep it sorted.
+host_arch=
+linux_arch=
case "$cpu" in
+ aarch64)
+ host_arch=aarch64
+ linux_arch=arm64 ;;
+
armv*b|armv*l|arm)
cpu="arm" ;;
+ host_arch=arm
+ linux_arch=arm ;;
i386|i486|i586|i686)
cpu="i386"
+ host_arch=i386
+ linux_arch=x86
CPU_CFLAGS="-m32" ;;
+
+ loongarch*)
+ cpu=loongarch64
+ host_arch=loongarch64 ;;
+
+ mips64*)
+ cpu=mips64
+ host_arch=mips
+ linux_arch=mips ;;
+ mips*)
+ cpu=mips
+ host_arch=mips
+ linux_arch=mips ;;
+
+ ppc)
+ host_arch=ppc
+ linux_arch=powerpc
+ CPU_CFLAGS="-m32" ;;
+ ppc64)
+ host_arch=ppc64
+ linux_arch=powerpc
+ CPU_CFLAGS="-m64 -mbig-endian" ;;
+ ppc64le)
+ cpu=ppc64
+ host_arch=ppc64
+ linux_arch=powerpc
+ CPU_CFLAGS="-m64 -mlittle-endian" ;;
+
+ riscv32 | riscv64)
+ host_arch=riscv
+ linux_arch=riscv
+ ;;
+
+ s390)
+ linux_arch=s390
+ CPU_CFLAGS="-m31" ;;
+ s390x)
+ host_arch=s390x
+ linux_arch=s390
+ CPU_CFLAGS="-m64" ;;
+
+ sparc|sun4[cdmuv])
+ cpu=sparc
+ CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc" ;;
+ sparc64)
+ host_arch=sparc64
+ CPU_CFLAGS="-m64 -mcpu=ultrasparc" ;;
+
x32)
cpu="x86_64"
+ host_arch=x86_64
+ linux_arch=x86
CPU_CFLAGS="-mx32" ;;
x86_64|amd64)
cpu="x86_64"
+ host_arch=x86_64
+ linux_arch=x86
# ??? Only extremely old AMD cpus do not have cmpxchg16b.
# If we truly care, we should simply detect this case at
# runtime and generate the fallback to serial emulation.
CPU_CFLAGS="-m64 -mcx16" ;;
-
- mips*)
- cpu="mips" ;;
-
- ppc)
- CPU_CFLAGS="-m32" ;;
- ppc64)
- CPU_CFLAGS="-m64 -mbig-endian" ;;
- ppc64le)
- cpu="ppc64"
- CPU_CFLAGS="-m64 -mlittle-endian" ;;
-
- s390)
- CPU_CFLAGS="-m31" ;;
- s390x)
- CPU_CFLAGS="-m64" ;;
-
- sparc|sun4[cdmuv])
- cpu="sparc"
- CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc" ;;
- sparc64)
- CPU_CFLAGS="-m64 -mcpu=ultrasparc" ;;
esac
+if test -n "$host_arch" && {
+ ! test -d "$source_path/linux-user/include/host/$host_arch" ||
+ ! test -d "$source_path/common-user/host/$host_arch"; }; then
+ error_exit "linux-user/include/host/$host_arch does not exist." \
+ "This is a bug in the configure script, please report it."
+fi
+if test -n "$linux_arch" && ! test -d "$source_path/linux-headers/asm-$linux_arch"; then
+ error_exit "linux-headers/asm-$linux_arch does not exist." \
+ "This is a bug in the configure script, please report it."
+fi
+
check_py_version() {
# We require python >= 3.7.
# NB: a True python conditional creates a non-zero return code (Failure)
@@ -812,7 +857,7 @@ default_target_list=""
mak_wilds=""
if [ "$linux_user" != no ]; then
- if [ "$targetos" = linux ] && [ -d "$source_path/linux-user/include/host/$host_arch" ]; then
+ if [ "$targetos" = linux ] && [ -n "$host_arch" ]; then
linux_user=yes
elif [ "$linux_user" = yes ]; then
error_exit "linux-user not supported on this architecture"
@@ -1717,40 +1762,10 @@ echo "PKG_CONFIG=${pkg_config}" >> $config_host_mak
echo "CC=$cc" >> $config_host_mak
echo "EXESUF=$EXESUF" >> $config_host_mak
-# use included Linux headers
-if test "$linux" = "yes" ; then
+# use included Linux headers for KVM architectures
+if test "$linux" = "yes" && test -n "$linux_arch"; then
mkdir -p linux-headers
- case "$cpu" in
- i386|x86_64)
- linux_arch=x86
- ;;
- ppc|ppc64)
- linux_arch=powerpc
- ;;
- s390x)
- linux_arch=s390
- ;;
- aarch64)
- linux_arch=arm64
- ;;
- loongarch*)
- linux_arch=loongarch
- ;;
- mips64)
- linux_arch=mips
- ;;
- riscv32|riscv64)
- linux_arch=riscv
- ;;
- *)
- # For most CPUs the kernel architecture name and QEMU CPU name match.
- linux_arch="$cpu"
- ;;
- esac
- # For non-KVM architectures we will not have asm headers
- if [ -e "$source_path/linux-headers/asm-$linux_arch" ]; then
- symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
- fi
+ symlink "$source_path/linux-headers/asm-$linux_arch" linux-headers/asm
fi
for target in $target_list; do
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] configure: unify case statements for CPU canonicalization
2023-08-07 9:48 ` [PATCH 3/3] configure: unify case statements for CPU canonicalization Paolo Bonzini
@ 2023-08-07 13:35 ` Paolo Bonzini
2023-08-07 13:45 ` Peter Maydell
1 sibling, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2023-08-07 13:35 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, philmd, Joel Stanley
On 8/7/23 11:48, Paolo Bonzini wrote:
> armv*b|armv*l|arm)
> cpu="arm" ;;
Oops, sent a stale patchset. The only difference is this extra ;;
Paolo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] configure: unify case statements for CPU canonicalization
2023-08-07 9:48 ` [PATCH 3/3] configure: unify case statements for CPU canonicalization Paolo Bonzini
2023-08-07 13:35 ` Paolo Bonzini
@ 2023-08-07 13:45 ` Peter Maydell
2023-08-07 14:39 ` Paolo Bonzini
1 sibling, 1 reply; 11+ messages in thread
From: Peter Maydell @ 2023-08-07 13:45 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, richard.henderson, philmd, Joel Stanley
On Mon, 7 Aug 2023 at 10:49, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The CPU model has to be canonicalized to what Meson wants in the cross
> file, to what Linux uses for its asm-$ARCH directories, and to what
> QEMU uses for its user-mode emulation host/$ARCH directories. Do
> all three in a single case statement, and check that the Linux and
> QEMU directories actually exist.
>
> At a small cost in repeated lines, this ensures that there are no hidden
> ordering requirements between the case statements. In particular, commit
> 89e5b7935e9 ("configure: Fix linux-user host detection for riscv64",
> 2023-08-06) broke ppc64le because it assigned host_arch based on a
> non-canonicalized version of $cpu.
>
> Reported-by: Joel Stanley <joel@jms.id.au>
> Fixes: 89e5b7935e9 ("configure: Fix linux-user host detection for riscv64", 2023-08-06)
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 159 +++++++++++++++++++++++++++++-------------------------
> 1 file changed, 87 insertions(+), 72 deletions(-)
>
> diff --git a/configure b/configure
> index 484d38d81f4..fb213412d7c 100755
> --- a/configure
> +++ b/configure
> @@ -469,59 +469,104 @@ else
> echo "WARNING: unrecognized host CPU, proceeding with 'uname -m' output '$cpu'"
> fi
>
> -case "$cpu" in
> - riscv*)
> - host_arch=riscv ;;
> - x32)
> - host_arch=x86_64 ;;
> - *)
> - host_arch="$cpu" ;;
> -esac
> -
> -# Normalise host CPU name and set multilib cflags. The canonicalization
> -# isn't really necessary, because the architectures that we check for
> -# should not hit the 'uname -m' case, but better safe than sorry.
> +# Normalise host CPU name to the values used by Meson cross files and in source
> +# directories, and set multilib cflags. The canonicalization isn't really
> +# necessary, because the architectures that we check for should not hit the
> +# 'uname -m' case, but better safe than sorry.
> +#
> # Note that this case should only have supported host CPUs, not guests.
> +# Please keep it sorted.
> +host_arch=
> +linux_arch=
> case "$cpu" in
> + aarch64)
> + host_arch=aarch64
> + linux_arch=arm64 ;;
> +
> armv*b|armv*l|arm)
> cpu="arm" ;;
> + host_arch=arm
> + linux_arch=arm ;;
>
> i386|i486|i586|i686)
> cpu="i386"
> + host_arch=i386
> + linux_arch=x86
> CPU_CFLAGS="-m32" ;;
> +
> + loongarch*)
> + cpu=loongarch64
> + host_arch=loongarch64 ;;
> +
> + mips64*)
> + cpu=mips64
> + host_arch=mips
> + linux_arch=mips ;;
> + mips*)
> + cpu=mips
> + host_arch=mips
> + linux_arch=mips ;;
> +
> + ppc)
> + host_arch=ppc
> + linux_arch=powerpc
> + CPU_CFLAGS="-m32" ;;
> + ppc64)
> + host_arch=ppc64
> + linux_arch=powerpc
> + CPU_CFLAGS="-m64 -mbig-endian" ;;
> + ppc64le)
> + cpu=ppc64
> + host_arch=ppc64
> + linux_arch=powerpc
> + CPU_CFLAGS="-m64 -mlittle-endian" ;;
> +
> + riscv32 | riscv64)
> + host_arch=riscv
> + linux_arch=riscv
> + ;;
Can we be consistent within this case statement about whether
the ';;' is on its own line or at the end of the last line of
the case ? We are not fully consistent within the entire
configure script, but mostly we put it on a line of its
own. (I prefer that personally.)
thanks
-- PMM
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] configure: unify case statements for CPU canonicalization
2023-08-07 13:45 ` Peter Maydell
@ 2023-08-07 14:39 ` Paolo Bonzini
0 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2023-08-07 14:39 UTC (permalink / raw)
To: Peter Maydell
Cc: qemu-devel, Richard Henderson, Philippe Mathieu-Daudé, Joel Stanley
[-- Attachment #1: Type: text/plain, Size: 432 bytes --]
Il lun 7 ago 2023, 15:45 Peter Maydell <peter.maydell@linaro.org> ha
scritto:
> Can we be consistent within this case statement about whether
> the ';;' is on its own line or at the end of the last line of
> the case ? We are not fully consistent within the entire
> configure script, but mostly we put it on a line of its
> own. (I prefer that personally.)
>
Yes, especially given the nicer diffs.
Paolo
> thanks
> -- PMM
>
>
[-- Attachment #2: Type: text/html, Size: 1034 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] linux-user, configure: fix CPU canonicalization
2023-08-07 9:48 [PATCH 0/3] linux-user, configure: fix CPU canonicalization Paolo Bonzini
` (2 preceding siblings ...)
2023-08-07 9:48 ` [PATCH 3/3] configure: unify case statements for CPU canonicalization Paolo Bonzini
@ 2023-08-07 16:13 ` Richard Henderson
3 siblings, 0 replies; 11+ messages in thread
From: Richard Henderson @ 2023-08-07 16:13 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: philmd
On 8/7/23 02:48, Paolo Bonzini wrote:
> Paolo Bonzini (3):
> linux-user: fix detection for x32
> linux-user: cleanup unused linux-user/include/host directories
> configure: unify case statements for CPU canonicalization
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Thanks for cleaning this up.
r~
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] linux-user: cleanup unused linux-user/include/host directories
2023-08-07 9:48 ` [PATCH 2/3] linux-user: cleanup unused linux-user/include/host directories Paolo Bonzini
@ 2023-08-07 16:53 ` Ilya Leoshkevich
2023-08-07 19:41 ` Paolo Bonzini
0 siblings, 1 reply; 11+ messages in thread
From: Ilya Leoshkevich @ 2023-08-07 16:53 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: richard.henderson, philmd
On Mon, 2023-08-07 at 11:48 +0200, Paolo Bonzini wrote:
> Alpha and 31-bit s390 lack the assembly fragment to handle signals
> occurring at the same time as system calls, so they cannot run
> linux-user emulation anymore. Drop the host-signal.h files for
> them.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> linux-user/include/host/alpha/host-signal.h | 55 --------
> linux-user/include/host/s390/host-signal.h | 138 ------------------
> --
> 2 files changed, 193 deletions(-)
> delete mode 100644 linux-user/include/host/alpha/host-signal.h
> delete mode 100644 linux-user/include/host/s390/host-signal.h
s390/host-signal.h is included by s390x/host-signal.h, so on a (64-bit)
s390x host I get:
In file included from ../linux-user/signal.c:33:
../linux-user/include/host/s390x/host-signal.h:1:10: fatal error:
../s390/host-signal.h: No such file or directory
1 | #include "../s390/host-signal.h"
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] linux-user: cleanup unused linux-user/include/host directories
2023-08-07 16:53 ` Ilya Leoshkevich
@ 2023-08-07 19:41 ` Paolo Bonzini
0 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2023-08-07 19:41 UTC (permalink / raw)
To: Ilya Leoshkevich
Cc: qemu-devel, Richard Henderson, Philippe Mathieu-Daudé
[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]
Yes, found the same in CI. I will send V2 tomorrow.
Paolo
Il lun 7 ago 2023, 19:18 Ilya Leoshkevich <iii@linux.ibm.com> ha scritto:
> On Mon, 2023-08-07 at 11:48 +0200, Paolo Bonzini wrote:
> > Alpha and 31-bit s390 lack the assembly fragment to handle signals
> > occurring at the same time as system calls, so they cannot run
> > linux-user emulation anymore. Drop the host-signal.h files for
> > them.
> >
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> > ---
> > linux-user/include/host/alpha/host-signal.h | 55 --------
> > linux-user/include/host/s390/host-signal.h | 138 ------------------
> > --
> > 2 files changed, 193 deletions(-)
> > delete mode 100644 linux-user/include/host/alpha/host-signal.h
> > delete mode 100644 linux-user/include/host/s390/host-signal.h
>
> s390/host-signal.h is included by s390x/host-signal.h, so on a (64-bit)
> s390x host I get:
>
> In file included from ../linux-user/signal.c:33:
> ../linux-user/include/host/s390x/host-signal.h:1:10: fatal error:
> ../s390/host-signal.h: No such file or directory
> 1 | #include "../s390/host-signal.h"
>
>
[-- Attachment #2: Type: text/html, Size: 1786 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] configure: fix detection for x32 linux-user
2023-08-07 9:48 ` [PATCH 1/3] configure: fix detection for x32 linux-user Paolo Bonzini
@ 2023-08-10 10:31 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 11+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-08-10 10:31 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: richard.henderson
On 7/8/23 11:48, Paolo Bonzini wrote:
> x32 uses the same signal handling fragments as x86_64, since host_arch
> is set to x86_64 when Meson runs. Remove the unnecessary forwarder and
> set the host_arch variable properly in configure.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 2 ++
> linux-user/include/host/x32/host-signal.h | 1 -
> 2 files changed, 2 insertions(+), 1 deletion(-)
> delete mode 100644 linux-user/include/host/x32/host-signal.h
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-08-10 10:32 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-07 9:48 [PATCH 0/3] linux-user, configure: fix CPU canonicalization Paolo Bonzini
2023-08-07 9:48 ` [PATCH 1/3] configure: fix detection for x32 linux-user Paolo Bonzini
2023-08-10 10:31 ` Philippe Mathieu-Daudé
2023-08-07 9:48 ` [PATCH 2/3] linux-user: cleanup unused linux-user/include/host directories Paolo Bonzini
2023-08-07 16:53 ` Ilya Leoshkevich
2023-08-07 19:41 ` Paolo Bonzini
2023-08-07 9:48 ` [PATCH 3/3] configure: unify case statements for CPU canonicalization Paolo Bonzini
2023-08-07 13:35 ` Paolo Bonzini
2023-08-07 13:45 ` Peter Maydell
2023-08-07 14:39 ` Paolo Bonzini
2023-08-07 16:13 ` [PATCH 0/3] linux-user, configure: fix " Richard Henderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.