qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC v6 12/27] qmp: negotiate QMP capabilities


From: Peter Xu
Subject: Re: [Qemu-devel] [RFC v6 12/27] qmp: negotiate QMP capabilities
Date: Mon, 25 Dec 2017 11:18:22 +0800
User-agent: Mutt/1.9.1 (2017-09-22)

On Thu, Dec 21, 2017 at 06:01:00PM +0800, Fam Zheng wrote:

[...]

> > +void qmp_qmp_capabilities(bool has_enable, QMPCapabilityList *enable,
> > +                          Error **errp)
> >  {
> > +    Error *local_err = NULL;
> > +
> >      if (cur_mon->qmp.commands == &qmp_commands) {
> >          error_set(errp, ERROR_CLASS_COMMAND_NOT_FOUND,
> >                    "Capabilities negotiation is already complete, command "
> > @@ -1044,6 +1079,20 @@ void qmp_qmp_capabilities(Error **errp)
> >          return;
> >      }
> >  
> > +    /* Enable QMP capabilities provided by the guest if applicable. */
> 
> s/guest/client/ ?

Fixed.

[...]

> > -static QObject *get_qmp_greeting(void)
> > +static QObject *get_qmp_greeting(Monitor *mon)
> >  {
> >      QList *cap_list = qlist_new();
> >      QObject *ver = NULL;
> > @@ -3950,6 +3999,10 @@ static QObject *get_qmp_greeting(void)
> >      qmp_marshal_query_version(NULL, &ver, NULL);
> >  
> >      for (cap = 0; cap < QMP_CAPABILITY__MAX; cap++) {
> > +        if (!mon->use_io_thr && cap == QMP_CAPABILITY_OOB) {
> > +            /* Monitors that are not using IOThread won't support OOB */
> > +            continue;
> > +        }
> 
> OK, I thought this could better go to the previous patch, but it may be fine
> here, together with monitor_qmp_caps_reset().

Yes.  I kept all OOB things in this patch, and for previous patch it
only starts to offer all the capabilities to clients.  Thanks,

-- 
Peter Xu



reply via email to

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