Received: from eggs.gnu.org ([2001:4830:134:3::10]:59560) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPMEn-0005rF-2e for qemu-devel@nongnu.org; Tue, 19 Jul 2016 00:02:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPMEi-0000pu-KD for qemu-devel@nongnu.org; Tue, 19 Jul 2016 00:02:28 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:64706 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPMEi-0000ph-AT for qemu-devel@nongnu.org; Tue, 19 Jul 2016 00:02:24 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6J3xAUV117296 for ; Tue, 19 Jul 2016 00:02:21 -0400 Received: from e28smtp07.in.ibm.com (e28smtp07.in.ibm.com [125.16.236.7]) by mx0b-001b2d01.pphosted.com with ESMTP id 2495r7jn7g-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 19 Jul 2016 00:02:21 -0400 Received: from localhost by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Jul 2016 09:32:17 +0530 Date: Tue, 19 Jul 2016 09:32:08 +0530 From: Bharata B Rao Reply-To: bharata@linux.vnet.ibm.com References: <1468833560-17397-1-git-send-email-david@gibson.dropbear.id.au> <1468833560-17397-3-git-send-email-david@gibson.dropbear.id.au> <20160718140118.ijk4c3g4y7lvzszj@andariel.pipo.sk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160718140118.ijk4c3g4y7lvzszj@andariel.pipo.sk> Message-Id: <20160719040208.GB7036@in.ibm.com> Subject: Re: [Qemu-devel] [RFC 2/2] qmp: Implement cpu-add in terms of query-hotpluggable-cpus when available List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Krempa Cc: David Gibson , imammedo@redhat.com, abologna@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, groug@kaod.org On Mon, Jul 18, 2016 at 04:01:18PM +0200, Peter Krempa wrote: > On Mon, Jul 18, 2016 at 19:19:20 +1000, David Gibson wrote: > > We've recently added a new device_add based cpu hotplug > > implementation, with the spapr machine type being the first user. In > > order to overcome the limitations of the old cpu_add interface, it > > works very differently. That's going to require a new interface in > > libvirt to properly use the new interface in qemu, which will in turn > > require work further up the stack to make use of it. > > > > While that's certainly necessary in the long run, it would be nice if > > we could have at least something working with the old cpu_add > > interface. This patch is an attempt to do so. > > > > This patch implements cpu-add on machines which don't support it > > directly but which do support the query-hotpluggable-cpus interface. > > Essentially, > > cpu-add > > will be treated as a device_add of the n-th entry in the list provided > > by query-hotpluggable-cpus. > > Does this have the same implications when libvirt will need to re-create > a matching qemu process for migration target? (Will we need to specify > -device cpu,... for every CPU 'entity' added this way on the command > line?) > > When using cpu_add libvirt recreates the process by just increasing the > number of active cpus specified via '-smp'. > > In case where libvirt would need to add the -device entries this would > create just problems with compatibility. Libvirt needs to add XML > specification of the cpus in order to allow tracking which cpus need to > be added on the commandline. Is this compatability handling any different from how libvirt already handles memory specified by -m and by -device pc-dimm ? Isn't cpus specified by -smp and by -device kind of comparable to the memory case ? Regards, Bharata.