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