From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQeUs-0007tk-Kt for qemu-devel@nongnu.org; Fri, 12 Apr 2013 09:58:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQeUo-0004kZ-22 for qemu-devel@nongnu.org; Fri, 12 Apr 2013 09:58:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQeUn-0004kL-K9 for qemu-devel@nongnu.org; Fri, 12 Apr 2013 09:58:29 -0400 From: Luiz Capitulino Date: Fri, 12 Apr 2013 09:58:21 -0400 Message-Id: <1365775103-18737-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1365775103-18737-1-git-send-email-lcapitulino@redhat.com> References: <1365775103-18737-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PULL 1/3] New cpu-max field in query-machines QMP command output List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com From: Michal Novotny 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 Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qapi-schema.json | 5 ++++- vl.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index db542f6..66808c2 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -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: diff --git a/vl.c b/vl.c index d694a90..6547b5f 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; -- 1.8.1.4