From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwYj4-0004Au-Ut for qemu-devel@nongnu.org; Mon, 16 Jun 2014 11:21:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwYiz-0003yt-Tt for qemu-devel@nongnu.org; Mon, 16 Jun 2014 11:21:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwYiz-0003yf-Cf for qemu-devel@nongnu.org; Mon, 16 Jun 2014 11:21:33 -0400 Message-ID: <539F0B7A.4050508@redhat.com> Date: Mon, 16 Jun 2014 09:21:30 -0600 From: Eric Blake MIME-Version: 1.0 References: <1401978968-7733-1-git-send-email-imammedo@redhat.com> <1401978968-7733-2-git-send-email-imammedo@redhat.com> In-Reply-To: <1401978968-7733-2-git-send-email-imammedo@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VKmaxDOPxdbVu9uE4cKn4jSO1asBlVQWm" Subject: Re: [Qemu-devel] [PATCH 1/5] qmp: add query-memory-devices command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov , qemu-devel@nongnu.org Cc: vasilis.liaskovitis@profitbricks.com, lcapitulino@redhat.com, pkrempa@redhat.com, armbru@redhat.com, mst@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --VKmaxDOPxdbVu9uE4cKn4jSO1asBlVQWm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/05/2014 08:36 AM, Igor Mammedov wrote: > ... allowing to get state of present memory devices. > Currently implemented only for PCDIMMDevice. >=20 > Signed-off-by: Igor Mammedov > --- > v2: > * fix typos an json syntax in QMP example > * make 'id' optional to allow command work with > anonymous memory devices > --- > hw/mem/pc-dimm.c | 39 ++++++++++++++++++++++++++++ > include/hw/mem/pc-dimm.h | 2 + > qapi-schema.json | 53 +++++++++++++++++++++++++++++++= ++++++++ > qmp-commands.hx | 27 ++++++++++++++++++++ > qmp.c | 11 ++++++++ > stubs/Makefile.objs | 1 + > stubs/qmp_pc_dimm_device_list.c | 7 +++++ > 7 files changed, 140 insertions(+), 0 deletions(-) > create mode 100644 stubs/qmp_pc_dimm_device_list.c >=20 > +++ b/qapi-schema.json > @@ -4722,3 +4722,56 @@ > 'btn' : 'InputBtnEvent', > 'rel' : 'InputMoveEvent', > 'abs' : 'InputMoveEvent' } } > + > +## > +# @PCDIMMDeviceInfo: > +# > +# PCDIMMDevice state information > +# > +# @id: the device's ID Might be worth annotating this as #optional > +# > +# @addr: physical address, where device is mapped > +# > +# @size: size of memory device provides grammar reads awkwardly; maybe 's/device/that the device/ > +{ 'type': 'PCDIMMDeviceInfo', > + 'data': { '*id': 'str', > + 'addr': 'int', > + 'size': 'int', > + 'slot': 'int', > + 'node': 'int', > + 'memdev': 'str', > + 'hotplugged': 'bool', > + 'hotpluggable': 'bool' > + } > +} Looks okay. > + > +## > +# @MemoryDeviceInfo: > +# > +# Union containing information about a memory device > +# > +# Since: 2.1 > +## > +{ 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} } > + This command works, but it is a bit verbose. A flat union would be a bit more compact over the wire, but we don't yet have support for a flat union with an empty base class. So I'll live with this. The two tweaks to the .json file only affect comments, so they are minor enough that I'm okay with: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --VKmaxDOPxdbVu9uE4cKn4jSO1asBlVQWm 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTnwt6AAoJEKeha0olJ0NqwWgH/ipCRwhrq0AxXoGAtn/blqcB lhyDw2VEgYZm3jj8dt9w8DTPiJGCIAnCxtU+LhpB5w+PBAyCbK4YBSg2DxClL8Bs LhrasIYV9WP2W9MNR8z3kdn2U/f7zV1sN898e1PW957nSFGEo3at/2VNOINQoF9s sgMpBWe82lOCK2hfCtqIX59fA3InMok2tmhPazMAkmph16h1HlnY/EdGCC16AK3N UiUNj56Xh3MRZHBAUvKpk+d2liWHCeD7t8kuDEi8XLZ9FhWmbL28hEDwYW6IfiJU MzYCixHy6uYrWLetnIXlVzX4XjD7TNjM0TPXUpqB/8C9tkvREQK0ltl8RSv5gko= =yFhM -----END PGP SIGNATURE----- --VKmaxDOPxdbVu9uE4cKn4jSO1asBlVQWm--