From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNk2c-0004B9-GM for qemu-devel@nongnu.org; Tue, 17 Feb 2015 10:26:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNk2Y-0001k6-4k for qemu-devel@nongnu.org; Tue, 17 Feb 2015 10:26:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33669) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNk2X-0001jx-RG for qemu-devel@nongnu.org; Tue, 17 Feb 2015 10:26:22 -0500 Message-ID: <54E35D94.2020209@redhat.com> Date: Tue, 17 Feb 2015 08:26:12 -0700 From: Eric Blake MIME-Version: 1.0 References: <1424142892-7275-1-git-send-email-mdroth@linux.vnet.ibm.com> <1424142892-7275-6-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1424142892-7275-6-git-send-email-mdroth@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xiJ3XHaNXpjGioUicLDKaGBNiuFCXUWhS" Subject: Re: [Qemu-devel] [PATCH 05/10] qga: introduce three guest memory block commmands with stubs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, zhanghailiang This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xiJ3XHaNXpjGioUicLDKaGBNiuFCXUWhS Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/16/2015 08:14 PM, Michael Roth wrote: > From: zhanghailiang >=20 > Introduce three new guest commands: > guest-get-memory-blocks, guest-set-memory-blocks, guest-get-memory-bloc= k-size. Sorry for the late review, but I think guest-get-memory-block-size is the wrong command to add. > +## > +# @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' } Any QAPI command that returns a bare int instead of a dictionary is non-extensible, and therefore of suspect design. I think it would be better to have: { 'command': 'guest-get-memory-block-info', 'returns': { 'size': 'int' } } to allow for future extension. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --xiJ3XHaNXpjGioUicLDKaGBNiuFCXUWhS 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/ iQEcBAEBCAAGBQJU412UAAoJEKeha0olJ0NqdUEH/jTYhdr++X5iuSVbvBS2qy+0 IRRbqUbrDG4C8qxYGIcL5s6DoBPGx9WaJjEekSsSKEgVpRWtOOazZ98a9+OtK/0T TLBR4zYrQAvSui+7NtNE+sqU/hvYGFjIm3pIp2ByyVoEt8oR4YAUhnS7mpx5fMjr yu8ltW2tx56pOfoS6RseaeCU/7KH0ro+0A9GUaY0188+kSE1ew23Kz040Xvd3vUt tyTZiFokYQuOUFBCHIC0+h1wPF+jE13AZqiFZBnkt1NLB5DCippAE56VrSSim0pR BrvX0NDAojWep6T3nsxcbTjHxIM2yhtfhl5x1nCPgxn0fdinQyPKy4kI161pPa0= =XGwt -----END PGP SIGNATURE----- --xiJ3XHaNXpjGioUicLDKaGBNiuFCXUWhS--