From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URrlC-00014x-Ve for qemu-devel@nongnu.org; Mon, 15 Apr 2013 18:20:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URrl9-00027a-MS for qemu-devel@nongnu.org; Mon, 15 Apr 2013 18:20:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URrl9-00027L-Ez for qemu-devel@nongnu.org; Mon, 15 Apr 2013 18:20:23 -0400 Message-ID: <516C7D1F.2020606@redhat.com> Date: Mon, 15 Apr 2013 16:20:15 -0600 From: Eric Blake MIME-Version: 1.0 References: <1366063976-4909-1-git-send-email-imammedo@redhat.com> <1366063976-4909-17-git-send-email-imammedo@redhat.com> In-Reply-To: <1366063976-4909-17-git-send-email-imammedo@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2XGLHGHCBKHDBMJIRXJXP" Subject: Re: [Qemu-devel] [PATCH 16/16] 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: Igor Mammedov Cc: aliguori@us.ibm.com, ehabkost@redhat.com, mst@redhat.com, jan.kiszka@siemens.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 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2XGLHGHCBKHDBMJIRXJXP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/15/2013 04:12 PM, Igor Mammedov wrote: > ... via current_machine->cpu_hot_add() hook called by cpu-set QMP comma= nd, > for x86 target. >=20 > cpu-add's "id" argument is a CPU thread number in a range [0..max-cpus = - 1) Off by one. It's either [0..max-cpus) or [0..max-cpus - 1] (they mean the same thing). It might be worth including a sample QMP command in the commit message. >=20 > Signed-off-by: Igor Mammedov > --- > v5: > * accept id=3D[0..max_cpus) range in cpu-add command This notation is right, unlike the commit message. Reviewing just the QMP portion: > +++ b/qapi-schema.json > @@ -1387,6 +1387,17 @@ > { 'command': 'cpu', 'data': {'index': 'int'} } > =20 > ## > +# @cpu-add > +# > +# Adds CPU with specified id > +# > +# @id: cpu id of CPU to be created Here it would be helpful to mention what forms a valid id (your [0..max-cpus) notation from the commit message, for example). > +# > +# Returns: Nothing on success > +## > +{ 'command': 'cpu-add', 'data': {'id': 'int'} } > + Should be usable from libvirt's perspective, even if hot-plugging more than one cpu requires more than one QMP call. Do we have a counterpart QMP call to easily determine which cpu ids can still be hotplugged? If so, should we mention that in the documentation of this command? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2XGLHGHCBKHDBMJIRXJXP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRbH0fAAoJEKeha0olJ0NqrG0H/j9ex1XYDzcxtebCF3cXddby XqsUzv7j+VSSmMD1EBKE8IaUYdwack/5R+6VcETt0jG3c909/FLr1WQBLKMj5o1Y +ouc1KkOsyBUCQNA6EiX9cbClJscT/OYNdriAGIKITL5oyuDkeStn3DFNRrxWkwH ZqvRbeeJh8L1hGbfW1Zab7kl9VNDfEqO+bMsWnfA469Oy2XBJFZ0IdiDbyZzWmzf Nbst94xSaIuHsL7Wyhuj/cH86BXVzweT4SDV55E77NLbOuFF+rNw9nTCfoTqDScr QBaqjxCbyr2Fy39hRUQ1aSt/EPJiPcwnjbfF6U+tei7lxRs10tx/TUbjwIX1sLE= =FHlr -----END PGP SIGNATURE----- ------enig2XGLHGHCBKHDBMJIRXJXP--