From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPEp8-0007R3-2v for qemu-devel@nongnu.org; Mon, 08 Apr 2013 12:21:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPEoj-0008Db-Pj for qemu-devel@nongnu.org; Mon, 08 Apr 2013 12:21:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34248) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPEoj-0008DL-GZ for qemu-devel@nongnu.org; Mon, 08 Apr 2013 12:21:13 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r38GLC4a000774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 8 Apr 2013 12:21:12 -0400 Message-ID: <5162EE76.204@redhat.com> Date: Mon, 08 Apr 2013 18:21:10 +0200 From: Michal Novotny MIME-Version: 1.0 References: <20130408100259.5cf4f7f0@redhat.com> <20130408181821.669f5f85@thinkpad.mammed.net> In-Reply-To: <20130408181821.669f5f85@thinkpad.mammed.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] New cpu-max field in query-machines QMP command output List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, Eduardo Habkost , Luiz Capitulino On 04/08/2013 06:18 PM, Igor Mammedov wrote: > On Mon, 8 Apr 2013 10:02:59 -0400 > Luiz Capitulino wrote: > >> On Mon, 8 Apr 2013 12:00:35 +0200 >> Michal Novotny 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 >>> --- >>> 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. OK, thanks for your feedback Igor. I just sent v2 with new field commented. Thanks! Michal >>> >>> ## >>> # @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; >> > -- Michal Novotny , RHCE, Red Hat Virtualization | libvirt-php bindings | php-virt-control.org