qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v8 10/23] qmp: introduce QMPCapability


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v8 10/23] qmp: introduce QMPCapability
Date: Sat, 10 Mar 2018 19:25:13 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/09/2018 02:59 AM, Peter Xu wrote:
There were no QMP capabilities defined.  Define the first "oob" as
capability to allow out-of-band messages.

Reads better as "Define the first capability, "oob", to allow..."


After this patch, we will allow QMP clients to enable QMP capabilities
when sending the first "qmp_capabilities" command.  Originally we are
starting QMP session with no arguments like:

   { "execute": "qmp_capabilities" }

Now we can enable some QMP capabilities using (take OOB as example,
which is the only one capability that we support):

   { "execute": "qmp_capabilities",
     "argument": { "enable": [ "oob" ] } }

s/argument/arguments/


When the "argument" key is not provided, no capability is enabled.

again. Also when "arguments":{} is provided with an empty dict, or even with "arguments":{"enable":[]} an empty enable array. But no need to mention them here.


For capability "oob", the monitor needs to be run on dedicated IO

s/on/on a/

thread, otherwise the command will fail.  For example, trying to enable
OOB on a MUXed typed QMP monitor will fail.

One thing to mention is that, QMP capabilities are per-monitor, and also

s/that,/that/

when the connection is closed due to some reason, the capabilities will
be reset.

Also, touch up qmp-test.c to test the new bits.

Signed-off-by: Peter Xu <address@hidden>
---
  monitor.c        | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++----
  qapi/misc.json   | 32 ++++++++++++++++++++---
  tests/qmp-test.c | 10 +++++++-
  3 files changed, 110 insertions(+), 9 deletions(-)


Reviewed-by: Eric Blake <address@hidden>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]