Skip to contentSkip to conversation

Trivial branch patches

GIT PULL Applied Laurent Vivier 2 participants 7 messages Nov 12, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

The following changes since commit 9f2ce35dfa4ea4a31dbb765dd02bed2500891887:

Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20191111' into staging (2019-11-11 16:54:16 +0000)

are available in the Git repository at:

git://github.com/vivier/qemu.git tags/trivial-branch-pull-request

for you to fetch changes up to 5c62979ed5f75976ae215098566ebd93dfe4e22a:

ivshmem-server: Terminate also on SIGINT (2019-11-12 10:37:20 +0100)

----------------------------------------------------------------
Trivial fixes (20191112)
ivshmem-server, error messages (numa, qom) and
Makefile (bios-microvm) fixes

----------------------------------------------------------------

Bruce Rogers (1):
Makefile: install bios-microvm like other binary blobs

Greg Kurz (2):
qom: Fix error message in object_class_property_add()
numa: Add missing \n to error message

Jan Kiszka (2):
ivshmem-server: Clean up shmem on shutdown
ivshmem-server: Terminate also on SIGINT

 Makefile                                |  2 +-
 contrib/ivshmem-server/ivshmem-server.c |  6 ++++++
 contrib/ivshmem-server/main.c           |  5 +++--
 hw/core/numa.c                          |  2 +-
 qom/object.c                            | 10 ++++------
 5 files changed, 15 insertions(+), 10 deletions(-)
Signature · 1 line
2.21.0
#1 lore raw

[PULL 3/5] numa: Add missing \n to error message

From: Greg Kurz <[email protected]>

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"

Message-Id: <[email protected]>

---
 hw/core/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/core/numa.c +1 -1
index 038c96d4abc6..e3332a984f7c 100644
@@ -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.
              */
Signature · 1 line
2.21.0
#2 lore raw

[PULL 2/5] qom: Fix error message in object_class_property_add()

In reply to Laurent Vivier

From: Greg Kurz <[email protected]>

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.

Message-Id: <157287383591.234942.311840593519058490.stgit@bahia.tlslab.ibm.com>

---
 qom/object.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
qom/object.c +4 -6
index 6fa9c619fac4..d51b57fba11e 100644
@@ -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;
     }
 
Signature · 1 line
2.21.0
#3 lore raw

[PULL 1/5] Makefile: install bios-microvm like other binary blobs

In reply to Laurent Vivier

From: Bruce Rogers <[email protected]>

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"
[PMD: Reworded description]

Message-Id: <[email protected]>

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index aa9d1a42aa91..a8998fe5cf79 100644
@@ -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 \
Signature · 1 line
2.21.0
#4 lore raw

[PULL 5/5] ivshmem-server: Terminate also on SIGINT

In reply to Laurent Vivier

From: Jan Kiszka <[email protected]>

Allows to shutdown a foreground session via ctrl-c.

Message-Id: <[email protected]>

---
 contrib/ivshmem-server/main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
contrib/ivshmem-server/main.c +3 -2
index 197c79c57ec2..e4cd35f74c61 100644
@@ -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;
     }
 
Signature · 1 line
2.21.0
#5 lore raw

[PULL 4/5] ivshmem-server: Clean up shmem on shutdown

In reply to Laurent Vivier

From: Jan Kiszka <[email protected]>

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.

Message-Id: <[email protected]>

---
 contrib/ivshmem-server/ivshmem-server.c | 6 ++++++
 1 file changed, 6 insertions(+)
contrib/ivshmem-server/ivshmem-server.c +6 -0
index 77f97b209cb9..88daee812d65 100644
@@ -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;
Signature · 1 line
2.21.0
#6 lore raw
In reply to Laurent Vivier
Quoted 11 lines · Laurent Vivier

The following changes since commit 9f2ce35dfa4ea4a31dbb765dd02bed2500891887:

Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20191111' into staging (2019-11-11 16:54:16 +0000)

are available in the Git repository at:

git://github.com/vivier/qemu.git tags/trivial-branch-pull-request

for you to fetch changes up to 5c62979ed5f75976ae215098566ebd93dfe4e22a:

Quoted 8 lines

ivshmem-server: Terminate also on SIGINT (2019-11-12 10:37:20 +0100)

----------------------------------------------------------------
Trivial fixes (20191112)
ivshmem-server, error messages (numa, qom) and
Makefile (bios-microvm) fixes

----------------------------------------------------------------

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.

-- PMM