From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNk0u-0002WS-2L for qemu-devel@nongnu.org; Tue, 17 Feb 2015 10:24:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNk0p-00018H-Ne for qemu-devel@nongnu.org; Tue, 17 Feb 2015 10:24:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNk0p-00018C-GX for qemu-devel@nongnu.org; Tue, 17 Feb 2015 10:24:35 -0500 Message-ID: <54E35D14.1030409@redhat.com> Date: Tue, 17 Feb 2015 08:24:04 -0700 From: Eric Blake MIME-Version: 1.0 References: <1421894406-12180-1-git-send-email-zhang.zhanghailiang@huawei.com> <1421894406-12180-2-git-send-email-zhang.zhanghailiang@huawei.com> In-Reply-To: <1421894406-12180-2-git-send-email-zhang.zhanghailiang@huawei.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KMTVS5miB8BXtbp2rcMHK1Vj6u2oQtujG" Subject: Re: [Qemu-devel] [PATCH v2 1/5] qga: introduce three guest memory block commmands with stubs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zhanghailiang , qemu-devel@nongnu.org Cc: hangaohuai@huawei.com, lcapitulino@redhat.com, lersek@redhat.com, peter.huangpeng@huawei.com, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KMTVS5miB8BXtbp2rcMHK1Vj6u2oQtujG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/21/2015 07:40 PM, zhanghailiang wrote: > Introduce three new guest commands: > guest-get-memory-blocks, guest-set-memory-blocks, guest-get-memory-bloc= k-size. >=20 > With these three commands, we can support online/offline guest's memory= block > (logical memory hotplug/unplug) as required from host. >=20 > Signed-off-by: zhanghailiang > --- > qga/commands-posix.c | 38 +++++++++++++++++ > qga/commands-win32.c | 19 +++++++++ > qga/qapi-schema.json | 114 +++++++++++++++++++++++++++++++++++++++++++= ++++++++ > 3 files changed, 171 insertions(+) >=20 > + > +## > +# @guest-get-memory-block-size: > +# > +# Get the the size (in bytes) of a memory block in guest. > +# It is the unit of memory block online/offline operation (also called= Logical > +# Memory Hotplug). > +# > +# Returns: memory block size in bytes. > +# > +# Since 2.3 > +## > +{ 'command': 'guest-get-memory-block-size', > + 'returns': 'int' } Yuck. This is not extensible. Please consider instead providing a dictionary-based response, so that you can add further dictionary members in the future if you have additional pieces of information to return. In fact, if you do that, it might be better to name this guest-get-memory-block-info, where size is the only info you provide now, but where adding other parameters in the future is much easier to predict. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --KMTVS5miB8BXtbp2rcMHK1Vj6u2oQtujG 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/ iQEcBAEBCAAGBQJU410UAAoJEKeha0olJ0NqnE0H/RsOjNY243DIyoXH7tT8axxu SDCiGFOze2Ddpyl+RZJ169TBSyujyOND54IrlSLf/+VfjVh97LLVi19EMLNh9fvJ 9/lF3KRQOIc2g59qwsXAZGzwpfZIO3vJkK9RFoWYu7i7/S3tYD19MVtg0xlw8UC7 FzLTod5K/xwby3PqLTFWl9r32To3gTyg/edfeH9DtZ0ApIjBcBzj2r06TaVLq7cV u18pjJN28UpZYAD1EhcL/Mn7X9XeP3wBNTlc/rNHx2XW03000u94bBA/ymDPgSnx tJupLNeCbrqGQbiWDDfujlrtKpmVw24jAPUSG8zbovlbbhxVAXFY0Ps8r7rr3QY= =P98u -----END PGP SIGNATURE----- --KMTVS5miB8BXtbp2rcMHK1Vj6u2oQtujG--