From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPF2b-0000qi-Ey for qemu-devel@nongnu.org; Mon, 08 Apr 2013 12:35:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPF2W-0005iO-RN for qemu-devel@nongnu.org; Mon, 08 Apr 2013 12:35:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4453) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPF2W-0005i7-It for qemu-devel@nongnu.org; Mon, 08 Apr 2013 12:35:28 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r38GZRxB007232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Apr 2013 12:35:27 -0400 Received: from miglaptop.brq.redhat.com (dhcp-1-126.brq.redhat.com [10.34.1.126]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r38GZQEG016664 for ; Mon, 8 Apr 2013 12:35:27 -0400 Message-ID: <5162F1CD.1040809@redhat.com> Date: Mon, 08 Apr 2013 18:35:25 +0200 From: Michal Novotny MIME-Version: 1.0 References: <111bea6806c8d7e0f20856e75edba74f86a6bc9b.1365430186.git.minovotn@redhat.com> In-Reply-To: <111bea6806c8d7e0f20856e75edba74f86a6bc9b.1365430186.git.minovotn@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Fwd: [PATCH v2] 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" 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 --- qapi-schema.json | 4 +++- vl.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index db542f6..689ca8d 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2861,11 +2861,13 @@ # # @default: #optional whether the machine is default # +# @cpu-max: maximum number of CPUs supported by the machine type +# # 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 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; -- 1.7.11.7