From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr7YW-0004pc-7K for qemu-devel@nongnu.org; Wed, 19 Nov 2014 10:52:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xr7YR-0004p8-CF for qemu-devel@nongnu.org; Wed, 19 Nov 2014 10:52:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr7YR-0004mf-2Y for qemu-devel@nongnu.org; Wed, 19 Nov 2014 10:52:27 -0500 Message-ID: <546CBCB3.9040606@redhat.com> Date: Wed, 19 Nov 2014 08:52:19 -0700 From: Eric Blake MIME-Version: 1.0 References: <1416201070-11448-1-git-send-email-zhang.zhanghailiang@huawei.com> <1416201070-11448-2-git-send-email-zhang.zhanghailiang@huawei.com> <20141119103246.GE26395@redhat.com> <20141119101336.5893db6c@redhat.com> In-Reply-To: <20141119101336.5893db6c@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HcLM5hiueuawhWTF5WRi2hnlKapspOfdj" Subject: Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino , "Michael S. Tsirkin" Cc: imammedo@redhat.com, peter.huangpeng@huawei.com, zhanghailiang , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HcLM5hiueuawhWTF5WRi2hnlKapspOfdj Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/19/2014 08:13 AM, Luiz Capitulino wrote: > On Wed, 19 Nov 2014 12:32:46 +0200 > "Michael S. Tsirkin" wrote: >=20 >> On Mon, Nov 17, 2014 at 01:11:08PM +0800, zhanghailiang wrote: >>> The global parameter 'ram_size' does not take into account >>> the hotplugged memory. >>> >>> In some codes, we use 'ram_size' as current VM's real RAM size, >>> which is not correct. >>> >>> Add function 'get_current_ram_size' to calculate VM's current RAM siz= e, >>> it will enumerate present memory devices and also plus ram_size. >>> >>> Signed-off-by: zhanghailiang >> >> >> This affects QMP right? >=20 > I think later patches will tell how. CC'ing Eric. As far as I can tell, this is just correcting a reporting issue; the existing QMP commands/events for tracking balloon size will now properly account for hotplugged memory. What I don't know is if this change in semantics will affect any users. Libvirt is not yet supporting memory hotplug, so ideally, fixing this bug before libvirt uses memory hotplug means libvirt will never have to worry about qemu versions that do incorrect reporting. The alternative is to declare that the existing QMP commands cannot change in semantics for the existing members that it reports, and must instead report additional dictionary members describing the amount of hot-plugged memory, and then require that the client add the numbers together itself. That sounds mean to the client, so I'm hoping we don't have to go there. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --HcLM5hiueuawhWTF5WRi2hnlKapspOfdj 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 iQEcBAEBCAAGBQJUbLyzAAoJEKeha0olJ0Nq2EAIAI7l276s/FfqvMGWfYx+QCUR goYk2uT7nLnXbO5uy0w8Kg634OUkXfi/R69NWatSh+buJvK2mCOZJch9pN5FLV5O 5HNZtSP1ur2WUUTCMOnPaeDHOU0M3+snjuzExKVF+7LIu5rquRs5C9pwbycvCcvm ir5DpBCtpoHIqZwPdr2B44udWf4U+ad0pKpy6+rfyFa+Ogb+0N+Rvzo2Dg3UV4Or jRi1/WsvzqU1Fke1J+P2OwNzv1Ly7ZUf3pSTZ4VuTesfZa9AJLUyoQ052pFdyKiv x3sQMjzr9CdpD4OQ/Fzw3ja98qm3Q87LQScIMe8+XHCOmCyXwy2rPU1LjRZEKck= =GhTW -----END PGP SIGNATURE----- --HcLM5hiueuawhWTF5WRi2hnlKapspOfdj--