All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org,
	dahi@linux.vnet.ibm.com, agraf@suse.de, borntraeger@de.ibm.com,
	jjherne@linux.vnet.ibm.com, cornelia.huck@de.ibm.com,
	pbonzini@redhat.com, jdenemar@redhat.com, rth@twiddle.net,
	david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH v2] qmp: Disable query-cpu-* commands when they're unavailable
Date: Thu, 06 Oct 2016 16:17:32 +0200	[thread overview]
Message-ID: <87vax5ef43.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <1475696941-8056-1-git-send-email-ehabkost@redhat.com> (Eduardo Habkost's message of "Wed, 5 Oct 2016 16:49:01 -0300")

Eduardo Habkost <ehabkost@redhat.com> writes:

> Instead of requiring clients to actually call the query-cpu-*
> commands to find out if they are implemented, remove them from
> the output of "query-commands", so clients know they are not
> available.
>
> This is implemented by extending the existing hack at
> qmp_unregister_commands_hack(). I wish I could avoid adding even
> more #ifdefs to that code, but that's the solution we have today.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Changes v1 -> v2:
> * Instead of adding new qmp_commands_init() and
>   arch_qmp_commands_init() functions, simply extend the hack at
>   qmp_unregister_commands_hack()
> ---
>  monitor.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/monitor.c b/monitor.c
> index 83c4edf..4ff74b7 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -992,6 +992,15 @@ static void qmp_unregister_commands_hack(void)
>  #ifndef TARGET_ARM
>      qmp_unregister_command("query-gic-capabilities");
>  #endif
> +#if !defined(TARGET_S390X)
> +    qmp_unregister_command("query-cpu-model-expansion");
> +    qmp_unregister_command("query-cpu-model-baseline");
> +    qmp_unregister_command("query-cpu-model-comparison");
> +#endif
> +#if !defined(TARGET_PPC) && !defined(TARGET_ARM) && !defined(TARGET_I386) \
> +    && !defined(TARGET_S390X)
> +    qmp_unregister_command("query-cpu-definitions");
> +#endif
>  }
>  
>  static void qmp_init_marshal(void)

Reviewed-by: Markus Armbruster <armbru@redhat.com>

  parent reply	other threads:[~2016-10-06 14:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05 19:49 [Qemu-devel] [PATCH v2] qmp: Disable query-cpu-* commands when they're unavailable Eduardo Habkost
2016-10-05 19:52 ` Eric Blake
2016-10-06 14:17 ` Markus Armbruster [this message]
2016-10-07 12:03 ` Markus Armbruster
2016-10-07 12:05 ` Christian Borntraeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vax5ef43.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dahi@linux.vnet.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=ehabkost@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=jjherne@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.