On Mon, 8 Apr 2013 10:02:59 -0400 Luiz Capitulino <lcapitul...@redhat.com> wrote:
> On Mon, 8 Apr 2013 12:00:35 +0200 > Michal Novotny <minov...@redhat.com> wrote: > > > This alters the query-machines QMP command to output information > > about maximum number of CPUs for each machine type with default > > value 1 in case the number of max_cpus is not set. > > > > Signed-off-by: Michal Novotny <minov...@redhat.com> > > --- > > qapi-schema.json | 2 +- > > vl.c | 1 + > > 2 files changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/qapi-schema.json b/qapi-schema.json > > index db542f6..39cae4b 100644 > > --- a/qapi-schema.json > > +++ b/qapi-schema.json > > @@ -2865,7 +2865,7 @@ > > ## > > { 'type': 'MachineInfo', > > 'data': { 'name': 'str', '*alias': 'str', > > - '*is-default': 'bool' } } > > + '*is-default': 'bool', 'cpu-max': 'int' } } > > Please, document the new field. > > Also, how is this affected by the CPU hotplug support? It shouldn't affect or be affected by CPU hotplug. > > > > > ## > > # @query-machines: > > diff --git a/vl.c b/vl.c > > index a8bba04..c05b3d3 100644 > > --- a/vl.c > > +++ b/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; > > -- Regards, Igor