From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akZ5p-00060g-C0 for qemu-devel@nongnu.org; Mon, 28 Mar 2016 11:28:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akZ5m-0000a0-1O for qemu-devel@nongnu.org; Mon, 28 Mar 2016 11:28:37 -0400 References: <1458832031-71472-2-git-send-email-imammedo@redhat.com> <1459018613-78377-1-git-send-email-imammedo@redhat.com> From: Eric Blake Message-ID: <56F94D9E.7070002@redhat.com> Date: Mon, 28 Mar 2016 09:28:30 -0600 MIME-Version: 1.0 In-Reply-To: <1459018613-78377-1-git-send-email-imammedo@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sfnKe9Fo2K5HWhxBHSlUIv4iNol6r9FGW" Subject: Re: [Qemu-devel] [PATCH v5 1/2] QMP: add query-hotpluggable-cpus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov , qemu-devel@nongnu.org Cc: mjrosato@linux.vnet.ibm.com, thuth@redhat.com, pkrempa@redhat.com, ehabkost@redhat.com, aik@ozlabs.ru, armbru@redhat.com, agraf@suse.de, borntraeger@de.ibm.com, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, pbonzini@redhat.com, dgibson@redhat.com, mdroth@linux.vnet.ibm.com, afaerber@suse.de This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sfnKe9Fo2K5HWhxBHSlUIv4iNol6r9FGW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/26/2016 12:56 PM, Igor Mammedov wrote: > it will allow mgmt to query present and hotpluggable > CPU objects, it is required from a target platform that > wish to support command to implement and set > MachineClass.query_hotpluggable_cpus > callback, which will return a list of possible CPU objects > with options that would be needed for hotplugging possible > CPU objects. >=20 > There are: > 'type': 'str' - QOM CPU object type for usage with device_add > 'vcpus-count': 'int' - number of logical VCPU threads per > CPU object (mgmt needs to know) >=20 > and a set of optional fields that are to used for hotplugging > a CPU objects and would allows mgmt tools to know what/where > it could be hotplugged; > [node],[socket],[core],[thread] >=20 > For present CPUs there is a 'qom-path' field which > would allow mgmt to inspect whatever object/abstraction > the target platform considers as CPU object. >=20 > Signed-off-by: Igor Mammedov > --- > +++ b/qapi-schema.json > @@ -4126,3 +4126,44 @@ > ## > { 'enum': 'ReplayMode', > 'data': [ 'none', 'record', 'play' ] } > + > +## > +# CpuInstanceProperties > +# > +# @node: NUMA node ID the CPU belongs to, optional Mark this with '#optional', like you do in the other members. > +# @socket: #optional socket number within node/board the CPU belongs t= o > +# @core: #optional core number within socket the CPU belongs to > +# @thread: #optional thread number within core the CPU belongs to > +# > +# Since: 2.7 > +{ 'struct': 'CpuInstanceProperties', Missing ## trailing doc marker. Doesn't matter quite yet, but will once Marc-Andre's patches for automated doc generation land. > + 'data': { '*node': 'int', > + '*socket': 'int', > + '*core': 'int', > + '*thread': 'int' > + } > +} > + > +## > +# @HotpluggableCPU > +# > +# @type: CPU object type for usage with device_add command > +# @props: list of properties to be used for hotplugging CPU > +# @vcpus-count: number of logical VCPU threads @HotpluggableCPU provid= es > +# @qom-path: #optional link to existing CPU object if CPU is present o= r > +# omitted if CPU is not present. > +# > +# Since: 2.7 > +{ 'struct': 'HotpluggableCPU', Another missing ## > + 'data': { 'type': 'str', > + 'vcpus-count': 'int', > + 'props': 'CpuInstanceProperties', > + '*qom-path': 'str' > + } > +} > + > +## > +# @query-hotpluggable-cpus > +# > +# Since: 2.7 > +{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU']= } Looks okay. > diff --git a/qmp-commands.hx b/qmp-commands.hx > index 9e05365..85ffba3 100644 > --- a/qmp-commands.hx > +++ b/qmp-commands.hx > @@ -4853,3 +4853,46 @@ Example: > {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 38= 40, > "pop-vlan": 1, "id": 251658240} > ]} > + > +EQMP > + > + { > + .name =3D "query-hotpluggable-cpus", > + .args_type =3D "", > + .mhandler.cmd_new =3D qmp_marshal_query_hotpluggable_cpus, > + }, > + > +SQMP > +Show existing/possible CPUs Why two spaces? > +------------------------------- Line is too long. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --sfnKe9Fo2K5HWhxBHSlUIv4iNol6r9FGW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW+U2eAAoJEKeha0olJ0NqWVIIAK3gt5YwnjHsZ8nelSCfEDgI 4ZvBrpra9fhmUcAGEgGHt28tp/bKCLP70l6cxX87L5/qfPVN+ASQQ33rzw9OfYiZ ZWdC0dZpVgzGNWuvgCVM8mW01ORFWMUK4WtyG8DgLjT3phyhMZx/KLwH5xdpC0tY YpWe3MBDscaROcXkeuwDdGhQfUvvx7kyqs+pxUfXjAOCvqN09o9R+WM+d2hXY83m nQ32rw+UXfxhwZa8Etg8fhawccAkwo+ppOL7yz6t+8jIY8/Uet/vD1QSlQ9Y5RQj /HVtISIL0e5RPauhh1uyz4u5mBNJJxC3VUvhe3O8XQSuQqdWp9LW+KajP+dT490= =rL6Z -----END PGP SIGNATURE----- --sfnKe9Fo2K5HWhxBHSlUIv4iNol6r9FGW--