From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPfcK-0005Lf-Tn for qemu-devel@nongnu.org; Tue, 09 Apr 2013 16:58:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPfcJ-0002kv-S8 for qemu-devel@nongnu.org; Tue, 09 Apr 2013 16:58:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPf0o-0007AQ-Ly for qemu-devel@nongnu.org; Tue, 09 Apr 2013 16:19:26 -0400 Date: Tue, 9 Apr 2013 22:19:11 +0200 From: Igor Mammedov Message-ID: <20130409221911.1b6fb18a@thinkpad> In-Reply-To: <20130405171054.GA2719@otherpad.lan.raisama.net> References: <1365172636-28628-1-git-send-email-imammedo@redhat.com> <1365172636-28628-25-git-send-email-imammedo@redhat.com> <20130405171054.GA2719@otherpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 22/22] add cpu-add qmp command and implement CPU hot-add for target-i386 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: aliguori@us.ibm.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, aderumier@odiso.com, lcapitulino@redhat.com, jfrei@linux.vnet.ibm.com, yang.z.zhang@intel.com, pbonzini@redhat.com, afaerber@suse.de, lig.fnst@cn.fujitsu.com, rth@twiddle.net On Fri, 5 Apr 2013 14:10:54 -0300 Eduardo Habkost wrote: > On Fri, Apr 05, 2013 at 04:37:16PM +0200, Igor Mammedov wrote: > [...] > > diff --git a/qapi-schema.json b/qapi-schema.json > > index db542f6..a760ed5 100644 > > --- a/qapi-schema.json > > +++ b/qapi-schema.json > > @@ -1387,6 +1387,17 @@ > > { 'command': 'cpu', 'data': {'index': 'int'} } > > > > ## > > +# @cpu-add > > +# > > +# Adds CPU with specified id > > +# > > +# @id: cpu id of CPU to be created > > Can we have the semantics/constraints of "id" documented here? Is it an > arbitrary ID chosen by the caller? Does it have to be the APIC ID? Does it's generic function so documenting it as APIC ID is not appropriate. I for sure should document it on cpu-hotplug wiki page though, for x86 use case for starters. i.e. how to use QMP to get a list of available/free IDs. and in which order to use them. > it have to be the index of the CPU in the CPU list? How the IDs of > existing CPUs set using "-smp" are allocated? With current -smp implementation the same way as it was before, and for migration to work hot-plugged CPU has to be the next unused APIC ID in their sequence, so that target qemu could be started with "-smp n+1". But -smp along with -numa should be reworked to allow specifying guest visible CPU IDs for arbitrary CPU hotplug to work. when we done with QOMifying CPUs it might be possible to use -device for them and keeping -smp for compat/shorcut purposes. > > I am looking at the code right now to understand how this implementation > works, but the documentation could contain or point to documentation on > how the "id" parameter is used and interpreted. I'll add pointer to wiki and describe there target-i386 use-case. > > > +# > > +# Returns: Nothing on success > > +## > > +{ 'command': 'cpu-add', 'data': {'id': 'int'} } > > + > > +## > -- > Eduardo -- Regards, Igor