From 36524a1a3dd280189b3129029caa5d114b41b2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 7 Nov 2019 23:27:30 +0400 Subject: [PATCH 1/6] qtest: fix qtest_qmp_device_add leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spotted by ASAN. Signed-off-by: Marc-André Lureau Message-Id: <20191107192731.17330-3-marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth Fixes: b4510bb4109f5f ("tests: add qtest_qmp_device_add_qdict() helper") Signed-off-by: Thomas Huth --- tests/libqtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/libqtest.c b/tests/libqtest.c index 3706bccd8d..91e9cb220c 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -1274,6 +1274,7 @@ void qtest_qmp_device_add(QTestState *qts, const char *driver, const char *id, qdict_put_str(args, "id", id); qtest_qmp_device_add_qdict(qts, driver, args); + qobject_unref(args); } static void device_deleted_cb(void *opaque, const char *name, QDict *data) From 741309136e54fdcfff701d2311b4137b92c8b3c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 7 Nov 2019 23:27:31 +0400 Subject: [PATCH 2/6] cpu-plug-test: fix leaks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spotted by ASAN. Signed-off-by: Marc-André Lureau Message-Id: <20191107192731.17330-4-marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth Fixes: 021a007efc3 ("cpu-plug-test: fix device_add for pc/q35 machines") Signed-off-by: Thomas Huth --- tests/cpu-plug-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/cpu-plug-test.c b/tests/cpu-plug-test.c index 058cef5ac1..30e514bbfb 100644 --- a/tests/cpu-plug-test.c +++ b/tests/cpu-plug-test.c @@ -99,6 +99,7 @@ static void test_plug_with_device_add(gconstpointer data) cpu = qobject_to(QDict, e); if (qdict_haskey(cpu, "qom-path")) { + qobject_unref(e); continue; } @@ -107,6 +108,7 @@ static void test_plug_with_device_add(gconstpointer data) qtest_qmp_device_add_qdict(qts, td->device_model, props); hotplugged++; + qobject_unref(e); } /* make sure that there were hotplugged CPUs */ From 611aa4d00d5cd1a1b5df964c45116fa571549b68 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sat, 27 Jul 2019 08:15:48 +0200 Subject: [PATCH 3/6] MAINTAINERS: slirp: Remove myself as maintainer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I haven't been doing anything here for a long time, nor does my git repo still play a role. Signed-off-by: Jan Kiszka Message-Id: <759f8f44-9a01-a9f1-c7cf-65d40151a93a@web.de> Reviewed-by: Marc-André Lureau Acked-by: Samuel Thibault Signed-off-by: Thomas Huth --- MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 363e72a467..ff8d0d29f4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2143,13 +2143,11 @@ F: include/hw/registerfields.h SLIRP M: Samuel Thibault -M: Jan Kiszka S: Maintained F: slirp/ F: net/slirp.c F: include/net/slirp.h T: git https://people.debian.org/~sthibault/qemu.git slirp -T: git git://git.kiszka.org/qemu.git queues/slirp Stubs M: Paolo Bonzini From 84b2c7e59afc37e2146ae5ce3768cb8c439e979d Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Fri, 8 Nov 2019 10:43:07 +0000 Subject: [PATCH 4/6] tests/migration: Print some debug on bad status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We're seeing occasional asserts in 'wait_for_migraiton_fail', that I can't reliably reproduce, and where the cores don't have any useful state. Print the 'status' out, so we can see which unexpected state we're ending up in. Signed-off-by: Dr. David Alan Gilbert Message-Id: <20191108104307.125020-1-dgilbert@redhat.com> Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/migration-test.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index 59f291c654..ac780dffda 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -899,8 +899,13 @@ static void wait_for_migration_fail(QTestState *from, bool allow_active) do { status = migrate_query_status(from); - g_assert(!strcmp(status, "setup") || !strcmp(status, "failed") || - (allow_active && !strcmp(status, "active"))); + bool result = !strcmp(status, "setup") || !strcmp(status, "failed") || + (allow_active && !strcmp(status, "active")); + if (!result) { + fprintf(stderr, "%s: unexpected status status=%s allow_active=%d\n", + __func__, status, allow_active); + } + g_assert(result); failed = !strcmp(status, "failed"); g_free(status); } while (!failed); From 05dfa22b5b6b6358b0b2c0b09a180f6249ced0a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Nov 2019 12:45:30 +0100 Subject: [PATCH 5/6] configure: Only decompress EDK2 blobs for X86/ARM targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The EDK2 firmware blobs only target the X86/ARM architectures. Define the DECOMPRESS_EDK2_BLOBS variable and only decompress the blobs when the variable exists. See also: 536d2173b2b ("roms: build edk2 firmware binaries ...") Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191108114531.21518-2-philmd@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Luc Michel Reviewed-by: Laszlo Ersek Signed-off-by: Thomas Huth --- Makefile | 2 ++ configure | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Makefile b/Makefile index aa9d1a42aa..3430eca532 100644 --- a/Makefile +++ b/Makefile @@ -480,7 +480,9 @@ $(SOFTMMU_ALL_RULES): $(chardev-obj-y) $(SOFTMMU_ALL_RULES): $(crypto-obj-y) $(SOFTMMU_ALL_RULES): $(io-obj-y) $(SOFTMMU_ALL_RULES): config-all-devices.mak +ifdef DECOMPRESS_EDK2_BLOBS $(SOFTMMU_ALL_RULES): $(edk2-decompressed) +endif .PHONY: $(TARGET_DIRS_RULES) # The $(TARGET_DIRS_RULES) are of the form SUBDIR/GOAL, so that diff --git a/configure b/configure index efe165edf9..9b322284c3 100755 --- a/configure +++ b/configure @@ -427,6 +427,7 @@ softmmu="yes" linux_user="no" bsd_user="no" blobs="yes" +edk2_blobs="no" pkgversion="" pie="" qom_cast_debug="yes" @@ -2146,6 +2147,14 @@ case " $target_list " in ;; esac +for target in $target_list; do + case "$target" in + arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu) + edk2_blobs="yes" + ;; + esac +done + feature_not_found() { feature=$1 remedy=$2 @@ -7526,6 +7535,10 @@ if test "$libudev" != "no"; then echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak fi +if test "$edk2_blobs" = "yes" ; then + echo "DECOMPRESS_EDK2_BLOBS=y" >> $config_host_mak +fi + # use included Linux headers if test "$linux" = "yes" ; then mkdir -p linux-headers From 623ef637a2e42e023e7436d4bfbdc5159fb36684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 8 Nov 2019 12:45:31 +0100 Subject: [PATCH 6/6] configure: Check bzip2 is available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bzip2 tool is not included in default installations. On freshly installed systems, ./configure succeeds but 'make' might fail later: BUNZIP2 pc-bios/edk2-i386-secure-code.fd.bz2 /bin/sh: bzip2: command not found make: *** [Makefile:305: pc-bios/edk2-i386-secure-code.fd] Error 127 make: *** Deleting file 'pc-bios/edk2-i386-secure-code.fd' make: *** Waiting for unfinished jobs.... Add a check in ./configure to warn the user if bzip2 is missing. See also: 536d2173b2b ("roms: build edk2 firmware binaries ...") Reported-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191108114531.21518-3-philmd@redhat.com> Reviewed-by: Daniel P. Berrangé Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Laszlo Ersek Reviewed-by: Luc Michel Signed-off-by: Thomas Huth --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 9b322284c3..6099be1d84 100755 --- a/configure +++ b/configure @@ -2154,6 +2154,10 @@ for target in $target_list; do ;; esac done +# The EDK2 binaries are compressed with bzip2 +if test "$edk2_blobs" = "yes" && ! has bzip2; then + error_exit "The bzip2 program is required for building QEMU" +fi feature_not_found() { feature=$1