From 32eb2da326b3ef5573834304934d2b13fee82639 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Sat, 2 Nov 2019 12:43:46 +0100 Subject: [PATCH 1/5] Makefile: install bios-microvm like other binary blobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 0d5fae3e52e introduced bios-microvm.bin but forgot to add it to the list of blobs being installed. Add it to the list of BLOBS that get installed. Fixes: 0d5fae3e52e "roms: add microvm-bios (qboot) as binary" Signed-off-by: Bruce Rogers [PMD: Reworded description] Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefano Garzarella Reviewed-by: Sergio Lopez Message-Id: <20191102114346.6445-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aa9d1a42aa..a8998fe5cf 100644 --- a/Makefile +++ b/Makefile @@ -771,7 +771,7 @@ de-ch es fo fr-ca hu ja mk pt sl tr \ bepo cz ifdef INSTALL_BLOBS -BLOBS=bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ +BLOBS=bios.bin bios-256k.bin bios-microvm.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \ vgabios-ramfb.bin vgabios-bochs-display.bin vgabios-ati.bin \ ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \ From d55e937d3eb07ed98a0554517e5098b51e37a62f Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Mon, 4 Nov 2019 14:23:55 +0100 Subject: [PATCH 2/5] qom: Fix error message in object_class_property_add() The error message in object_class_property_add() was copied from object_property_add() in commit 16bf7f522a2ff. Clarify that it is about a class, not an object. While here, have the format string in both functions to fit in a single line for better grep-ability, despite the checkpatch warning. Signed-off-by: Greg Kurz Reviewed-by: Laurent Vivier Message-Id: <157287383591.234942.311840593519058490.stgit@bahia.tlslab.ibm.com> Signed-off-by: Laurent Vivier --- qom/object.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/qom/object.c b/qom/object.c index 6fa9c619fa..d51b57fba1 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1106,9 +1106,8 @@ object_property_add(Object *obj, const char *name, const char *type, } if (object_property_find(obj, name, NULL) != NULL) { - error_setg(errp, "attempt to add duplicate property '%s'" - " to object (type '%s')", name, - object_get_typename(obj)); + error_setg(errp, "attempt to add duplicate property '%s' to object (type '%s')", + name, object_get_typename(obj)); return NULL; } @@ -1139,9 +1138,8 @@ object_class_property_add(ObjectClass *klass, ObjectProperty *prop; if (object_class_property_find(klass, name, NULL) != NULL) { - error_setg(errp, "attempt to add duplicate property '%s'" - " to object (type '%s')", name, - object_class_get_name(klass)); + error_setg(errp, "attempt to add duplicate property '%s' to class (type '%s')", + name, object_class_get_name(klass)); return NULL; } From 88ed5db16c9b8ee2a6ec6d285f542b0a68a3c6e1 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Wed, 6 Nov 2019 13:46:40 +0100 Subject: [PATCH 3/5] numa: Add missing \n to error message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If memory allocation fails when using -mem-path, QEMU is supposed to print out a message to indicate that fallback to anonymous RAM is deprecated. This is done with error_printf() which does output buffering. As a consequence, the message is only printed at the next flush, eg. when quiting QEMU, and it also lacks a trailing newline: qemu-system-ppc64: unable to map backing store for guest RAM: Cannot allocate memory qemu-system-ppc64: warning: falling back to regular RAM allocation QEMU 4.1.50 monitor - type 'help' for more information (qemu) q This is deprecated. Make sure that -mem-path specified path has sufficient resources to allocate -m specified RAM amountgreg@boss02:~/Work/qemu/qemu-spapr$ Add the missing \n to fix both issues. Fixes: cb79224b7e4b "deprecate -mem-path fallback to anonymous RAM" Signed-off-by: Greg Kurz Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <157304440026.351774.14607704217028190097.stgit@bahia.lan> Signed-off-by: Laurent Vivier --- hw/core/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/numa.c b/hw/core/numa.c index 038c96d4ab..e3332a984f 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -503,7 +503,7 @@ static void allocate_system_memory_nonnuma(MemoryRegion *mr, Object *owner, warn_report("falling back to regular RAM allocation"); error_printf("This is deprecated. Make sure that -mem-path " " specified path has sufficient resources to allocate" - " -m specified RAM amount"); + " -m specified RAM amount\n"); /* Legacy behavior: if allocation failed, fall back to * regular RAM allocation. */ From 0602a6166df861c9fbbe72321c1a598c5fe1feb4 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Mon, 5 Aug 2019 07:54:52 +0200 Subject: [PATCH 4/5] ivshmem-server: Clean up shmem on shutdown So far, the server leaves the posix shared memory object behind when terminating, requiring the user to explicitly remove it in order to start a new instance. Signed-off-by: Jan Kiszka Reviewed-by: Claudio Fontana Message-Id: Signed-off-by: Laurent Vivier --- contrib/ivshmem-server/ivshmem-server.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/ivshmem-server/ivshmem-server.c b/contrib/ivshmem-server/ivshmem-server.c index 77f97b209c..88daee812d 100644 --- a/contrib/ivshmem-server/ivshmem-server.c +++ b/contrib/ivshmem-server/ivshmem-server.c @@ -353,6 +353,9 @@ ivshmem_server_start(IvshmemServer *server) err_close_sock: close(sock_fd); err_close_shm: + if (server->use_shm_open) { + shm_unlink(server->shm_path); + } close(shm_fd); return -1; } @@ -370,6 +373,9 @@ ivshmem_server_close(IvshmemServer *server) } unlink(server->unix_sock_path); + if (server->use_shm_open) { + shm_unlink(server->shm_path); + } close(server->sock_fd); close(server->shm_fd); server->sock_fd = -1; From 5c62979ed5f75976ae215098566ebd93dfe4e22a Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sat, 3 Aug 2019 15:22:04 +0200 Subject: [PATCH 5/5] ivshmem-server: Terminate also on SIGINT Allows to shutdown a foreground session via ctrl-c. Signed-off-by: Jan Kiszka Reviewed-by: Claudio Fontana Reviewed-by: Stefano Garzarella Message-Id: <99c1a7bd-1876-66a2-4b8e-d5bc86116fe7@web.de> Signed-off-by: Laurent Vivier --- contrib/ivshmem-server/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/ivshmem-server/main.c b/contrib/ivshmem-server/main.c index 197c79c57e..e4cd35f74c 100644 --- a/contrib/ivshmem-server/main.c +++ b/contrib/ivshmem-server/main.c @@ -223,8 +223,9 @@ main(int argc, char *argv[]) sa_quit.sa_handler = ivshmem_server_quit_cb; sa_quit.sa_flags = 0; if (sigemptyset(&sa_quit.sa_mask) == -1 || - sigaction(SIGTERM, &sa_quit, 0) == -1) { - perror("failed to add SIGTERM handler; sigaction"); + sigaction(SIGTERM, &sa_quit, 0) == -1 || + sigaction(SIGINT, &sa_quit, 0) == -1) { + perror("failed to add signal handler; sigaction"); goto err; }