qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: PGP signature


reply via email to

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