Skip to contentSkip to conversation

qtest, Makefiles and shell script improvements

GIT PULL Applied Thomas Huth 2 participants 8 messages Oct 24, 2018

lore
Share & tools
lore
#0 lore raw

Hi Peter,

the following changes since commit 13399aad4fa87b2878c49d02a5d3bafa6c966ba3:

Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-10-22' into staging (2018-10-23 17:20:23 +0100)

are available in the git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2018-10-24

for you to fetch changes up to 86583a07c4a7d55b04db5942a70d176f5299144a:

configure: Provide option to explicitly disable AVX2 (2018-10-24 07:39:10 +0100)

----------------------------------------------------------------
- Disable migration-test with TCG on s390x (since there are known problems)
- Small Makefile improvements
- More modern shell scripting changes (use $() instead of ``)
- Add a configure option to disable AVX2
----------------------------------------------------------------

Liam Merwick (1):
configure: Provide option to explicitly disable AVX2

Mao Zhongyi (2):

      debian-bootstrap.pre: Modern shell scripting (use $() instead of ``)
      po/Makefile: Modern shell scripting (use $() instead of ``)

Thomas Huth (3):
tests/migration-test: Disable s390x test when running with TCG hw/core: Move null-machine into the common-obj list
configs: Add a CONFIG_SMC37C669 switch for the "smc37c669-superio" device

 configure                                     | 11 +++++++++--
 default-configs/alpha-softmmu.mak             |  1 +
 hw/core/Makefile.objs                         |  3 +--
 hw/core/null-machine.c                        |  2 +-
 hw/isa/Makefile.objs                          |  3 ++-
 po/Makefile                                   |  2 +-
 tests/docker/dockerfiles/debian-bootstrap.pre |  4 ++--
 tests/migration-test.c                        | 16 ++++++++++++++++
 8 files changed, 33 insertions(+), 9 deletions(-)
#1 lore raw

[Qemu-devel] [PULL 1/6] 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.

---
 tests/migration-test.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
tests/migration-test.c +16 -0
index b792025..06ca506 100644
@@ -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));
Signature · 1 line
1.8.3.1
#2 lore raw

[Qemu-devel] [PULL 2/6] hw/core: Move null-machine into the common-obj list

In reply to Thomas Huth

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.

---
 hw/core/Makefile.objs  | 3 +--
 hw/core/null-machine.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
hw/core/Makefile.objs +1 -2
index b736ce2..a799c83 100644
@@ -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
hw/core/null-machine.c +1 -1
index cde4d3e..76d3f8e 100644
@@ -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)
 {
Signature · 1 line
1.8.3.1
#3 lore raw

[Qemu-devel] [PULL 3/6] configs: Add a CONFIG_SMC37C669 switch for the "smc37c669-superio" device

In reply to Thomas Huth

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.

---
 default-configs/alpha-softmmu.mak | 1 +
 hw/isa/Makefile.objs              | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
default-configs/alpha-softmmu.mak +1 -0
index bbe361f..eb58b40 100644
@@ -19,3 +19,4 @@ CONFIG_IDE_CMD646=y
 CONFIG_I8259=y
 CONFIG_MC146818RTC=y
 CONFIG_ISA_TESTDEV=y
+CONFIG_SMC37C669=y
hw/isa/Makefile.objs +2 -1
index 83e06f6..9e106df 100644
@@ -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
Signature · 1 line
1.8.3.1
#4 lore raw

[Qemu-devel] [PULL 4/6] debian-bootstrap.pre: Modern shell scripting (use $() instead of ``)

In reply to Thomas Huth

From: Mao Zhongyi <[email protected]>

Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere.

---
 tests/docker/dockerfiles/debian-bootstrap.pre | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/dockerfiles/debian-bootstrap.pre +2 -2
index 3b0ef95..c164778 100755
@@ -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
Signature · 1 line
1.8.3.1
#5 lore raw

[Qemu-devel] [PULL 5/6] po/Makefile: Modern shell scripting (use $() instead of ``)

In reply to Thomas Huth

From: Mao Zhongyi <[email protected]>

Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere.

---
 po/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
po/Makefile +1 -1
index e47e262..c041f4c 100644
@@ -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
Signature · 1 line
1.8.3.1
#6 lore raw

[Qemu-devel] [PULL 6/6] configure: Provide option to explicitly disable AVX2

In reply to Thomas Huth

From: Liam Merwick <[email protected]>

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.

---
 configure | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
configure +9 -2
index e39f63d..1ee09bd 100755
@@ -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
 
Signature · 1 line
1.8.3.1
#7 lore raw
In reply to Thomas Huth
Quoted 12 lines · Thomas Huth

Hi Peter,

the following changes since commit 13399aad4fa87b2878c49d02a5d3bafa6c966ba3:

Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-10-22' into staging (2018-10-23 17:20:23 +0100)

are available in the git repository at:

https://gitlab.com/huth/qemu.git tags/pull-request-2018-10-24

for you to fetch changes up to 86583a07c4a7d55b04db5942a70d176f5299144a:

Quoted 8 lines

configure: Provide option to explicitly disable AVX2 (2018-10-24 07:39:10 +0100)

----------------------------------------------------------------
- Disable migration-test with TCG on s390x (since there are known problems)
- Small Makefile improvements
- More modern shell scripting changes (use $() instead of ``)
- Add a configure option to disable AVX2
----------------------------------------------------------------

Applied, thanks.

-- PMM