[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v5 12/26] qmp: negociate QMP capabilities
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC v5 12/26] qmp: negociate QMP capabilities |
Date: |
Fri, 15 Dec 2017 13:26:42 +0000 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Fri, Dec 15, 2017 at 05:40:10PM +0800, Fam Zheng wrote:
> On Wed, 12/13 17:19, Stefan Hajnoczi wrote:
> > On Tue, Dec 05, 2017 at 01:51:46PM +0800, Peter Xu wrote:
> > > @@ -1037,8 +1038,42 @@ static void monitor_init_qmp_commands(void)
> > > qmp_marshal_qmp_capabilities, QCO_NO_OPTIONS);
> > > }
> > >
> > > -void qmp_qmp_capabilities(Error **errp)
> > > +static void qmp_caps_check(Monitor *mon, QMPCapabilityList *list,
> > > + Error **errp)
> > > +{
> > > + for (; list; list = list->next) {
> > > + assert(list->value < QMP_CAPABILITY__MAX);
> > > + switch (list->value) {
> > > + case QMP_CAPABILITY_OOB:
> > > + if (!mon->use_io_thr) {
> > > + /*
> > > + * Out-Of-Band only works with monitors that are
> > > + * running on dedicated IOThread.
> > > + */
> > > + error_setg(errp, "This monitor does not support "
> > > + "Out-Of-Band (OOB)");
> > > + return;
> > > + }
> > > + break;
> >
> > QEMU always offers the 'oob' capability, even if the monitor does not
> > support it. Should it send 'oob' only when mon->use_io_thr to make
> > things easier for clients?
>
> So should we firstly agree on whether the capabilities is on the current
> monitor
> connection or QEMU as a whole?
It's more flexible to allow per-connection capabilities. Is there a
reason against it?
Stefan
signature.asc
Description: PGP signature
- Re: [Qemu-devel] [RFC v5 10/26] monitor: allow to use IO thread for parsing, (continued)
[Qemu-devel] [RFC v5 12/26] qmp: negociate QMP capabilities, Peter Xu, 2017/12/05
[Qemu-devel] [RFC v5 13/26] qmp: introduce some capability helpers, Peter Xu, 2017/12/05
[Qemu-devel] [RFC v5 14/26] monitor: introduce monitor_qmp_respond(), Peter Xu, 2017/12/05