From d254b392cb1006039e3f1ede3375181b878091c5 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 19 Oct 2018 12:54:47 +0200 Subject: tests/migration-test: Disable s390x test when running with TCG The migration test for s390x sometimes hangs when running with TCG, similar to the problems that we have already observed with TCG for the ppc64 guests. Thus disable the s390x test when we are not running with KVM for now until the problem with TCG has been resolved. Reviewed-by: Laurent Vivier Reviewed-by: Emilio G. Cota Signed-off-by: Thomas Huth --- tests/migration-test.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/migration-test.c b/tests/migration-test.c index b7920255c5..06ca5068d8 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -803,6 +803,22 @@ int main(int argc, char **argv) return 0; } + /* + * Similar to ppc64, s390x seems to be touchy with TCG, so disable it + * there until the problems are resolved + */ + if (g_str_equal(qtest_get_arch(), "s390x")) { +#if defined(HOST_S390X) + if (access("/dev/kvm", R_OK | W_OK)) { + g_test_message("Skipping test: kvm not available"); + return 0; + } +#else + g_test_message("Skipping test: Need s390x host to work properly"); + return 0; +#endif + } + tmpfs = mkdtemp(template); if (!tmpfs) { g_test_message("mkdtemp on path (%s): %s\n", template, strerror(errno)); -- cgit v1.2.3-55-g7522 From 3858ff763985fb9e9516cd36ae119562b9d61fea Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 19 Oct 2018 14:28:49 +0200 Subject: hw/core: Move null-machine into the common-obj list The null-machine code used to be target specific since it used the target-specific cpu_init() function in the past. But in the recent commit 2278b93941d42c30e2950 ("Use cpu_create(type) instead of cpu_init(cpu_model)") this has been change, so that the code now uses the common cpu_create() function instead. Thus we can put the null-machine into the common-obj list so that it is compiled only once for all targets, to save some compilation time. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- hw/core/Makefile.objs | 3 +-- hw/core/null-machine.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs index b736ce223a..a799c83815 100644 --- a/hw/core/Makefile.objs +++ b/hw/core/Makefile.objs @@ -21,5 +21,4 @@ common-obj-$(CONFIG_SOFTMMU) += or-irq.o common-obj-$(CONFIG_SOFTMMU) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o common-obj-$(CONFIG_SOFTMMU) += generic-loader.o - -obj-$(CONFIG_SOFTMMU) += null-machine.o +common-obj-$(CONFIG_SOFTMMU) += null-machine.o diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c index cde4d3eb57..76d3f8e39c 100644 --- a/hw/core/null-machine.c +++ b/hw/core/null-machine.c @@ -18,7 +18,7 @@ #include "hw/boards.h" #include "sysemu/sysemu.h" #include "exec/address-spaces.h" -#include "cpu.h" +#include "qom/cpu.h" static void machine_none_init(MachineState *mch) { -- cgit v1.2.3-55-g7522 From eae2e2e96bfb75eb8cf3445a7933579871dbcee9 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 17 Oct 2018 17:23:21 +0200 Subject: configs: Add a CONFIG_SMC37C669 switch for the "smc37c669-superio" device This device is not user-creatable and currently only used for the "alpha" target. So if the user does not want to compile alpha-softmmu, we should also not compile this device. Add a proper config switch to be able to compile this more flexibly. Reviewed-by: Peter Maydell Signed-off-by: Thomas Huth --- default-configs/alpha-softmmu.mak | 1 + hw/isa/Makefile.objs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/default-configs/alpha-softmmu.mak b/default-configs/alpha-softmmu.mak index bbe361f01a..eb58b40254 100644 --- a/default-configs/alpha-softmmu.mak +++ b/default-configs/alpha-softmmu.mak @@ -19,3 +19,4 @@ CONFIG_IDE_CMD646=y CONFIG_I8259=y CONFIG_MC146818RTC=y CONFIG_ISA_TESTDEV=y +CONFIG_SMC37C669=y diff --git a/hw/isa/Makefile.objs b/hw/isa/Makefile.objs index 83e06f6c04..9e106df186 100644 --- a/hw/isa/Makefile.objs +++ b/hw/isa/Makefile.objs @@ -1,9 +1,10 @@ common-obj-$(CONFIG_ISA_BUS) += isa-bus.o -common-obj-$(CONFIG_ISA_BUS) += isa-superio.o smc37c669-superio.o +common-obj-$(CONFIG_ISA_BUS) += isa-superio.o common-obj-$(CONFIG_APM) += apm.o common-obj-$(CONFIG_I82378) += i82378.o common-obj-$(CONFIG_PC87312) += pc87312.o common-obj-$(CONFIG_PIIX4) += piix4.o common-obj-$(CONFIG_VT82C686) += vt82c686.o +common-obj-$(CONFIG_SMC37C669) += smc37c669-superio.o obj-$(CONFIG_LPC_ICH9) += lpc_ich9.o -- cgit v1.2.3-55-g7522 From b91068cd34de43590c7e1da341e6e793436401ea Mon Sep 17 00:00:00 2001 From: Mao Zhongyi Date: Mon, 22 Oct 2018 16:48:23 +0800 Subject: debian-bootstrap.pre: Modern shell scripting (use $() instead of ``) Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Signed-off-by: Mao Zhongyi Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Thomas Huth --- tests/docker/dockerfiles/debian-bootstrap.pre | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre b/tests/docker/dockerfiles/debian-bootstrap.pre index 3b0ef95374..c164778c30 100755 --- a/tests/docker/dockerfiles/debian-bootstrap.pre +++ b/tests/docker/dockerfiles/debian-bootstrap.pre @@ -2,7 +2,7 @@ # # Simple wrapper for debootstrap, run in the docker build context # -FAKEROOT=`which fakeroot 2> /dev/null` +FAKEROOT=$(which fakeroot 2> /dev/null) # debootstrap < 1.0.67 generates empty sources.list, see Debian#732255 MIN_DEBOOTSTRAP_VERSION=1.0.67 @@ -52,7 +52,7 @@ fi if [ -z $DEBOOTSTRAP_DIR ]; then NEED_DEBOOTSTRAP=false - DEBOOTSTRAP=`which debootstrap 2> /dev/null` + DEBOOTSTRAP=$(which debootstrap 2> /dev/null) if [ -z $DEBOOTSTRAP ]; then echo "No debootstrap installed, attempting to install from SCM" NEED_DEBOOTSTRAP=true -- cgit v1.2.3-55-g7522 From ba27877618abcc4906db9a9168dbbb3104c1a3d0 Mon Sep 17 00:00:00 2001 From: Mao Zhongyi Date: Mon, 22 Oct 2018 16:48:24 +0800 Subject: po/Makefile: Modern shell scripting (use $() instead of ``) Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Signed-off-by: Mao Zhongyi Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- po/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/Makefile b/po/Makefile index e47e262ee6..c041f4c858 100644 --- a/po/Makefile +++ b/po/Makefile @@ -36,7 +36,7 @@ clean: install: $(OBJS) for obj in $(OBJS); do \ - base=`basename $$obj .mo`; \ + base=$$(basename $$obj .mo); \ $(INSTALL) -d $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES; \ $(INSTALL) -m644 $$obj $(DESTDIR)$(prefix)/share/locale/$$base/LC_MESSAGES/qemu.mo; \ done -- cgit v1.2.3-55-g7522 From 86583a07c4a7d55b04db5942a70d176f5299144a Mon Sep 17 00:00:00 2001 From: Liam Merwick Date: Fri, 19 Oct 2018 21:38:59 +0100 Subject: configure: Provide option to explicitly disable AVX2 The configure script detects if the compiler has AVX2 support and automatically sets avx2_opt="yes" which in turn defines CONFIG_AVX2_OPT. There is no way of explicitly overriding this setting so this commit adds two command-line options: --enable-avx2 and --disable-avx2. The default behaviour, when no option is specified, is to maintain the current behaviour and enable AVX2 if the compiler supports it. Signed-off-by: Liam Merwick Reviewed-by: Darren Kenny Reviewed-by: Mark Kanda Signed-off-by: Thomas Huth --- configure | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configure b/configure index e39f63d01d..1ee09bd112 100755 --- a/configure +++ b/configure @@ -428,7 +428,7 @@ usb_redir="" opengl="" opengl_dmabuf="no" cpuid_h="no" -avx2_opt="no" +avx2_opt="" zlib="yes" capstone="" lzo="" @@ -1329,6 +1329,10 @@ for opt do ;; --disable-glusterfs) glusterfs="no" ;; + --disable-avx2) avx2_opt="no" + ;; + --enable-avx2) avx2_opt="yes" + ;; --enable-glusterfs) glusterfs="yes" ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) @@ -1703,6 +1707,7 @@ disabled with --disable-FEATURE, default is enabled if available: libxml2 for Parallels image format tcmalloc tcmalloc support jemalloc jemalloc support + avx2 AVX2 optimization support replication replication support vhost-vsock virtio sockets device support opengl opengl support @@ -5032,7 +5037,7 @@ fi # There is no point enabling this if cpuid.h is not usable, # since we won't be able to select the new routines. -if test $cpuid_h = yes; then +if test "$cpuid_h" = "yes" -a "$avx2_opt" != "no"; then cat > $TMPC << EOF #pragma GCC push_options #pragma GCC target("avx2") @@ -5046,6 +5051,8 @@ int main(int argc, char *argv[]) { return bar(argv[0]); } EOF if compile_object "" ; then avx2_opt="yes" + else + avx2_opt="no" fi fi -- cgit v1.2.3-55-g7522