diff options
author | Daniel P. Berrangé | 2019-08-22 12:04:12 +0200 |
---|---|---|
committer | Eduardo Habkost | 2019-09-03 19:39:46 +0200 |
commit | 04109957d47307cdedd19afc3687bd6307466b53 (patch) | |
tree | 48f966977ad79468f953ea51e54141e62ffb1e73 /hw/core | |
parent | pc: Don't make die-id mandatory unless necessary (diff) | |
download | qemu-04109957d47307cdedd19afc3687bd6307466b53.tar.gz qemu-04109957d47307cdedd19afc3687bd6307466b53.tar.xz qemu-04109957d47307cdedd19afc3687bd6307466b53.zip |
qapi: report the default CPU type for each machine
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>
Message-Id: <20190822100412.23746-1-berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/core')
-rw-r--r-- | hw/core/machine-qmp-cmds.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 15cf7c62e3..eed5aeb2f7 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -230,6 +230,10 @@ MachineInfoList *qmp_query_machines(Error **errp) info->hotpluggable_cpus = mc->has_hotpluggable_cpus; info->numa_mem_supported = mc->numa_mem_supported; info->deprecated = !!mc->deprecation_reason; + 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; |