All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL 0/5] Trivial branch patches
@ 2019-11-12 10:04 Laurent Vivier
  2019-11-12 10:04 ` [PULL 1/5] Makefile: install bios-microvm like other binary blobs Laurent Vivier
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Laurent Vivier @ 2019-11-12 10:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P. Berrangé,
	Eduardo Habkost, qemu-trivial, Michael Tokarev, Laurent Vivier,
	Paolo Bonzini

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(-)

-- 
2.21.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PULL 1/5] Makefile: install bios-microvm like other binary blobs
  2019-11-12 10:04 [PULL 0/5] Trivial branch patches Laurent Vivier
@ 2019-11-12 10:04 ` Laurent Vivier
  2019-11-12 10:04 ` [PULL 2/5] qom: Fix error message in object_class_property_add() Laurent Vivier
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2019-11-12 10:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P. Berrangé,
	Eduardo Habkost, Sergio Lopez, qemu-trivial, Michael Tokarev,
	Laurent Vivier, Bruce Rogers, Paolo Bonzini,
	Philippe Mathieu-Daudé,
	Stefano Garzarella

From: Bruce Rogers <brogers@suse.com>

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 <brogers@suse.com>
[PMD: Reworded description]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Sergio Lopez <slp@redhat.com>
Message-Id: <20191102114346.6445-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index aa9d1a42aa91..a8998fe5cf79 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 \
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 2/5] qom: Fix error message in object_class_property_add()
  2019-11-12 10:04 [PULL 0/5] Trivial branch patches Laurent Vivier
  2019-11-12 10:04 ` [PULL 1/5] Makefile: install bios-microvm like other binary blobs Laurent Vivier
@ 2019-11-12 10:04 ` Laurent Vivier
  2019-11-12 10:04 ` [PULL 3/5] numa: Add missing \n to error message Laurent Vivier
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2019-11-12 10:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P. Berrangé,
	Eduardo Habkost, qemu-trivial, Michael Tokarev, Laurent Vivier,
	Greg Kurz, Paolo Bonzini

From: Greg Kurz <groug@kaod.org>

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 <groug@kaod.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <157287383591.234942.311840593519058490.stgit@bahia.tlslab.ibm.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 qom/object.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index 6fa9c619fac4..d51b57fba11e 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;
     }
 
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 3/5] numa: Add missing \n to error message
  2019-11-12 10:04 [PULL 0/5] Trivial branch patches Laurent Vivier
  2019-11-12 10:04 ` [PULL 1/5] Makefile: install bios-microvm like other binary blobs Laurent Vivier
  2019-11-12 10:04 ` [PULL 2/5] qom: Fix error message in object_class_property_add() Laurent Vivier
@ 2019-11-12 10:04 ` Laurent Vivier
  2019-11-12 10:04 ` [PULL 4/5] ivshmem-server: Clean up shmem on shutdown Laurent Vivier
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2019-11-12 10:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P. Berrangé,
	Eduardo Habkost, qemu-trivial, Michael Tokarev, Laurent Vivier,
	Greg Kurz, Paolo Bonzini, Philippe Mathieu-Daudé

From: Greg Kurz <groug@kaod.org>

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 <groug@kaod.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <157304440026.351774.14607704217028190097.stgit@bahia.lan>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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 038c96d4abc6..e3332a984f7c 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.
              */
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 4/5] ivshmem-server: Clean up shmem on shutdown
  2019-11-12 10:04 [PULL 0/5] Trivial branch patches Laurent Vivier
                   ` (2 preceding siblings ...)
  2019-11-12 10:04 ` [PULL 3/5] numa: Add missing \n to error message Laurent Vivier
@ 2019-11-12 10:04 ` Laurent Vivier
  2019-11-12 10:04 ` [PULL 5/5] ivshmem-server: Terminate also on SIGINT Laurent Vivier
  2019-11-12 13:52 ` [PULL 0/5] Trivial branch patches Peter Maydell
  5 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2019-11-12 10:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P. Berrangé,
	Eduardo Habkost, qemu-trivial, Jan Kiszka, Michael Tokarev,
	Laurent Vivier, Claudio Fontana, Paolo Bonzini

From: Jan Kiszka <jan.kiszka@siemens.com>

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 <jan.kiszka@siemens.com>
Reviewed-by: Claudio Fontana <claudio.fontana@suse.com>
Message-Id: <d938a62c-7538-9d2b-cc0a-13b240ab9141@web.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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 77f97b209cb9..88daee812d65 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;
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 5/5] ivshmem-server: Terminate also on SIGINT
  2019-11-12 10:04 [PULL 0/5] Trivial branch patches Laurent Vivier
                   ` (3 preceding siblings ...)
  2019-11-12 10:04 ` [PULL 4/5] ivshmem-server: Clean up shmem on shutdown Laurent Vivier
@ 2019-11-12 10:04 ` Laurent Vivier
  2019-11-12 13:52 ` [PULL 0/5] Trivial branch patches Peter Maydell
  5 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2019-11-12 10:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel P. Berrangé,
	Eduardo Habkost, qemu-trivial, Jan Kiszka, Michael Tokarev,
	Laurent Vivier, Claudio Fontana, Paolo Bonzini,
	Stefano Garzarella

From: Jan Kiszka <jan.kiszka@siemens.com>

Allows to shutdown a foreground session via ctrl-c.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Claudio Fontana <claudio.fontana@suse.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <99c1a7bd-1876-66a2-4b8e-d5bc86116fe7@web.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 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 197c79c57ec2..e4cd35f74c61 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;
     }
 
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PULL 0/5] Trivial branch patches
  2019-11-12 10:04 [PULL 0/5] Trivial branch patches Laurent Vivier
                   ` (4 preceding siblings ...)
  2019-11-12 10:04 ` [PULL 5/5] ivshmem-server: Terminate also on SIGINT Laurent Vivier
@ 2019-11-12 13:52 ` Peter Maydell
  5 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2019-11-12 13:52 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: Daniel P. Berrangé,
	Eduardo Habkost, QEMU Trivial, Michael Tokarev, QEMU Developers,
	Paolo Bonzini

On Tue, 12 Nov 2019 at 10:07, Laurent Vivier <laurent@vivier.eu> wrote:
>
> 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
>
> ----------------------------------------------------------------

Applied, thanks.

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

-- PMM


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-12 13:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12 10:04 [PULL 0/5] Trivial branch patches Laurent Vivier
2019-11-12 10:04 ` [PULL 1/5] Makefile: install bios-microvm like other binary blobs Laurent Vivier
2019-11-12 10:04 ` [PULL 2/5] qom: Fix error message in object_class_property_add() Laurent Vivier
2019-11-12 10:04 ` [PULL 3/5] numa: Add missing \n to error message Laurent Vivier
2019-11-12 10:04 ` [PULL 4/5] ivshmem-server: Clean up shmem on shutdown Laurent Vivier
2019-11-12 10:04 ` [PULL 5/5] ivshmem-server: Terminate also on SIGINT Laurent Vivier
2019-11-12 13:52 ` [PULL 0/5] Trivial branch patches Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.