From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Jiri Denemark <jdenemar@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] qapi: report the default CPU type for each machine
Date: Thu, 4 Jul 2019 15:17:05 +0100 [thread overview]
Message-ID: <20190704141705.GA17151@redhat.com> (raw)
In-Reply-To: <20190612114125.22060-1-berrange@redhat.com>
ping, any comments / thoughts ?
On Wed, Jun 12, 2019 at 01:41:25PM +0200, Daniel P. Berrangé wrote:
> When user doesn't request any explicit CPU model with libvirt or QEMU,
> a machine type specific CPU model is picked. Currently there is no way
> to determine what this QEMU built-in default is, so libvirt cannot
> report this back to the user in the XML config.
>
> This extends the "query-machines" QMP command so that it reports the
> default CPU model typename for each machine.
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>
> Changed in v2:
>
> - Fix qapi docs version tag
>
> qapi/misc.json | 6 +++++-
> vl.c | 4 ++++
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/misc.json b/qapi/misc.json
> index 8b3ca4fdd3..9e2dedd938 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -2018,12 +2018,16 @@
> #
> # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
> #
> +# @default-cpu-type: default CPU model typename if none is requested via
> +# the -cpu argument. (since 4.1)
> +#
> # Since: 1.2.0
> ##
> { 'struct': 'MachineInfo',
> 'data': { 'name': 'str', '*alias': 'str',
> '*is-default': 'bool', 'cpu-max': 'int',
> - 'hotpluggable-cpus': 'bool'} }
> + 'hotpluggable-cpus': 'bool',
> + '*default-cpu-type': 'str'} }
>
> ##
> # @query-machines:
> diff --git a/vl.c b/vl.c
> index 201144b162..b2de329bd2 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1519,6 +1519,10 @@ 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;
> + if (mc->default_cpu_type) {
> + info->default_cpu_type = g_strdup(mc->default_cpu_type);
> + info->has_default_cpu_type = true;
> + }
>
> entry = g_malloc0(sizeof(*entry));
> entry->value = info;
> --
> 2.21.0
>
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2019-07-04 14:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-12 11:41 [Qemu-devel] [PATCH v2] qapi: report the default CPU type for each machine Daniel P. Berrangé
2019-07-04 14:17 ` Daniel P. Berrangé [this message]
2019-07-04 14:33 ` Igor Mammedov
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=20190704141705.GA17151@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=jdenemar@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.