mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
New cpu-max field in query-machines QMP command output
Alter the query-machines QMP command to output information about maximum number of CPUs for each machine type with default value set to 1 in case the number of max_cpus is not set. Signed-off-by: Michal Novotny <minovotn@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
93b48c201e
commit
c72e768836
2 changed files with 5 additions and 1 deletions
|
@ -2861,11 +2861,14 @@
|
|||
#
|
||||
# @default: #optional whether the machine is default
|
||||
#
|
||||
# @cpu-max: maximum number of CPUs supported by the machine type
|
||||
# (since 1.5.0)
|
||||
#
|
||||
# Since: 1.2.0
|
||||
##
|
||||
{ 'type': 'MachineInfo',
|
||||
'data': { 'name': 'str', '*alias': 'str',
|
||||
'*is-default': 'bool' } }
|
||||
'*is-default': 'bool', 'cpu-max': 'int' } }
|
||||
|
||||
##
|
||||
# @query-machines:
|
||||
|
|
1
vl.c
1
vl.c
|
@ -1617,6 +1617,7 @@ MachineInfoList *qmp_query_machines(Error **errp)
|
|||
}
|
||||
|
||||
info->name = g_strdup(m->name);
|
||||
info->cpu_max = !m->max_cpus ? 1 : m->max_cpus;
|
||||
|
||||
entry = g_malloc0(sizeof(*entry));
|
||||
entry->value = info;
|
||||
|
|
Loading…
Reference in a new issue