On Tue, Dec 19, 2017 at 04:45:42PM +0800, Peter Xu wrote: > 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" ] } } > > When the "argument" key is not provided, no capability is enabled. > > For capability "oob", the monitor needs to be run on dedicated IO > 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 > when the connection is closed due to some reason, the capabilities will > be reset. > > Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > Signed-off-by: Peter Xu <pet...@redhat.com> > --- > monitor.c | 65 > +++++++++++++++++++++++++++++++++++++++++++++++++++++--- > qapi-schema.json | 15 ++++++++++--- > 2 files changed, 74 insertions(+), 6 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature