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; diff --git a/qapi/machine.json b/qapi/machine.json index de5c742d72..ca26779f1a 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -348,13 +348,16 @@ # in future versions of QEMU according to the QEMU deprecation # policy (since 4.1.0) # +# @default-cpu-type: default CPU model typename if none is requested via +# the -cpu argument. (since 4.2) +# # Since: 1.2.0 ## { 'struct': 'MachineInfo', 'data': { 'name': 'str', '*alias': 'str', '*is-default': 'bool', 'cpu-max': 'int', 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool', - 'deprecated': 'bool' } } + 'deprecated': 'bool', '*default-cpu-type': 'str' } } ## # @query-machines: