[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
- Re: [Qemu-devel] [PATCH v8 03/23] qobject: introduce qobject_get_try_str(), (continued)
- [Qemu-devel] [PATCH v8 04/23] qobject: let object_property_get_str() use new API, Peter Xu, 2018/03/09
- [Qemu-devel] [PATCH v8 05/23] monitor: move skip_flush into monitor_data_init, Peter Xu, 2018/03/09
- [Qemu-devel] [PATCH v8 06/23] monitor: move the cur_mon hack deeper for QMP, Peter Xu, 2018/03/09
- [Qemu-devel] [PATCH v8 08/23] monitor: let mon_list be tail queue, Peter Xu, 2018/03/09
- [Qemu-devel] [PATCH v8 07/23] monitor: unify global init, Peter Xu, 2018/03/09
- [Qemu-devel] [PATCH v8 09/23] monitor: allow using IO thread for parsing, Peter Xu, 2018/03/09
- [Qemu-devel] [PATCH v8 10/23] qmp: introduce QMPCapability, Peter Xu, 2018/03/09
- Re: [Qemu-devel] [PATCH v8 10/23] qmp: introduce QMPCapability,
Eric Blake <=
- [Qemu-devel] [PATCH v8 11/23] monitor: introduce monitor_qmp_respond(), Peter Xu, 2018/03/09
- [Qemu-devel] [PATCH v8 12/23] monitor: let suspend_cnt be thread safe, Peter Xu, 2018/03/09
- [Qemu-devel] [PATCH v8 13/23] monitor: let suspend/resume work even with QMPs, Peter Xu, 2018/03/09
- [Qemu-devel] [PATCH v8 14/23] monitor: separate QMP parser and dispatcher, Peter Xu, 2018/03/09