* [PULL 00/16] Misc patches for 2021-12-20
@ 2021-12-19 14:16 Paolo Bonzini
2021-12-19 14:16 ` [PULL 01/16] configure: make $targetos lowercase, use windows instead of MINGW32 Paolo Bonzini
` (16 more replies)
0 siblings, 17 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:16 UTC (permalink / raw)
To: qemu-devel
The following changes since commit 90978e15bc9a23c208b25bf7ea697a5d0925562b:
Merge tag 'trivial-branch-for-7.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2021-12-17 13:15:38 -0800)
are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to 5a3a2eb3b1096a52580c1b8c3eb0739714e7d941:
hw/i386/vmmouse: Require 'i8042' property to be set (2021-12-18 10:57:37 +0100)
----------------------------------------------------------------
* configure and meson cleanups and fixes
* remove unnecessary #ifdef
* SCSI and i386 fixes
----------------------------------------------------------------
Paolo Bonzini (12):
configure: make $targetos lowercase, use windows instead of MINGW32
configure: move target detection before CPU detection
configure: unify two case statements on $cpu
configure: unify ppc64 and ppc64le
configure: unify x86_64 and x32
meson: rename "arch" variable
configure, meson: move ARCH to meson.build
configure: remove unnecessary symlinks
configure: remove DIRS
meson: reenable test-fdmon-epoll
cpu: remove unnecessary #ifdef CONFIG_TCG
meson: add "check" argument to run_command
Philippe Mathieu-Daudé (4):
hw/scsi: Fix scsi_bus_init_named() docstring
hw/scsi/megasas: Fails command if SGL buffer overflows
tests/qtest/fuzz-megasas-test: Add test for GitLab issue #521
hw/i386/vmmouse: Require 'i8042' property to be set
configure | 253 +++++++++++++++++-----------------------
cpu.c | 5 -
docs/meson.build | 6 +-
hw/i386/vmmouse.c | 4 +
hw/scsi/megasas.c | 1 +
include/exec/cpu-all.h | 2 -
include/hw/scsi/scsi.h | 2 +-
meson.build | 39 ++++---
pc-bios/meson.build | 2 +-
tests/qtest/fuzz-megasas-test.c | 30 +++++
tests/tcg/configure.sh | 4 +-
tests/unit/meson.build | 2 +-
12 files changed, 173 insertions(+), 177 deletions(-)
--
2.33.1
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PULL 01/16] configure: make $targetos lowercase, use windows instead of MINGW32
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
@ 2021-12-19 14:16 ` Paolo Bonzini
2021-12-19 14:16 ` [PULL 02/16] configure: move target detection before CPU detection Paolo Bonzini
` (15 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:16 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson
targetos is already mostly the same as Meson host_machine.system(),
just in CamelCase. Adjust Windows, which is different, and switch to
lowercase to match Meson.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 58 ++++++++++++++++++++++++-------------------------------
1 file changed, 25 insertions(+), 33 deletions(-)
diff --git a/configure b/configure
index 28e1cf6291..e72e34b684 100755
--- a/configure
+++ b/configure
@@ -501,30 +501,30 @@ EOF
}
if check_define __linux__ ; then
- targetos="Linux"
+ targetos=linux
elif check_define _WIN32 ; then
- targetos='MINGW32'
+ targetos=windows
elif check_define __OpenBSD__ ; then
- targetos='OpenBSD'
+ targetos=openbsd
elif check_define __sun__ ; then
- targetos='SunOS'
+ targetos=sunos
elif check_define __HAIKU__ ; then
- targetos='Haiku'
+ targetos=haiku
elif check_define __FreeBSD__ ; then
- targetos='FreeBSD'
+ targetos=freebsd
elif check_define __FreeBSD_kernel__ && check_define __GLIBC__; then
- targetos='GNU/kFreeBSD'
+ targetos=gnu/kfreebsd
elif check_define __DragonFly__ ; then
- targetos='DragonFly'
+ targetos=dragonfly
elif check_define __NetBSD__; then
- targetos='NetBSD'
+ targetos=netbsd
elif check_define __APPLE__; then
- targetos='Darwin'
+ targetos=darwin
else
# This is a fatal error, but don't report it yet, because we
# might be going to just print the --help text, or it might
# be the result of a missing compiler.
- targetos='bogus'
+ targetos=bogus
fi
# Some host OSes need non-standard checks for which CPU to use.
@@ -532,7 +532,7 @@ fi
# cross-compiling to one of these OSes then you'll need to specify
# the correct CPU with the --cpu option.
case $targetos in
-SunOS)
+sunos)
# $(uname -m) returns i86pc even on an x86_64 box, so default based on isainfo
if test -z "$cpu" && test "$(isainfo -k)" = "amd64"; then
cpu="x86_64"
@@ -623,40 +623,40 @@ fi
# OS specific
case $targetos in
-MINGW32*)
+windows)
mingw32="yes"
plugins="no"
pie="no"
;;
-GNU/kFreeBSD)
+gnu/kfreebsd)
bsd="yes"
;;
-FreeBSD)
+freebsd)
bsd="yes"
bsd_user="yes"
make="${MAKE-gmake}"
# needed for kinfo_getvmmap(3) in libutil.h
;;
-DragonFly)
+dragonfly)
bsd="yes"
make="${MAKE-gmake}"
;;
-NetBSD)
+netbsd)
bsd="yes"
make="${MAKE-gmake}"
;;
-OpenBSD)
+openbsd)
bsd="yes"
make="${MAKE-gmake}"
;;
-Darwin)
+darwin)
bsd="yes"
darwin="yes"
# Disable attempts to use ObjectiveC features in os/object.h since they
# won't work when we're compiling with gcc as a C compiler.
QEMU_CFLAGS="-DOS_OBJECT_USE_OBJC=0 $QEMU_CFLAGS"
;;
-SunOS)
+sunos)
solaris="yes"
make="${MAKE-gmake}"
smbd="${SMBD-/usr/sfw/sbin/smbd}"
@@ -665,11 +665,11 @@ SunOS)
# needed for TIOCWIN* defines in termios.h
QEMU_CFLAGS="-D__EXTENSIONS__ $QEMU_CFLAGS"
;;
-Haiku)
+haiku)
pie="no"
QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE -fPIC $QEMU_CFLAGS"
;;
-Linux)
+linux)
linux="yes"
linux_user="yes"
vhost_user=${default_feature:-yes}
@@ -3334,8 +3334,8 @@ QEMU_GA_MSI_MINGW_DLL_PATH="$($pkg_config --variable=prefix glib-2.0)/bin"
# Mac OS X ships with a broken assembler
roms=
if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \
- test "$targetos" != "Darwin" && test "$targetos" != "SunOS" && \
- test "$targetos" != "Haiku" && test "$softmmu" = yes ; then
+ test "$targetos" != "darwin" && test "$targetos" != "sunos" && \
+ test "$targetos" != "haiku" && test "$softmmu" = yes ; then
# Different host OS linkers have different ideas about the name of the ELF
# emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
# variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
@@ -3903,15 +3903,7 @@ if test "$skip_meson" = no; then
if test "$cross_compile" = "yes"; then
cross_arg="--cross-file config-meson.cross"
echo "[host_machine]" >> $cross
- if test "$mingw32" = "yes" ; then
- echo "system = 'windows'" >> $cross
- fi
- if test "$linux" = "yes" ; then
- echo "system = 'linux'" >> $cross
- fi
- if test "$darwin" = "yes" ; then
- echo "system = 'darwin'" >> $cross
- fi
+ echo "system = '$targetos'" >> $cross
case "$ARCH" in
i386)
echo "cpu_family = 'x86'" >> $cross
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 02/16] configure: move target detection before CPU detection
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
2021-12-19 14:16 ` [PULL 01/16] configure: make $targetos lowercase, use windows instead of MINGW32 Paolo Bonzini
@ 2021-12-19 14:16 ` Paolo Bonzini
2021-12-19 14:16 ` [PULL 03/16] configure: unify two case statements on $cpu Paolo Bonzini
` (14 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:16 UTC (permalink / raw)
To: qemu-devel
This makes more sense, since target detection can affect CPU detection
on Solaris.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 115 ++++++++++++++++++++++++++----------------------------
1 file changed, 55 insertions(+), 60 deletions(-)
diff --git a/configure b/configure
index e72e34b684..f0a82dd8f5 100755
--- a/configure
+++ b/configure
@@ -527,16 +527,67 @@ else
targetos=bogus
fi
-# Some host OSes need non-standard checks for which CPU to use.
-# Note that these checks are broken for cross-compilation: if you're
-# cross-compiling to one of these OSes then you'll need to specify
-# the correct CPU with the --cpu option.
+# OS specific
+
case $targetos in
+windows)
+ mingw32="yes"
+ plugins="no"
+ pie="no"
+;;
+gnu/kfreebsd)
+ bsd="yes"
+;;
+freebsd)
+ bsd="yes"
+ bsd_user="yes"
+ make="${MAKE-gmake}"
+ # needed for kinfo_getvmmap(3) in libutil.h
+;;
+dragonfly)
+ bsd="yes"
+ make="${MAKE-gmake}"
+;;
+netbsd)
+ bsd="yes"
+ make="${MAKE-gmake}"
+;;
+openbsd)
+ bsd="yes"
+ make="${MAKE-gmake}"
+;;
+darwin)
+ bsd="yes"
+ darwin="yes"
+ # Disable attempts to use ObjectiveC features in os/object.h since they
+ # won't work when we're compiling with gcc as a C compiler.
+ QEMU_CFLAGS="-DOS_OBJECT_USE_OBJC=0 $QEMU_CFLAGS"
+;;
sunos)
+ solaris="yes"
+ make="${MAKE-gmake}"
+ smbd="${SMBD-/usr/sfw/sbin/smbd}"
+# needed for CMSG_ macros in sys/socket.h
+ QEMU_CFLAGS="-D_XOPEN_SOURCE=600 $QEMU_CFLAGS"
+# needed for TIOCWIN* defines in termios.h
+ QEMU_CFLAGS="-D__EXTENSIONS__ $QEMU_CFLAGS"
# $(uname -m) returns i86pc even on an x86_64 box, so default based on isainfo
+ # Note that this check is broken for cross-compilation: if you're
+ # cross-compiling to one of these OSes then you'll need to specify
+ # the correct CPU with the --cpu option.
if test -z "$cpu" && test "$(isainfo -k)" = "amd64"; then
cpu="x86_64"
fi
+;;
+haiku)
+ pie="no"
+ QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE -fPIC $QEMU_CFLAGS"
+;;
+linux)
+ linux="yes"
+ linux_user="yes"
+ vhost_user=${default_feature:-yes}
+;;
esac
if test ! -z "$cpu" ; then
@@ -620,62 +671,6 @@ if test -z "$ARCH"; then
ARCH="$cpu"
fi
-# OS specific
-
-case $targetos in
-windows)
- mingw32="yes"
- plugins="no"
- pie="no"
-;;
-gnu/kfreebsd)
- bsd="yes"
-;;
-freebsd)
- bsd="yes"
- bsd_user="yes"
- make="${MAKE-gmake}"
- # needed for kinfo_getvmmap(3) in libutil.h
-;;
-dragonfly)
- bsd="yes"
- make="${MAKE-gmake}"
-;;
-netbsd)
- bsd="yes"
- make="${MAKE-gmake}"
-;;
-openbsd)
- bsd="yes"
- make="${MAKE-gmake}"
-;;
-darwin)
- bsd="yes"
- darwin="yes"
- # Disable attempts to use ObjectiveC features in os/object.h since they
- # won't work when we're compiling with gcc as a C compiler.
- QEMU_CFLAGS="-DOS_OBJECT_USE_OBJC=0 $QEMU_CFLAGS"
-;;
-sunos)
- solaris="yes"
- make="${MAKE-gmake}"
- smbd="${SMBD-/usr/sfw/sbin/smbd}"
-# needed for CMSG_ macros in sys/socket.h
- QEMU_CFLAGS="-D_XOPEN_SOURCE=600 $QEMU_CFLAGS"
-# needed for TIOCWIN* defines in termios.h
- QEMU_CFLAGS="-D__EXTENSIONS__ $QEMU_CFLAGS"
-;;
-haiku)
- pie="no"
- QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE -fPIC $QEMU_CFLAGS"
-;;
-linux)
- linux="yes"
- linux_user="yes"
- vhost_user=${default_feature:-yes}
-;;
-esac
-
: ${make=${MAKE-make}}
# We prefer python 3.x. A bare 'python' is traditionally
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 03/16] configure: unify two case statements on $cpu
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
2021-12-19 14:16 ` [PULL 01/16] configure: make $targetos lowercase, use windows instead of MINGW32 Paolo Bonzini
2021-12-19 14:16 ` [PULL 02/16] configure: move target detection before CPU detection Paolo Bonzini
@ 2021-12-19 14:16 ` Paolo Bonzini
2021-12-19 14:16 ` [PULL 04/16] configure: unify ppc64 and ppc64le Paolo Bonzini
` (13 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:16 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 67 ++++++++++++++++++++++++++-----------------------------
1 file changed, 32 insertions(+), 35 deletions(-)
diff --git a/configure b/configure
index f0a82dd8f5..77ccc15b73 100755
--- a/configure
+++ b/configure
@@ -636,32 +636,47 @@ else
fi
ARCH=
-# Normalise host CPU name and set ARCH.
+# Normalise host CPU name, set ARCH and multilib cflags
# Note that this case should only have supported host CPUs, not guests.
case "$cpu" in
- ppc|ppc64|s390x|sparc64|x32|riscv)
- ;;
- ppc64le)
- ARCH="ppc64"
- ;;
+ aarch64|riscv) ;;
+ armv*b|armv*l|arm)
+ cpu="arm" ;;
+
i386|i486|i586|i686|i86pc|BePC)
cpu="i386"
- ;;
+ CPU_CFLAGS="-m32" ;;
+ x32)
+ CPU_CFLAGS="-mx32" ;;
x86_64|amd64)
cpu="x86_64"
- ;;
- armv*b|armv*l|arm)
- cpu="arm"
- ;;
- aarch64)
- cpu="aarch64"
- ;;
+ # ??? 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"
- ;;
+ cpu="mips" ;;
+
+ ppc)
+ CPU_CFLAGS="-m32" ;;
+ ppc64)
+ CPU_CFLAGS="-m64" ;;
+ ppc64le)
+ ARCH="ppc64" ;;
+
+ s390)
+ CPU_CFLAGS="-m31"
+ ARCH=unknown ;;
+ s390x)
+ CPU_CFLAGS="-m64" ;;
+
sparc|sun4[cdmuv])
cpu="sparc"
- ;;
+ CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc" ;;
+ sparc64)
+ CPU_CFLAGS="-m64 -mcpu=ultrasparc" ;;
+
*)
# This will result in either an error or falling back to TCI later
ARCH=unknown
@@ -1252,24 +1267,6 @@ local_statedir="${local_statedir:-$prefix/var}"
firmwarepath="${firmwarepath:-$datadir/qemu-firmware}"
localedir="${localedir:-$datadir/locale}"
-case "$cpu" in
- ppc) CPU_CFLAGS="-m32" ;;
- ppc64) CPU_CFLAGS="-m64" ;;
- sparc) CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc" ;;
- sparc64) CPU_CFLAGS="-m64 -mcpu=ultrasparc" ;;
- s390) CPU_CFLAGS="-m31" ;;
- s390x) CPU_CFLAGS="-m64" ;;
- i386) CPU_CFLAGS="-m32" ;;
- x32) CPU_CFLAGS="-mx32" ;;
-
- # ??? 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.
- x86_64) CPU_CFLAGS="-m64 -mcx16" ;;
-
- # No special flags required for other host CPUs
-esac
-
if eval test -z "\${cross_cc_$cpu}"; then
eval "cross_cc_${cpu}=\$cc"
cross_cc_vars="$cross_cc_vars cross_cc_${cpu}"
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 04/16] configure: unify ppc64 and ppc64le
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (2 preceding siblings ...)
2021-12-19 14:16 ` [PULL 03/16] configure: unify two case statements on $cpu Paolo Bonzini
@ 2021-12-19 14:16 ` Paolo Bonzini
2021-12-19 14:17 ` [PULL 05/16] configure: unify x86_64 and x32 Paolo Bonzini
` (12 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:16 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Philippe Mathieu-Daudé
The only difference between the two, as far as either configure or
Meson are concerned, is the default endianness of the compiler.
For tests/tcg, specify the endianness explicitly on the command line;
for configure, do the same so that it is possible to have --cpu=ppc64le
on a bigendian system or vice versa. Apart from this, cpu=ppc64le can
be normalized to ppc64 also in configure and not just in the meson
cross file.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 10 ++++------
tests/tcg/configure.sh | 4 +++-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 77ccc15b73..85caf2e9ef 100755
--- a/configure
+++ b/configure
@@ -661,9 +661,10 @@ case "$cpu" in
ppc)
CPU_CFLAGS="-m32" ;;
ppc64)
- CPU_CFLAGS="-m64" ;;
+ CPU_CFLAGS="-m64 -mbig" ;;
ppc64le)
- ARCH="ppc64" ;;
+ cpu="ppc64"
+ CPU_CFLAGS="-m64 -mlittle" ;;
s390)
CPU_CFLAGS="-m31"
@@ -3721,7 +3722,7 @@ if test "$linux" = "yes" ; then
i386|x86_64|x32)
linux_arch=x86
;;
- ppc|ppc64|ppc64le)
+ ppc|ppc64)
linux_arch=powerpc
;;
s390x)
@@ -3903,9 +3904,6 @@ if test "$skip_meson" = no; then
x86_64|x32)
echo "cpu_family = 'x86_64'" >> $cross
;;
- ppc64le)
- echo "cpu_family = 'ppc64'" >> $cross
- ;;
*)
echo "cpu_family = '$ARCH'" >> $cross
;;
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 9b76f58258..9ef913df5b 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -64,7 +64,9 @@ fi
: ${cross_cc_ppc="powerpc-linux-gnu-gcc"}
: ${cross_cc_cflags_ppc="-m32"}
: ${cross_cc_ppc64="powerpc64-linux-gnu-gcc"}
-: ${cross_cc_ppc64le="powerpc64le-linux-gnu-gcc"}
+: ${cross_cc_cflags_ppc64="-m64 -mbig"}
+: ${cross_cc_ppc64le="$cross_cc_ppc64"}
+: ${cross_cc_cflags_ppc64le="-m64 -mlittle"}
: ${cross_cc_riscv64="riscv64-linux-gnu-gcc"}
: ${cross_cc_s390x="s390x-linux-gnu-gcc"}
: ${cross_cc_sh4="sh4-linux-gnu-gcc"}
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 05/16] configure: unify x86_64 and x32
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (3 preceding siblings ...)
2021-12-19 14:16 ` [PULL 04/16] configure: unify ppc64 and ppc64le Paolo Bonzini
@ 2021-12-19 14:17 ` Paolo Bonzini
2021-12-19 14:17 ` [PULL 06/16] meson: rename "arch" variable Paolo Bonzini
` (11 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:17 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson
The only difference between the two, as far as either configure or
Meson are concerned, is in the multilib flags passed to the compiler.
For QEMU, this fixes the handling of TYPE_OLDDEVT in
include/exec/user/thunk.h and enables testing of dirty ring buffer,
because both are using HOST_X86_64.
For tests/tcg, this means that on a hypothetical x32 host the
cross compiler will not be used to build the tests.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 6 ++----
meson.build | 3 +--
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index 85caf2e9ef..108b7621e2 100755
--- a/configure
+++ b/configure
@@ -647,6 +647,7 @@ case "$cpu" in
cpu="i386"
CPU_CFLAGS="-m32" ;;
x32)
+ cpu="x86_64"
CPU_CFLAGS="-mx32" ;;
x86_64|amd64)
cpu="x86_64"
@@ -3719,7 +3720,7 @@ fi
if test "$linux" = "yes" ; then
mkdir -p linux-headers
case "$cpu" in
- i386|x86_64|x32)
+ i386|x86_64)
linux_arch=x86
;;
ppc|ppc64)
@@ -3901,9 +3902,6 @@ if test "$skip_meson" = no; then
i386)
echo "cpu_family = 'x86'" >> $cross
;;
- x86_64|x32)
- echo "cpu_family = 'x86_64'" >> $cross
- ;;
*)
echo "cpu_family = '$ARCH'" >> $cross
;;
diff --git a/meson.build b/meson.build
index ae67ca28ab..69cca2aa9f 100644
--- a/meson.build
+++ b/meson.build
@@ -355,7 +355,7 @@ if not get_option('tcg').disabled()
tcg_arch = 'tci'
elif config_host['ARCH'] == 'sparc64'
tcg_arch = 'sparc'
- elif config_host['ARCH'] in ['x86_64', 'x32']
+ elif config_host['ARCH'] == 'x86_64'
tcg_arch = 'i386'
elif config_host['ARCH'] == 'ppc64'
tcg_arch = 'ppc'
@@ -1806,7 +1806,6 @@ disassemblers = {
'hppa' : ['CONFIG_HPPA_DIS'],
'i386' : ['CONFIG_I386_DIS'],
'x86_64' : ['CONFIG_I386_DIS'],
- 'x32' : ['CONFIG_I386_DIS'],
'm68k' : ['CONFIG_M68K_DIS'],
'microblaze' : ['CONFIG_MICROBLAZE_DIS'],
'mips' : ['CONFIG_MIPS_DIS'],
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 06/16] meson: rename "arch" variable
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (4 preceding siblings ...)
2021-12-19 14:17 ` [PULL 05/16] configure: unify x86_64 and x32 Paolo Bonzini
@ 2021-12-19 14:17 ` Paolo Bonzini
2021-12-19 14:17 ` [PULL 07/16] configure, meson: move ARCH to meson.build Paolo Bonzini
` (10 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:17 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, Philippe Mathieu-Daudé
Avoid confusion between the ARCH variable of configure/config-host.mak
and the same-named variable of meson.build.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/meson.build b/meson.build
index 69cca2aa9f..4fdaa65b05 100644
--- a/meson.build
+++ b/meson.build
@@ -2850,7 +2850,7 @@ emulators = {}
foreach target : target_dirs
config_target = config_target_mak[target]
target_name = config_target['TARGET_NAME']
- arch = config_target['TARGET_BASE_ARCH']
+ target_base_arch = config_target['TARGET_BASE_ARCH']
arch_srcs = [config_target_h[target]]
arch_deps = []
c_args = ['-DNEED_CPU_H',
@@ -2866,11 +2866,11 @@ foreach target : target_dirs
if target.endswith('-softmmu')
qemu_target_name = 'qemu-system-' + target_name
target_type='system'
- t = target_softmmu_arch[arch].apply(config_target, strict: false)
+ t = target_softmmu_arch[target_base_arch].apply(config_target, strict: false)
arch_srcs += t.sources()
arch_deps += t.dependencies()
- hw_dir = target_name == 'sparc64' ? 'sparc64' : arch
+ hw_dir = target_name == 'sparc64' ? 'sparc64' : target_base_arch
hw = hw_arch[hw_dir].apply(config_target, strict: false)
arch_srcs += hw.sources()
arch_deps += hw.dependencies()
@@ -2881,8 +2881,8 @@ foreach target : target_dirs
abi = config_target['TARGET_ABI_DIR']
target_type='user'
qemu_target_name = 'qemu-' + target_name
- if arch in target_user_arch
- t = target_user_arch[arch].apply(config_target, strict: false)
+ if target_base_arch in target_user_arch
+ t = target_user_arch[target_base_arch].apply(config_target, strict: false)
arch_srcs += t.sources()
arch_deps += t.dependencies()
endif
@@ -2920,7 +2920,7 @@ foreach target : target_dirs
arch_srcs += gdbstub_xml
endif
- t = target_arch[arch].apply(config_target, strict: false)
+ t = target_arch[target_base_arch].apply(config_target, strict: false)
arch_srcs += t.sources()
arch_deps += t.dependencies()
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 07/16] configure, meson: move ARCH to meson.build
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (5 preceding siblings ...)
2021-12-19 14:17 ` [PULL 06/16] meson: rename "arch" variable Paolo Bonzini
@ 2021-12-19 14:17 ` Paolo Bonzini
2021-12-21 2:46 ` Richard Henderson
2022-07-19 13:00 ` Peter Maydell
2021-12-19 14:17 ` [PULL 08/16] configure: remove unnecessary symlinks Paolo Bonzini
` (9 subsequent siblings)
16 siblings, 2 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:17 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson
$ARCH and the HOST_* symbols are only used by the QEMU build; configure
uses $cpu instead. Remove it from config-host.mak.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 21 ++++-----------------
meson.build | 26 +++++++++++++++++---------
2 files changed, 21 insertions(+), 26 deletions(-)
diff --git a/configure b/configure
index 108b7621e2..6e06ac6161 100755
--- a/configure
+++ b/configure
@@ -635,11 +635,9 @@ else
cpu=$(uname -m)
fi
-ARCH=
-# Normalise host CPU name, set ARCH and multilib cflags
+# Normalise host CPU name, set multilib cflags
# Note that this case should only have supported host CPUs, not guests.
case "$cpu" in
- aarch64|riscv) ;;
armv*b|armv*l|arm)
cpu="arm" ;;
@@ -668,8 +666,7 @@ case "$cpu" in
CPU_CFLAGS="-m64 -mlittle" ;;
s390)
- CPU_CFLAGS="-m31"
- ARCH=unknown ;;
+ CPU_CFLAGS="-m31" ;;
s390x)
CPU_CFLAGS="-m64" ;;
@@ -678,15 +675,7 @@ case "$cpu" in
CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc" ;;
sparc64)
CPU_CFLAGS="-m64 -mcpu=ultrasparc" ;;
-
- *)
- # This will result in either an error or falling back to TCI later
- ARCH=unknown
- ;;
esac
-if test -z "$ARCH"; then
- ARCH="$cpu"
-fi
: ${make=${MAKE-make}}
@@ -3406,8 +3395,6 @@ echo "GIT=$git" >> $config_host_mak
echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_host_mak
-echo "ARCH=$ARCH" >> $config_host_mak
-
if test "$debug_tcg" = "yes" ; then
echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
fi
@@ -3898,12 +3885,12 @@ if test "$skip_meson" = no; then
cross_arg="--cross-file config-meson.cross"
echo "[host_machine]" >> $cross
echo "system = '$targetos'" >> $cross
- case "$ARCH" in
+ case "$cpu" in
i386)
echo "cpu_family = 'x86'" >> $cross
;;
*)
- echo "cpu_family = '$ARCH'" >> $cross
+ echo "cpu_family = '$cpu'" >> $cross
;;
esac
echo "cpu = '$cpu'" >> $cross
diff --git a/meson.build b/meson.build
index 4fdaa65b05..2495360fd0 100644
--- a/meson.build
+++ b/meson.build
@@ -67,6 +67,14 @@ endif
targetos = host_machine.system()
+if cpu not in supported_cpus
+ host_arch = 'unknown'
+elif cpu == 'x86'
+ host_arch = 'i386'
+else
+ host_arch = cpu
+endif
+
if cpu in ['x86', 'x86_64']
kvm_targets = ['i386-softmmu', 'x86_64-softmmu']
elif cpu == 'aarch64'
@@ -335,9 +343,9 @@ if targetos == 'netbsd'
endif
endif
-tcg_arch = config_host['ARCH']
+tcg_arch = host_arch
if not get_option('tcg').disabled()
- if cpu not in supported_cpus
+ if host_arch == 'unknown'
if get_option('tcg_interpreter')
warning('Unsupported CPU @0@, will use TCG with TCI (slow)'.format(cpu))
else
@@ -353,11 +361,11 @@ if not get_option('tcg').disabled()
endif
if get_option('tcg_interpreter')
tcg_arch = 'tci'
- elif config_host['ARCH'] == 'sparc64'
+ elif host_arch == 'sparc64'
tcg_arch = 'sparc'
- elif config_host['ARCH'] == 'x86_64'
+ elif host_arch == 'x86_64'
tcg_arch = 'i386'
- elif config_host['ARCH'] == 'ppc64'
+ elif host_arch == 'ppc64'
tcg_arch = 'ppc'
endif
add_project_arguments('-iquote', meson.current_source_dir() / 'tcg' / tcg_arch,
@@ -1426,6 +1434,8 @@ config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDIR', get_option('prefix') /
config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir)
config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir'))
+config_host_data.set('HOST_' + host_arch.to_upper(), 1)
+
config_host_data.set('CONFIG_ATTR', libattr.found())
config_host_data.set('CONFIG_BRLAPI', brlapi.found())
config_host_data.set('CONFIG_COCOA', cocoa.found())
@@ -1775,8 +1785,6 @@ foreach k, v: config_host
v = '"' + '", "'.join(v.split()) + '", '
endif
config_host_data.set(k, v)
- elif k == 'ARCH'
- config_host_data.set('HOST_' + v.to_upper(), 1)
elif strings.contains(k)
config_host_data.set_quoted(k, v)
elif k.startswith('CONFIG_')
@@ -1919,7 +1927,7 @@ foreach target : target_dirs
endif
foreach k, v: disassemblers
- if config_host['ARCH'].startswith(k) or config_target['TARGET_BASE_ARCH'].startswith(k)
+ if host_arch.startswith(k) or config_target['TARGET_BASE_ARCH'].startswith(k)
foreach sym: v
config_target += { sym: 'y' }
config_all_disas += { sym: 'y' }
@@ -2888,7 +2896,7 @@ foreach target : target_dirs
endif
if 'CONFIG_LINUX_USER' in config_target
base_dir = 'linux-user'
- target_inc += include_directories('linux-user/host/' / config_host['ARCH'])
+ target_inc += include_directories('linux-user/host/' / host_arch)
endif
if 'CONFIG_BSD_USER' in config_target
base_dir = 'bsd-user'
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 08/16] configure: remove unnecessary symlinks
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (6 preceding siblings ...)
2021-12-19 14:17 ` [PULL 07/16] configure, meson: move ARCH to meson.build Paolo Bonzini
@ 2021-12-19 14:17 ` Paolo Bonzini
2021-12-19 14:17 ` [PULL 09/16] configure: remove DIRS Paolo Bonzini
` (8 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:17 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson
Make pc-bios/meson.build use the files in the source tree as inputs
to bzip2.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 1 -
pc-bios/meson.build | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/configure b/configure
index 6e06ac6161..ba85bbb54b 100755
--- a/configure
+++ b/configure
@@ -3801,7 +3801,6 @@ for bios_file in \
$source_path/pc-bios/*.img \
$source_path/pc-bios/openbios-* \
$source_path/pc-bios/u-boot.* \
- $source_path/pc-bios/edk2-*.fd.bz2 \
$source_path/pc-bios/palcode-* \
$source_path/pc-bios/qemu_vga.ndrv
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index b40ff3f2bd..1812a4084f 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -15,7 +15,7 @@ if unpack_edk2_blobs
roms += custom_target(f,
build_by_default: have_system,
output: f,
- input: '@0@.bz2'.format(f),
+ input: files('@0@.bz2'.format(f)),
capture: true,
install: get_option('install_blobs'),
install_dir: qemu_datadir,
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 09/16] configure: remove DIRS
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (7 preceding siblings ...)
2021-12-19 14:17 ` [PULL 08/16] configure: remove unnecessary symlinks Paolo Bonzini
@ 2021-12-19 14:17 ` Paolo Bonzini
2022-01-07 11:02 ` Thomas Huth
2021-12-19 14:17 ` [PULL 10/16] meson: reenable test-fdmon-epoll Paolo Bonzini
` (7 subsequent siblings)
16 siblings, 1 reply; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:17 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Alex Bennée
DIRS is used to create the directory in which the LINKS symbolic links
reside, or to create directories for object files. The former can
be done directly in the symlinking loop, while the latter is done
by Meson already, so DIRS is not necessary.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/configure b/configure
index ba85bbb54b..8ccfe51673 100755
--- a/configure
+++ b/configure
@@ -3762,7 +3762,6 @@ if test "$safe_stack" = "yes"; then
fi
# If we're using a separate build tree, set it up now.
-# DIRS are directories which we simply mkdir in the build tree;
# LINKS are things to symlink back into the source tree
# (these can be both files and directories).
# Caution: do not add files or directories here using wildcards. This
@@ -3774,12 +3773,6 @@ fi
# UNLINK is used to remove symlinks from older development versions
# that might get into the way when doing "git update" without doing
# a "make distclean" in between.
-DIRS="tests tests/tcg tests/qapi-schema tests/qtest/libqos"
-DIRS="$DIRS tests/qtest tests/qemu-iotests tests/vm tests/fp tests/qgraph"
-DIRS="$DIRS docs docs/interop fsdev scsi"
-DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw"
-DIRS="$DIRS roms/seabios"
-DIRS="$DIRS contrib/plugins/"
LINKS="Makefile"
LINKS="$LINKS tests/tcg/Makefile.target"
LINKS="$LINKS pc-bios/optionrom/Makefile"
@@ -3807,9 +3800,9 @@ for bios_file in \
do
LINKS="$LINKS pc-bios/$(basename $bios_file)"
done
-mkdir -p $DIRS
for f in $LINKS ; do
if [ -e "$source_path/$f" ]; then
+ mkdir -p `dirname ./$f`
symlink "$source_path/$f" "$f"
fi
done
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 10/16] meson: reenable test-fdmon-epoll
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (8 preceding siblings ...)
2021-12-19 14:17 ` [PULL 09/16] configure: remove DIRS Paolo Bonzini
@ 2021-12-19 14:17 ` Paolo Bonzini
2021-12-19 14:17 ` [PULL 11/16] cpu: remove unnecessary #ifdef CONFIG_TCG Paolo Bonzini
` (6 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:17 UTC (permalink / raw)
To: qemu-devel
The test was disabled when CONFIG_EPOLL_CREATE1 was moved out
of config-host.mak. Fix the condition.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/unit/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index acac3622ed..90acf5b0da 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
@@ -112,7 +112,7 @@ if have_block
if nettle.found() or gcrypt.found()
tests += {'test-crypto-pbkdf': [io]}
endif
- if 'CONFIG_EPOLL_CREATE1' in config_host
+ if config_host_data.get('CONFIG_EPOLL_CREATE1')
tests += {'test-fdmon-epoll': [testblock]}
endif
endif
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 11/16] cpu: remove unnecessary #ifdef CONFIG_TCG
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (9 preceding siblings ...)
2021-12-19 14:17 ` [PULL 10/16] meson: reenable test-fdmon-epoll Paolo Bonzini
@ 2021-12-19 14:17 ` Paolo Bonzini
2021-12-19 14:20 ` [PULL 12/16] meson: add "check" argument to run_command Paolo Bonzini
` (5 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:17 UTC (permalink / raw)
To: qemu-devel
"if (tcg_enabled())" allows elision of the code inside it; we only need
the prototype to exist, so that the code compile even for the --disable-tcg
case.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
cpu.c | 5 -----
include/exec/cpu-all.h | 2 --
2 files changed, 7 deletions(-)
diff --git a/cpu.c b/cpu.c
index 9bce67ef55..945dd3dded 100644
--- a/cpu.c
+++ b/cpu.c
@@ -137,12 +137,10 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
if (!accel_cpu_realizefn(cpu, errp)) {
return;
}
-#ifdef CONFIG_TCG
/* NB: errp parameter is unused currently */
if (tcg_enabled()) {
tcg_exec_realizefn(cpu, errp);
}
-#endif /* CONFIG_TCG */
#ifdef CONFIG_USER_ONLY
assert(qdev_get_vmsd(DEVICE(cpu)) == NULL ||
@@ -169,12 +167,9 @@ void cpu_exec_unrealizefn(CPUState *cpu)
vmstate_unregister(NULL, &vmstate_cpu_common, cpu);
}
#endif
-#ifdef CONFIG_TCG
- /* NB: errp parameter is unused currently */
if (tcg_enabled()) {
tcg_exec_unrealizefn(cpu);
}
-#endif /* CONFIG_TCG */
cpu_list_remove(cpu);
}
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 3c8e24292b..bb37239efa 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -437,12 +437,10 @@ void dump_opcount_info(GString *buf);
#endif /* !CONFIG_USER_ONLY */
-#ifdef CONFIG_TCG
/* accel/tcg/cpu-exec.c */
int cpu_exec(CPUState *cpu);
void tcg_exec_realizefn(CPUState *cpu, Error **errp);
void tcg_exec_unrealizefn(CPUState *cpu);
-#endif /* CONFIG_TCG */
/* Returns: 0 on success, -1 on error */
int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr,
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 12/16] meson: add "check" argument to run_command
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (10 preceding siblings ...)
2021-12-19 14:17 ` [PULL 11/16] cpu: remove unnecessary #ifdef CONFIG_TCG Paolo Bonzini
@ 2021-12-19 14:20 ` Paolo Bonzini
2021-12-19 14:20 ` [PULL 13/16] hw/scsi: Fix scsi_bus_init_named() docstring Paolo Bonzini
` (4 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:20 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé
Meson is planning to change the default of the "check" argument to
run_command (from false to true). Be explicit and include it in
all invocations.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
docs/meson.build | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/meson.build b/docs/meson.build
index 27c6e156ff..57b28a3146 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -18,12 +18,12 @@ if sphinx_build.found()
# This is a bit awkward but works: create a trivial document and
# try to run it with our configuration file (which enforces a
# version requirement). This will fail if sphinx-build is too old.
- run_command('mkdir', ['-p', tmpdir / 'sphinx'])
- run_command('touch', [tmpdir / 'sphinx/index.rst'])
+ run_command('mkdir', ['-p', tmpdir / 'sphinx'], check: true)
+ run_command('touch', [tmpdir / 'sphinx/index.rst'], check: true)
sphinx_build_test_out = run_command(SPHINX_ARGS + [
'-c', meson.current_source_dir(),
'-b', 'html', tmpdir / 'sphinx',
- tmpdir / 'sphinx/out'])
+ tmpdir / 'sphinx/out'], check: false)
build_docs = (sphinx_build_test_out.returncode() == 0)
if not build_docs
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 13/16] hw/scsi: Fix scsi_bus_init_named() docstring
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (11 preceding siblings ...)
2021-12-19 14:20 ` [PULL 12/16] meson: add "check" argument to run_command Paolo Bonzini
@ 2021-12-19 14:20 ` Paolo Bonzini
2021-12-19 14:20 ` [PULL 14/16] hw/scsi/megasas: Fails command if SGL buffer overflows Paolo Bonzini
` (3 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:20 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Commit 739e95f5741 ("scsi: Replace scsi_bus_new() with
scsi_bus_init(), scsi_bus_init_named()") forgot to rename
scsi_bus_init() in the function documentation string.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211122104744.1051554-1-f4bug@amsat.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/hw/scsi/scsi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h
index a567a5ed86..2ef80af6dc 100644
--- a/include/hw/scsi/scsi.h
+++ b/include/hw/scsi/scsi.h
@@ -158,7 +158,7 @@ struct SCSIBus {
* provided by the caller. It is the caller's responsibility to make
* sure that name does not clash with the name of any other bus in the
* system. Unless you need the new bus to have a specific name, you
- * should use scsi_bus_new() instead.
+ * should use scsi_bus_init() instead.
*/
void scsi_bus_init_named(SCSIBus *bus, size_t bus_size, DeviceState *host,
const SCSIBusInfo *info, const char *bus_name);
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 14/16] hw/scsi/megasas: Fails command if SGL buffer overflows
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (12 preceding siblings ...)
2021-12-19 14:20 ` [PULL 13/16] hw/scsi: Fix scsi_bus_init_named() docstring Paolo Bonzini
@ 2021-12-19 14:20 ` Paolo Bonzini
2021-12-19 14:20 ` [PULL 15/16] tests/qtest/fuzz-megasas-test: Add test for GitLab issue #521 Paolo Bonzini
` (2 subsequent siblings)
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:20 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexander Bulekov, Philippe Mathieu-Daudé, Darren Kenny
From: Philippe Mathieu-Daudé <philmd@redhat.com>
If we detect an overflow on the SGL buffer, do not
keep processing the command: discard it. TARGET_FAILURE
sense code will be returned (MFI_STAT_SCSI_DONE_WITH_ERROR).
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/521
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20211119201141.532377-2-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/scsi/megasas.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index 4ff51221d4..8f35784100 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -303,6 +303,7 @@ static int megasas_map_sgl(MegasasState *s, MegasasCmd *cmd, union mfi_sgl *sgl)
}
if (cmd->iov_size > iov_size) {
trace_megasas_iovec_overflow(cmd->index, iov_size, cmd->iov_size);
+ goto unmap;
} else if (cmd->iov_size < iov_size) {
trace_megasas_iovec_underflow(cmd->index, iov_size, cmd->iov_size);
}
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 15/16] tests/qtest/fuzz-megasas-test: Add test for GitLab issue #521
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (13 preceding siblings ...)
2021-12-19 14:20 ` [PULL 14/16] hw/scsi/megasas: Fails command if SGL buffer overflows Paolo Bonzini
@ 2021-12-19 14:20 ` Paolo Bonzini
2021-12-19 14:20 ` [PULL 16/16] hw/i386/vmmouse: Require 'i8042' property to be set Paolo Bonzini
2021-12-20 4:47 ` [PULL 00/16] Misc patches for 2021-12-20 Richard Henderson
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:20 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexander Bulekov, Philippe Mathieu-Daudé, Darren Kenny
From: Philippe Mathieu-Daudé <philmd@redhat.com>
Without the previous commit, this test triggers:
$ make check-qtest-x86_64
[...]
Running test qtest-x86_64/fuzz-megasas-test
qemu-system-x86_64: softmmu/physmem.c:3229: address_space_unmap: Assertion `mr != NULL' failed.
Broken pipe
ERROR qtest-x86_64/fuzz-megasas-test - too few tests run (expected 2, got 1)
Suggested-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20211119201141.532377-3-philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/qtest/fuzz-megasas-test.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/tests/qtest/fuzz-megasas-test.c b/tests/qtest/fuzz-megasas-test.c
index 940a76bf25..e1141c58a4 100644
--- a/tests/qtest/fuzz-megasas-test.c
+++ b/tests/qtest/fuzz-megasas-test.c
@@ -34,6 +34,34 @@ static void test_lp1878263_megasas_zero_iov_cnt(void)
qtest_quit(s);
}
+/*
+ * Overflow SGL buffer.
+ * https://gitlab.com/qemu-project/qemu/-/issues/521
+ */
+static void test_gitlab_issue521_megasas_sgl_ovf(void)
+{
+ QTestState *s = qtest_init("-display none -m 32M -machine q35 "
+ "-nodefaults -device megasas "
+ "-device scsi-cd,drive=null0 "
+ "-blockdev "
+ "driver=null-co,read-zeroes=on,node-name=null0");
+ qtest_outl(s, 0xcf8, 0x80000818);
+ qtest_outl(s, 0xcfc, 0xc000);
+ qtest_outl(s, 0xcf8, 0x80000804);
+ qtest_outw(s, 0xcfc, 0x05);
+ qtest_bufwrite(s, 0x0, "\x01", 0x1);
+ qtest_bufwrite(s, 0x7, "\x01", 0x1);
+ qtest_bufwrite(s, 0x10, "\x02", 0x1);
+ qtest_bufwrite(s, 0x16, "\x01", 0x1);
+ qtest_bufwrite(s, 0x28, "\x01", 0x1);
+ qtest_bufwrite(s, 0x33, "\x01", 0x1);
+ qtest_outb(s, 0xc040, 0x0);
+ qtest_outb(s, 0xc040, 0x20);
+ qtest_outl(s, 0xc040, 0x20000000);
+ qtest_outb(s, 0xc040, 0x20);
+ qtest_quit(s);
+}
+
int main(int argc, char **argv)
{
const char *arch = qtest_get_arch();
@@ -43,6 +71,8 @@ int main(int argc, char **argv)
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
qtest_add_func("fuzz/test_lp1878263_megasas_zero_iov_cnt",
test_lp1878263_megasas_zero_iov_cnt);
+ qtest_add_func("fuzz/gitlab_issue521_megasas_sgl_ovf",
+ test_gitlab_issue521_megasas_sgl_ovf);
}
return g_test_run();
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PULL 16/16] hw/i386/vmmouse: Require 'i8042' property to be set
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (14 preceding siblings ...)
2021-12-19 14:20 ` [PULL 15/16] tests/qtest/fuzz-megasas-test: Add test for GitLab issue #521 Paolo Bonzini
@ 2021-12-19 14:20 ` Paolo Bonzini
2021-12-20 4:47 ` [PULL 00/16] Misc patches for 2021-12-20 Richard Henderson
16 siblings, 0 replies; 23+ messages in thread
From: Paolo Bonzini @ 2021-12-19 14:20 UTC (permalink / raw)
To: qemu-devel; +Cc: Calvin Buckley, Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
If the 'i8042' property is not set, mouse events handled by
vmmouse_mouse_event() end calling i8042_isa_mouse_fake_event()
with a NULL argument, resulting in ps2_mouse_fake_event() being
called with invalid PS2MouseState pointer. Fix by requiring
the 'i8042' property to be always set:
$ qemu-system-x86_64 -device vmmouse
qemu-system-x86_64: -device vmmouse: 'i8042' link is not set
Fixes: 91c9e09147b ("vmmouse: convert to qdev")
Reported-by: Calvin Buckley <calvin@cmpct.info>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/752
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20211201223253.36080-1-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/i386/vmmouse.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c
index 3d66368286..a56c185f15 100644
--- a/hw/i386/vmmouse.c
+++ b/hw/i386/vmmouse.c
@@ -286,6 +286,10 @@ static void vmmouse_realizefn(DeviceState *dev, Error **errp)
DPRINTF("vmmouse_init\n");
+ if (!s->i8042) {
+ error_setg(errp, "'i8042' link is not set");
+ return;
+ }
if (!object_resolve_path_type("", TYPE_VMPORT, NULL)) {
error_setg(errp, "vmmouse needs a machine with vmport");
return;
--
2.33.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PULL 00/16] Misc patches for 2021-12-20
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
` (15 preceding siblings ...)
2021-12-19 14:20 ` [PULL 16/16] hw/i386/vmmouse: Require 'i8042' property to be set Paolo Bonzini
@ 2021-12-20 4:47 ` Richard Henderson
16 siblings, 0 replies; 23+ messages in thread
From: Richard Henderson @ 2021-12-20 4:47 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
On 12/19/21 6:16 AM, Paolo Bonzini wrote:
> The following changes since commit 90978e15bc9a23c208b25bf7ea697a5d0925562b:
>
> Merge tag 'trivial-branch-for-7.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2021-12-17 13:15:38 -0800)
>
> are available in the Git repository at:
>
> https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 5a3a2eb3b1096a52580c1b8c3eb0739714e7d941:
>
> hw/i386/vmmouse: Require 'i8042' property to be set (2021-12-18 10:57:37 +0100)
>
> ----------------------------------------------------------------
> * configure and meson cleanups and fixes
> * remove unnecessary #ifdef
> * SCSI and i386 fixes
>
> ----------------------------------------------------------------
> Paolo Bonzini (12):
> configure: make $targetos lowercase, use windows instead of MINGW32
> configure: move target detection before CPU detection
> configure: unify two case statements on $cpu
> configure: unify ppc64 and ppc64le
> configure: unify x86_64 and x32
> meson: rename "arch" variable
> configure, meson: move ARCH to meson.build
> configure: remove unnecessary symlinks
> configure: remove DIRS
> meson: reenable test-fdmon-epoll
> cpu: remove unnecessary #ifdef CONFIG_TCG
> meson: add "check" argument to run_command
>
> Philippe Mathieu-Daudé (4):
> hw/scsi: Fix scsi_bus_init_named() docstring
> hw/scsi/megasas: Fails command if SGL buffer overflows
> tests/qtest/fuzz-megasas-test: Add test for GitLab issue #521
> hw/i386/vmmouse: Require 'i8042' property to be set
>
> configure | 253 +++++++++++++++++-----------------------
> cpu.c | 5 -
> docs/meson.build | 6 +-
> hw/i386/vmmouse.c | 4 +
> hw/scsi/megasas.c | 1 +
> include/exec/cpu-all.h | 2 -
> include/hw/scsi/scsi.h | 2 +-
> meson.build | 39 ++++---
> pc-bios/meson.build | 2 +-
> tests/qtest/fuzz-megasas-test.c | 30 +++++
> tests/tcg/configure.sh | 4 +-
> tests/unit/meson.build | 2 +-
> 12 files changed, 173 insertions(+), 177 deletions(-)
Applied, thanks.
r~
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PULL 07/16] configure, meson: move ARCH to meson.build
2021-12-19 14:17 ` [PULL 07/16] configure, meson: move ARCH to meson.build Paolo Bonzini
@ 2021-12-21 2:46 ` Richard Henderson
2022-07-19 13:00 ` Peter Maydell
1 sibling, 0 replies; 23+ messages in thread
From: Richard Henderson @ 2021-12-21 2:46 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
On 12/19/21 6:17 AM, Paolo Bonzini wrote:
> $ARCH and the HOST_* symbols are only used by the QEMU build; configure
> uses $cpu instead. Remove it from config-host.mak.
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 21 ++++-----------------
> meson.build | 26 +++++++++++++++++---------
> 2 files changed, 21 insertions(+), 26 deletions(-)
This broke the cross-compiler infrastructure for tests, because tests/tcg/configure.sh
uses $ARCH, which is no longer defined.
r~
>
> diff --git a/configure b/configure
> index 108b7621e2..6e06ac6161 100755
> --- a/configure
> +++ b/configure
> @@ -635,11 +635,9 @@ else
> cpu=$(uname -m)
> fi
>
> -ARCH=
> -# Normalise host CPU name, set ARCH and multilib cflags
> +# Normalise host CPU name, set multilib cflags
> # Note that this case should only have supported host CPUs, not guests.
> case "$cpu" in
> - aarch64|riscv) ;;
> armv*b|armv*l|arm)
> cpu="arm" ;;
>
> @@ -668,8 +666,7 @@ case "$cpu" in
> CPU_CFLAGS="-m64 -mlittle" ;;
>
> s390)
> - CPU_CFLAGS="-m31"
> - ARCH=unknown ;;
> + CPU_CFLAGS="-m31" ;;
> s390x)
> CPU_CFLAGS="-m64" ;;
>
> @@ -678,15 +675,7 @@ case "$cpu" in
> CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc" ;;
> sparc64)
> CPU_CFLAGS="-m64 -mcpu=ultrasparc" ;;
> -
> - *)
> - # This will result in either an error or falling back to TCI later
> - ARCH=unknown
> - ;;
> esac
> -if test -z "$ARCH"; then
> - ARCH="$cpu"
> -fi
>
> : ${make=${MAKE-make}}
>
> @@ -3406,8 +3395,6 @@ echo "GIT=$git" >> $config_host_mak
> echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
> echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_host_mak
>
> -echo "ARCH=$ARCH" >> $config_host_mak
> -
> if test "$debug_tcg" = "yes" ; then
> echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
> fi
> @@ -3898,12 +3885,12 @@ if test "$skip_meson" = no; then
> cross_arg="--cross-file config-meson.cross"
> echo "[host_machine]" >> $cross
> echo "system = '$targetos'" >> $cross
> - case "$ARCH" in
> + case "$cpu" in
> i386)
> echo "cpu_family = 'x86'" >> $cross
> ;;
> *)
> - echo "cpu_family = '$ARCH'" >> $cross
> + echo "cpu_family = '$cpu'" >> $cross
> ;;
> esac
> echo "cpu = '$cpu'" >> $cross
> diff --git a/meson.build b/meson.build
> index 4fdaa65b05..2495360fd0 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -67,6 +67,14 @@ endif
>
> targetos = host_machine.system()
>
> +if cpu not in supported_cpus
> + host_arch = 'unknown'
> +elif cpu == 'x86'
> + host_arch = 'i386'
> +else
> + host_arch = cpu
> +endif
> +
> if cpu in ['x86', 'x86_64']
> kvm_targets = ['i386-softmmu', 'x86_64-softmmu']
> elif cpu == 'aarch64'
> @@ -335,9 +343,9 @@ if targetos == 'netbsd'
> endif
> endif
>
> -tcg_arch = config_host['ARCH']
> +tcg_arch = host_arch
> if not get_option('tcg').disabled()
> - if cpu not in supported_cpus
> + if host_arch == 'unknown'
> if get_option('tcg_interpreter')
> warning('Unsupported CPU @0@, will use TCG with TCI (slow)'.format(cpu))
> else
> @@ -353,11 +361,11 @@ if not get_option('tcg').disabled()
> endif
> if get_option('tcg_interpreter')
> tcg_arch = 'tci'
> - elif config_host['ARCH'] == 'sparc64'
> + elif host_arch == 'sparc64'
> tcg_arch = 'sparc'
> - elif config_host['ARCH'] == 'x86_64'
> + elif host_arch == 'x86_64'
> tcg_arch = 'i386'
> - elif config_host['ARCH'] == 'ppc64'
> + elif host_arch == 'ppc64'
> tcg_arch = 'ppc'
> endif
> add_project_arguments('-iquote', meson.current_source_dir() / 'tcg' / tcg_arch,
> @@ -1426,6 +1434,8 @@ config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATEDIR', get_option('prefix') /
> config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir)
> config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir'))
>
> +config_host_data.set('HOST_' + host_arch.to_upper(), 1)
> +
> config_host_data.set('CONFIG_ATTR', libattr.found())
> config_host_data.set('CONFIG_BRLAPI', brlapi.found())
> config_host_data.set('CONFIG_COCOA', cocoa.found())
> @@ -1775,8 +1785,6 @@ foreach k, v: config_host
> v = '"' + '", "'.join(v.split()) + '", '
> endif
> config_host_data.set(k, v)
> - elif k == 'ARCH'
> - config_host_data.set('HOST_' + v.to_upper(), 1)
> elif strings.contains(k)
> config_host_data.set_quoted(k, v)
> elif k.startswith('CONFIG_')
> @@ -1919,7 +1927,7 @@ foreach target : target_dirs
> endif
>
> foreach k, v: disassemblers
> - if config_host['ARCH'].startswith(k) or config_target['TARGET_BASE_ARCH'].startswith(k)
> + if host_arch.startswith(k) or config_target['TARGET_BASE_ARCH'].startswith(k)
> foreach sym: v
> config_target += { sym: 'y' }
> config_all_disas += { sym: 'y' }
> @@ -2888,7 +2896,7 @@ foreach target : target_dirs
> endif
> if 'CONFIG_LINUX_USER' in config_target
> base_dir = 'linux-user'
> - target_inc += include_directories('linux-user/host/' / config_host['ARCH'])
> + target_inc += include_directories('linux-user/host/' / host_arch)
> endif
> if 'CONFIG_BSD_USER' in config_target
> base_dir = 'bsd-user'
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PULL 09/16] configure: remove DIRS
2021-12-19 14:17 ` [PULL 09/16] configure: remove DIRS Paolo Bonzini
@ 2022-01-07 11:02 ` Thomas Huth
0 siblings, 0 replies; 23+ messages in thread
From: Thomas Huth @ 2022-01-07 11:02 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
Cc: Peter Maydell, Alex Bennée, Daniel P. Berrange
On 19/12/2021 15.17, Paolo Bonzini wrote:
> DIRS is used to create the directory in which the LINKS symbolic links
> reside, or to create directories for object files. The former can
> be done directly in the symlinking loop, while the latter is done
> by Meson already, so DIRS is not necessary.
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> Tested-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/configure b/configure
> index ba85bbb54b..8ccfe51673 100755
> --- a/configure
> +++ b/configure
> @@ -3762,7 +3762,6 @@ if test "$safe_stack" = "yes"; then
> fi
>
> # If we're using a separate build tree, set it up now.
> -# DIRS are directories which we simply mkdir in the build tree;
> # LINKS are things to symlink back into the source tree
> # (these can be both files and directories).
> # Caution: do not add files or directories here using wildcards. This
> @@ -3774,12 +3773,6 @@ fi
> # UNLINK is used to remove symlinks from older development versions
> # that might get into the way when doing "git update" without doing
> # a "make distclean" in between.
> -DIRS="tests tests/tcg tests/qapi-schema tests/qtest/libqos"
> -DIRS="$DIRS tests/qtest tests/qemu-iotests tests/vm tests/fp tests/qgraph"
> -DIRS="$DIRS docs docs/interop fsdev scsi"
> -DIRS="$DIRS pc-bios/optionrom pc-bios/s390-ccw"
> -DIRS="$DIRS roms/seabios"
> -DIRS="$DIRS contrib/plugins/"
> LINKS="Makefile"
> LINKS="$LINKS tests/tcg/Makefile.target"
> LINKS="$LINKS pc-bios/optionrom/Makefile"
> @@ -3807,9 +3800,9 @@ for bios_file in \
> do
> LINKS="$LINKS pc-bios/$(basename $bios_file)"
> done
> -mkdir -p $DIRS
> for f in $LINKS ; do
> if [ -e "$source_path/$f" ]; then
> + mkdir -p `dirname ./$f`
> symlink "$source_path/$f" "$f"
> fi
> done
Hi Paolo,
I think this patch created some warnings with fresh build directories on git
checkouts where roms/seabios is not initialized:
.../qemu/configure: line 3778: roms/seabios/config.mak: No such file or
directory
.../qemu/configure: line 3779: roms/seabios/config.mak: No such file or
directory
.../qemu/configure: line 3780: roms/seabios/config.mak: No such file or
directory
.../qemu/configure: line 3781: roms/seabios/config.mak: No such file or
directory
.../qemu/configure: line 3782: roms/seabios/config.mak: No such file or
directory
.../qemu/configure: line 3783: roms/seabios/config.mak: No such file or
directory
.../qemu/configure: line 3784: roms/seabios/config.mak: No such file or
directory
.../qemu/configure: line 3785: roms/seabios/config.mak: No such file or
directory
.../qemu/configure: line 3786: roms/seabios/config.mak: No such file or
directory
.../qemu/configure: line 3787: roms/seabios/config.mak: No such file or
directory
.../qemu/configure: line 3788: roms/seabios/config.mak: No such file or
directory
It's this block in the configure script which now does not find the
roms/seabios directory anymore:
# temporary config to build submodules
for rom in seabios; do
config_mak=roms/$rom/config.mak
echo "# Automatically generated by configure - do not modify" > $config_mak
echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak
echo "AS=$as" >> $config_mak
echo "CCAS=$ccas" >> $config_mak
echo "CC=$cc" >> $config_mak
echo "BCC=bcc" >> $config_mak
echo "CPP=$cpp" >> $config_mak
echo "OBJCOPY=objcopy" >> $config_mak
echo "IASL=$iasl" >> $config_mak
echo "LD=$ld" >> $config_mak
echo "RANLIB=$ranlib" >> $config_mak
done
If I get that right, we only need config.mak if the seabios submodule has
been checked out? So the right fix might be to skip the creation of
config.mak here if roms/seabios is not available?
Thomas
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PULL 07/16] configure, meson: move ARCH to meson.build
2021-12-19 14:17 ` [PULL 07/16] configure, meson: move ARCH to meson.build Paolo Bonzini
2021-12-21 2:46 ` Richard Henderson
@ 2022-07-19 13:00 ` Peter Maydell
2022-07-19 18:10 ` Paolo Bonzini
1 sibling, 1 reply; 23+ messages in thread
From: Peter Maydell @ 2022-07-19 13:00 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, Richard Henderson
On Sun, 19 Dec 2021 at 14:25, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> $ARCH and the HOST_* symbols are only used by the QEMU build; configure
> uses $cpu instead. Remove it from config-host.mak.
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 21 ++++-----------------
> meson.build | 26 +++++++++++++++++---------
> 2 files changed, 21 insertions(+), 26 deletions(-)
>
> diff --git a/configure b/configure
> index 108b7621e2..6e06ac6161 100755
> --- a/configure
> +++ b/configure
> @@ -635,11 +635,9 @@ else
> cpu=$(uname -m)
> fi
>
> -ARCH=
> -# Normalise host CPU name, set ARCH and multilib cflags
> +# Normalise host CPU name, set multilib cflags
> # Note that this case should only have supported host CPUs, not guests.
> case "$cpu" in
> - aarch64|riscv) ;;
> armv*b|armv*l|arm)
> cpu="arm" ;;
>
> @@ -668,8 +666,7 @@ case "$cpu" in
> CPU_CFLAGS="-m64 -mlittle" ;;
>
> s390)
> - CPU_CFLAGS="-m31"
> - ARCH=unknown ;;
> + CPU_CFLAGS="-m31" ;;
> s390x)
> CPU_CFLAGS="-m64" ;;
>
> @@ -678,15 +675,7 @@ case "$cpu" in
> CPU_CFLAGS="-m32 -mv8plus -mcpu=ultrasparc" ;;
> sparc64)
> CPU_CFLAGS="-m64 -mcpu=ultrasparc" ;;
> -
> - *)
> - # This will result in either an error or falling back to TCI later
> - ARCH=unknown
> - ;;
> esac
> -if test -z "$ARCH"; then
> - ARCH="$cpu"
> -fi
>
> : ${make=${MAKE-make}}
shellcheck points out that this (old) commit removed the code
setting ARCH from configure, but left behind a use of it:
case "$ARCH" in
alpha)
# Ensure there's only a single GP
QEMU_CFLAGS="-msmall-data $QEMU_CFLAGS"
;;
esac
Presumably meson.build needs to do some equivalent of this ?
thanks
-- PMM
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PULL 07/16] configure, meson: move ARCH to meson.build
2022-07-19 13:00 ` Peter Maydell
@ 2022-07-19 18:10 ` Paolo Bonzini
2022-07-20 0:51 ` Richard Henderson
0 siblings, 1 reply; 23+ messages in thread
From: Paolo Bonzini @ 2022-07-19 18:10 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel, Richard Henderson
On 7/19/22 15:00, Peter Maydell wrote:
> shellcheck points out that this (old) commit removed the code
> setting ARCH from configure, but left behind a use of it:
>
> case "$ARCH" in
> alpha)
> # Ensure there's only a single GP
> QEMU_CFLAGS="-msmall-data $QEMU_CFLAGS"
> ;;
> esac
>
> Presumably meson.build needs to do some equivalent of this ?
Yeah, I'll send a patch before 7.1 gets out (Richard, as the resident
Alpha guy do you why it is needed?).
Paolo
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PULL 07/16] configure, meson: move ARCH to meson.build
2022-07-19 18:10 ` Paolo Bonzini
@ 2022-07-20 0:51 ` Richard Henderson
0 siblings, 0 replies; 23+ messages in thread
From: Richard Henderson @ 2022-07-20 0:51 UTC (permalink / raw)
To: Paolo Bonzini, Peter Maydell; +Cc: qemu-devel
On 7/19/22 23:40, Paolo Bonzini wrote:
> On 7/19/22 15:00, Peter Maydell wrote:
>> shellcheck points out that this (old) commit removed the code
>> setting ARCH from configure, but left behind a use of it:
>>
>> case "$ARCH" in
>> alpha)
>> # Ensure there's only a single GP
>> QEMU_CFLAGS="-msmall-data $QEMU_CFLAGS"
>> ;;
>> esac
>>
>> Presumably meson.build needs to do some equivalent of this ?
>
> Yeah, I'll send a patch before 7.1 gets out (Richard, as the resident Alpha guy do you why
> it is needed?).
It was to allow simplifying assumptions in the jit for tcg/alpha, the patches for which
were on list but never committed.
This can be dropped.
r~
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2022-07-20 0:53 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-19 14:16 [PULL 00/16] Misc patches for 2021-12-20 Paolo Bonzini
2021-12-19 14:16 ` [PULL 01/16] configure: make $targetos lowercase, use windows instead of MINGW32 Paolo Bonzini
2021-12-19 14:16 ` [PULL 02/16] configure: move target detection before CPU detection Paolo Bonzini
2021-12-19 14:16 ` [PULL 03/16] configure: unify two case statements on $cpu Paolo Bonzini
2021-12-19 14:16 ` [PULL 04/16] configure: unify ppc64 and ppc64le Paolo Bonzini
2021-12-19 14:17 ` [PULL 05/16] configure: unify x86_64 and x32 Paolo Bonzini
2021-12-19 14:17 ` [PULL 06/16] meson: rename "arch" variable Paolo Bonzini
2021-12-19 14:17 ` [PULL 07/16] configure, meson: move ARCH to meson.build Paolo Bonzini
2021-12-21 2:46 ` Richard Henderson
2022-07-19 13:00 ` Peter Maydell
2022-07-19 18:10 ` Paolo Bonzini
2022-07-20 0:51 ` Richard Henderson
2021-12-19 14:17 ` [PULL 08/16] configure: remove unnecessary symlinks Paolo Bonzini
2021-12-19 14:17 ` [PULL 09/16] configure: remove DIRS Paolo Bonzini
2022-01-07 11:02 ` Thomas Huth
2021-12-19 14:17 ` [PULL 10/16] meson: reenable test-fdmon-epoll Paolo Bonzini
2021-12-19 14:17 ` [PULL 11/16] cpu: remove unnecessary #ifdef CONFIG_TCG Paolo Bonzini
2021-12-19 14:20 ` [PULL 12/16] meson: add "check" argument to run_command Paolo Bonzini
2021-12-19 14:20 ` [PULL 13/16] hw/scsi: Fix scsi_bus_init_named() docstring Paolo Bonzini
2021-12-19 14:20 ` [PULL 14/16] hw/scsi/megasas: Fails command if SGL buffer overflows Paolo Bonzini
2021-12-19 14:20 ` [PULL 15/16] tests/qtest/fuzz-megasas-test: Add test for GitLab issue #521 Paolo Bonzini
2021-12-19 14:20 ` [PULL 16/16] hw/i386/vmmouse: Require 'i8042' property to be set Paolo Bonzini
2021-12-20 4:47 ` [PULL 00/16] Misc patches for 2021-12-20 Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).