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: Wed, 13 Dec 2017 17:19:34 +0000
User-agent: Mutt/1.9.1 (2017-09-22)

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?

Attachment: signature.asc
Description: PGP signature


reply via email to

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