qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
To: Eduardo Habkost <ehabkost@redhat.com>, qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Michal Privoznik" <mprivozn@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/1] qmp: Add deprecation information to query-machines
Date: Tue, 25 Jun 2019 11:37:49 +0300	[thread overview]
Message-ID: <87a3a814-a576-faac-fd2d-0626a4eb38db@gmail.com> (raw)
In-Reply-To: <20190608233447.27970-2-ehabkost@redhat.com>



On 6/9/19 2:34 AM, Eduardo Habkost wrote:
> Export machine type deprecation status through the query-machines
> QMP command.  With this, libvirt and management software will be
> able to show this information to users and/or suggest changes to
> VM configuration to avoid deprecated machines.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> Changes v1 -> v2:
> * Take a much simpler approach: add a simple `deprecated` bool
>    field, instead of including a human-readable message and
>    suggested alternatives
> ---
>   qapi/misc.json | 7 ++++++-
>   vl.c           | 1 +
>   2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/misc.json b/qapi/misc.json
> index 8b3ca4fdd3..fca793d39c 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -2018,12 +2018,17 @@
>   #
>   # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
>   #
> +# @deprecated: if true, the machine type is deprecated and may be removed
> +#              in future versions of QEMU according to the QEMU deprecation
> +#              policy (since 4.1.0)
> +#
>   # Since: 1.2.0
>   ##
>   { 'struct': 'MachineInfo',
>     'data': { 'name': 'str', '*alias': 'str',
>               '*is-default': 'bool', 'cpu-max': 'int',
> -            'hotpluggable-cpus': 'bool'} }
> +            'hotpluggable-cpus': 'bool',
> +            'deprecated': 'bool' } }
>   
>   ##
>   # @query-machines:
> diff --git a/vl.c b/vl.c
> index cd1fbc4cdc..f825d2159c 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1428,6 +1428,7 @@ MachineInfoList *qmp_query_machines(Error **errp)
>           info->name = g_strdup(mc->name);
>           info->cpu_max = !mc->max_cpus ? 1 : mc->max_cpus;
>           info->hotpluggable_cpus = mc->has_hotpluggable_cpus;
> +        info->deprecated = !!mc->deprecation_reason;
>   
>           entry = g_malloc0(sizeof(*entry));
>           entry->value = info;

Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>

Thanks,
Marcel




  reply	other threads:[~2019-06-25  8:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-08 23:34 [Qemu-devel] [PATCH v2 0/1] Export machine type deprecation info through QMP Eduardo Habkost
2019-06-08 23:34 ` [Qemu-devel] [PATCH v2 1/1] qmp: Add deprecation information to query-machines Eduardo Habkost
2019-06-25  8:37   ` Marcel Apfelbaum [this message]
2019-06-24 18:03 ` [Qemu-devel] [PATCH v2 0/1] Export machine type deprecation info through QMP Eduardo Habkost
2019-06-24 22:48   ` Wainer dos Santos Moschetta
2019-06-25 12:00   ` Markus Armbruster

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=87a3a814-a576-faac-fd2d-0626a4eb38db@gmail.com \
    --to=marcel.apfelbaum@gmail.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=mprivozn@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).