qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2]: QMP queue
@ 2011-09-06 16:44 Luiz Capitulino
  2011-09-08 14:24 ` Anthony Liguori
  0 siblings, 1 reply; 12+ messages in thread
From: Luiz Capitulino @ 2011-09-06 16:44 UTC (permalink / raw)
  To: aliguori; +Cc: qemu-devel

Anthony,

The following patches have been sent to the list and look good to me. I've
also tested them.

The changes (since 344eecf6995f4a0ad1d887cec922f6806f91a3f8) are available
in the following repository:

    git://repo.or.cz/qemu/qmp-unstable.git queue/qmp

Jan Kiszka (1):
      Fix qjson test of solidus encoding

Luiz Capitulino (1):
      configure: Copy test data to build directory

 check-qjson.c |    3 ++-
 configure     |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

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

* Re: [Qemu-devel] [PULL 0/2]: QMP queue
  2011-09-06 16:44 [Qemu-devel] [PULL 0/2]: " Luiz Capitulino
@ 2011-09-08 14:24 ` Anthony Liguori
  0 siblings, 0 replies; 12+ messages in thread
From: Anthony Liguori @ 2011-09-08 14:24 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: qemu-devel

On 09/06/2011 11:44 AM, Luiz Capitulino wrote:
> Anthony,
>
> The following patches have been sent to the list and look good to me. I've
> also tested them.


Pulled.  Thanks.

Regards,

Anthony Liguori

>
> The changes (since 344eecf6995f4a0ad1d887cec922f6806f91a3f8) are available
> in the following repository:
>
>      git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
>
> Jan Kiszka (1):
>        Fix qjson test of solidus encoding
>
> Luiz Capitulino (1):
>        configure: Copy test data to build directory
>
>   check-qjson.c |    3 ++-
>   configure     |    2 +-
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
>
>

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

* [Qemu-devel] [PULL 0/2] QMP queue
@ 2013-01-10 17:47 Luiz Capitulino
  2013-01-14 18:04 ` Anthony Liguori
  0 siblings, 1 reply; 12+ messages in thread
From: Luiz Capitulino @ 2013-01-10 17:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

The changes (since 7cd5da7eef152a533c5774effd2e7bbfa5976c86) are available
in the following repository:

    git://repo.or.cz/qemu/qmp-unstable.git queue/qmp

Markus Armbruster (1):
  monitor: assert monitor_puts()'s loop invariant

Wen Congyang (1):
  target-i386: fix bits 39:32 of the final physical address when using
    4M page

 monitor.c                         |  1 +
 target-i386/arch_memory_mapping.c | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

-- 
1.8.0

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

* Re: [Qemu-devel] [PULL 0/2] QMP queue
  2013-01-10 17:47 Luiz Capitulino
@ 2013-01-14 18:04 ` Anthony Liguori
  0 siblings, 0 replies; 12+ messages in thread
From: Anthony Liguori @ 2013-01-14 18:04 UTC (permalink / raw)
  To: Luiz Capitulino, qemu-devel; +Cc: aliguori

Pulled, thanks.

N.B.  This note may be extraneous because the pull request was sent by a
version of git older than 1.7.9 making the pull request ambigious.  Please
consider upgrading to a newer version of git.

Regards,

Anthony Liguori

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

* [Qemu-devel] [PULL 0/2] QMP queue
@ 2013-04-19 12:50 Luiz Capitulino
  0 siblings, 0 replies; 12+ messages in thread
From: Luiz Capitulino @ 2013-04-19 12:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

Two important fixes.

The changes (since 09dada400328d75daf79e3eca1e48e024fec148d) are available
in the following repository:

    git://repo.or.cz/qemu/qmp-unstable.git queue/qmp

Amos Kong (1):
  monitor: fix the wrong order of releasing keys

Luiz Capitulino (1):
  virtio-balloon: fix integer overflow in BALLOON_CHANGE QMP event

 hw/virtio/virtio-balloon.c | 2 +-
 ui/input.c                 | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

-- 
1.8.1.4

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

* [Qemu-devel] [PULL 0/2] QMP queue
@ 2013-07-17 20:41 Luiz Capitulino
  2013-07-17 20:41 ` [Qemu-devel] [PULL 1/2] qapi: qapi-commands: fix possible leaks on visitor dealloc Luiz Capitulino
  2013-07-17 20:41 ` [Qemu-devel] [PULL 2/2] qmp: update send-key document Luiz Capitulino
  0 siblings, 2 replies; 12+ messages in thread
From: Luiz Capitulino @ 2013-07-17 20:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

The following changes since commit 6453a3a69488196f26d12654c6b148446abdf3d6:

  Merge remote-tracking branch 'quintela/migration.next' into staging (2013-07-15 14:49:16 -0500)

are available in the git repository at:


  git://repo.or.cz/qemu/qmp-unstable.git queue/qmp

for you to fetch changes up to f9b1d9b20f5d25b95f67a498e312f625d168fc51:

  qmp: update send-key document (2013-07-17 16:00:26 -0400)

----------------------------------------------------------------
Amos Kong (1):
      qmp: update send-key document

Luiz Capitulino (1):
      qapi: qapi-commands: fix possible leaks on visitor dealloc

 qmp-commands.hx          |  7 +++++--
 scripts/qapi-commands.py | 17 ++++++++++-------
 2 files changed, 15 insertions(+), 9 deletions(-)

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

* [Qemu-devel] [PULL 1/2] qapi: qapi-commands: fix possible leaks on visitor dealloc
  2013-07-17 20:41 [Qemu-devel] [PULL 0/2] QMP queue Luiz Capitulino
@ 2013-07-17 20:41 ` Luiz Capitulino
  2013-07-17 20:41 ` [Qemu-devel] [PULL 2/2] qmp: update send-key document Luiz Capitulino
  1 sibling, 0 replies; 12+ messages in thread
From: Luiz Capitulino @ 2013-07-17 20:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

In qmp-marshal.c the dealloc visitor calls use the same errp
pointer of the input visitor calls. This means that if any of
the input visitor calls fails, then the dealloc visitor will
return early, before freeing the object's memory.

Here's an example, consider this code:

int qmp_marshal_input_block_passwd(Monitor *mon, const QDict *qdict, QObject **ret)
{
	[...]

    char * device = NULL;
    char * password = NULL;

    mi = qmp_input_visitor_new_strict(QOBJECT(args));
    v = qmp_input_get_visitor(mi);
    visit_type_str(v, &device, "device", errp);
    visit_type_str(v, &password, "password", errp);
    qmp_input_visitor_cleanup(mi);

    if (error_is_set(errp)) {
        goto out;
    }
    qmp_block_passwd(device, password, errp);

out:
    md = qapi_dealloc_visitor_new();
    v = qapi_dealloc_get_visitor(md);
    visit_type_str(v, &device, "device", errp);
    visit_type_str(v, &password, "password", errp);
    qapi_dealloc_visitor_cleanup(md);

	[...]

    return 0;
}

Consider errp != NULL when the out label is reached, we're going
to leak device and password.

This patch fixes this by always passing errp=NULL for dealloc
visitors, meaning that we always try to free them regardless of
any previous failure. The above example would then be:

out:
    md = qapi_dealloc_visitor_new();
    v = qapi_dealloc_get_visitor(md);
    visit_type_str(v, &device, "device", NULL);
    visit_type_str(v, &password, "password", NULL);
    qapi_dealloc_visitor_cleanup(md);

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 scripts/qapi-commands.py | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index e06332b..b12b696 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -128,12 +128,15 @@ bool has_%(argname)s = false;
 
 def gen_visitor_input_block(args, obj, dealloc=False):
     ret = ""
+    errparg = 'errp'
+
     if len(args) == 0:
         return ret
 
     push_indent()
 
     if dealloc:
+        errparg = 'NULL'
         ret += mcgen('''
 md = qapi_dealloc_visitor_new();
 v = qapi_dealloc_get_visitor(md);
@@ -148,22 +151,22 @@ v = qmp_input_get_visitor(mi);
     for argname, argtype, optional, structured in parse_args(args):
         if optional:
             ret += mcgen('''
-visit_start_optional(v, &has_%(c_name)s, "%(name)s", errp);
+visit_start_optional(v, &has_%(c_name)s, "%(name)s", %(errp)s);
 if (has_%(c_name)s) {
 ''',
-                         c_name=c_var(argname), name=argname)
+                         c_name=c_var(argname), name=argname, errp=errparg)
             push_indent()
         ret += mcgen('''
-%(visitor)s(v, &%(c_name)s, "%(name)s", errp);
+%(visitor)s(v, &%(c_name)s, "%(name)s", %(errp)s);
 ''',
                      c_name=c_var(argname), name=argname, argtype=argtype,
-                     visitor=type_visitor(argtype))
+                     visitor=type_visitor(argtype), errp=errparg)
         if optional:
             pop_indent()
             ret += mcgen('''
 }
-visit_end_optional(v, errp);
-''')
+visit_end_optional(v, %(errp)s);
+''', errp=errparg)
 
     if dealloc:
         ret += mcgen('''
@@ -194,7 +197,7 @@ static void qmp_marshal_output_%(c_name)s(%(c_ret_type)s ret_in, QObject **ret_o
     }
     qmp_output_visitor_cleanup(mo);
     v = qapi_dealloc_get_visitor(md);
-    %(visitor)s(v, &ret_in, "unused", errp);
+    %(visitor)s(v, &ret_in, "unused", NULL);
     qapi_dealloc_visitor_cleanup(md);
 }
 ''',
-- 
1.8.1.4

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

* [Qemu-devel] [PULL 2/2] qmp: update send-key document
  2013-07-17 20:41 [Qemu-devel] [PULL 0/2] QMP queue Luiz Capitulino
  2013-07-17 20:41 ` [Qemu-devel] [PULL 1/2] qapi: qapi-commands: fix possible leaks on visitor dealloc Luiz Capitulino
@ 2013-07-17 20:41 ` Luiz Capitulino
  1 sibling, 0 replies; 12+ messages in thread
From: Luiz Capitulino @ 2013-07-17 20:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori

From: Amos Kong <akong@redhat.com>

commit 9f328977 changes qmp_send_key() to accept key codes in hex,
but the document wasn't updated. The items of keys list is union
now, not enum.

Signed-off-by: Amos Kong <akong@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 qmp-commands.hx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/qmp-commands.hx b/qmp-commands.hx
index e075df4..b8e7758 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -346,7 +346,8 @@ Send keys to VM.
 Arguments:
 
 keys array:
-    - "key": key sequence (a json-array of key enum values)
+    - "key": key sequence (a json-array of key union values,
+             union can be number or qcode enum)
 
 - hold-time: time to delay key up events, milliseconds. Defaults to 100
              (json-int, optional)
@@ -354,7 +355,9 @@ keys array:
 Example:
 
 -> { "execute": "send-key",
-     "arguments": { 'keys': [ 'ctrl', 'alt', 'delete' ] } }
+     "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
+                              { "type": "qcode", "data": "alt" },
+                              { "type": "qcode", "data": "delete" } ] } }
 <- { "return": {} }
 
 EQMP
-- 
1.8.1.4

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

* [Qemu-devel] [PULL 0/2] QMP queue
@ 2013-12-20 16:38 Luiz Capitulino
  2014-01-06 19:17 ` Luiz Capitulino
  0 siblings, 1 reply; 12+ messages in thread
From: Luiz Capitulino @ 2013-12-20 16:38 UTC (permalink / raw)
  To: anthony; +Cc: qemu-devel

I've dropped the two series which need to be respun. As the fix I have from
Paolo is pending for a long time, I figure it's better to send what I have
in the queue now.

The following changes since commit f8251db121c3f051b22a7536b97d160c30bcccd4:

  Merge remote-tracking branch 'agraf/tags/signed-ppc-for-upstream' into staging (2013-12-19 17:03:17 -0800)

are available in the git repository at:


  git://repo.or.cz/qemu/qmp-unstable.git queue/qmp

for you to fetch changes up to 15e509df38e2ae88dd045cdce62edacd033c8386:

  qemu-monitor: HMP cpu-add wrapper (2013-12-20 08:32:26 -0500)

----------------------------------------------------------------
Jason J. Herne (1):
      qemu-monitor: HMP cpu-add wrapper

Paolo Bonzini (1):
      vl: add missing transition debug->finish_migrate

 hmp-commands.hx | 13 +++++++++++++
 hmp.c           | 10 ++++++++++
 hmp.h           |  1 +
 vl.c            |  1 +
 4 files changed, 25 insertions(+)

-- 
1.8.1.4

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

* Re: [Qemu-devel] [PULL 0/2] QMP queue
  2013-12-20 16:38 Luiz Capitulino
@ 2014-01-06 19:17 ` Luiz Capitulino
  0 siblings, 0 replies; 12+ messages in thread
From: Luiz Capitulino @ 2014-01-06 19:17 UTC (permalink / raw)
  To: anthony; +Cc: qemu-devel

On Fri, 20 Dec 2013 11:38:54 -0500
Luiz Capitulino <lcapitulino@redhat.com> wrote:

> I've dropped the two series which need to be respun. As the fix I have from
> Paolo is pending for a long time, I figure it's better to send what I have
> in the queue now.

Please, don't pull this one. I'm working on a more complete pull request,
will send it in some minutes.

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

* [Qemu-devel] [PULL 0/2] QMP queue
@ 2014-09-12 20:26 Luiz Capitulino
  2014-09-15 19:40 ` Peter Maydell
  0 siblings, 1 reply; 12+ messages in thread
From: Luiz Capitulino @ 2014-09-12 20:26 UTC (permalink / raw)
  To: peter.maydell; +Cc: qemu-devel, anthony

Two trivial fixes.

The following changes since commit 6cd14054b67774cc58a51fca6660cfa1d3c08059:

  libqos virtio: Increase ISR timeout (2014-09-12 13:58:07 +0100)

are available in the git repository at:

  git://repo.or.cz/qemu/qmp-unstable.git queue/qmp

for you to fetch changes up to e4d9df4fb16861f413374b69fcdb12c8c7a4a17e:

  exec: file_ram_alloc(): print error when prealloc fails (2014-09-12 11:22:21 -0400)

----------------------------------------------------------------
Gonglei (1):
      monitor: fix debug print compiling error

Luiz Capitulino (1):
      exec: file_ram_alloc(): print error when prealloc fails

 exec.c    | 1 +
 monitor.c | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

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

* Re: [Qemu-devel] [PULL 0/2] QMP queue
  2014-09-12 20:26 [Qemu-devel] [PULL 0/2] QMP queue Luiz Capitulino
@ 2014-09-15 19:40 ` Peter Maydell
  0 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2014-09-15 19:40 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: QEMU Developers, Anthony Liguori

On 12 September 2014 13:26, Luiz Capitulino <lcapitulino@redhat.com> wrote:
> Two trivial fixes.
>
> The following changes since commit 6cd14054b67774cc58a51fca6660cfa1d3c08059:
>
>   libqos virtio: Increase ISR timeout (2014-09-12 13:58:07 +0100)
>
> are available in the git repository at:
>
>   git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
>
> for you to fetch changes up to e4d9df4fb16861f413374b69fcdb12c8c7a4a17e:
>
>   exec: file_ram_alloc(): print error when prealloc fails (2014-09-12 11:22:21 -0400)
>
> ----------------------------------------------------------------
> Gonglei (1):
>       monitor: fix debug print compiling error
>
> Luiz Capitulino (1):
>       exec: file_ram_alloc(): print error when prealloc fails
>
>  exec.c    | 1 +
>  monitor.c | 7 +++++--
>  2 files changed, 6 insertions(+), 2 deletions(-)

Applied, thanks.

-- PMM

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

end of thread, other threads:[~2014-09-15 19:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-17 20:41 [Qemu-devel] [PULL 0/2] QMP queue Luiz Capitulino
2013-07-17 20:41 ` [Qemu-devel] [PULL 1/2] qapi: qapi-commands: fix possible leaks on visitor dealloc Luiz Capitulino
2013-07-17 20:41 ` [Qemu-devel] [PULL 2/2] qmp: update send-key document Luiz Capitulino
  -- strict thread matches above, loose matches on Subject: below --
2014-09-12 20:26 [Qemu-devel] [PULL 0/2] QMP queue Luiz Capitulino
2014-09-15 19:40 ` Peter Maydell
2013-12-20 16:38 Luiz Capitulino
2014-01-06 19:17 ` Luiz Capitulino
2013-04-19 12:50 Luiz Capitulino
2013-01-10 17:47 Luiz Capitulino
2013-01-14 18:04 ` Anthony Liguori
2011-09-06 16:44 [Qemu-devel] [PULL 0/2]: " Luiz Capitulino
2011-09-08 14:24 ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).