From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr7mM-0006d5-6I for qemu-devel@nongnu.org; Wed, 19 Nov 2014 11:06:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xr7mH-0001z2-Ba for qemu-devel@nongnu.org; Wed, 19 Nov 2014 11:06:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57434) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xr7mH-0001yv-2l for qemu-devel@nongnu.org; Wed, 19 Nov 2014 11:06:45 -0500 Date: Wed, 19 Nov 2014 18:06:28 +0200 From: "Michael S. Tsirkin" Message-ID: <20141119160628.GF28563@redhat.com> 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> <546CBCB3.9040606@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <546CBCB3.9040606@redhat.com> 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: Eric Blake Cc: qemu-devel@nongnu.org, imammedo@redhat.com, peter.huangpeng@huawei.com, zhanghailiang , Luiz Capitulino On Wed, Nov 19, 2014 at 08:52:19AM -0700, Eric Blake wrote: > On 11/19/2014 08:13 AM, Luiz Capitulino wrote: > > On Wed, 19 Nov 2014 12:32:46 +0200 > > "Michael S. Tsirkin" wrote: > > > >> 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 size, > >>> it will enumerate present memory devices and also plus ram_size. > >>> > >>> Signed-off-by: zhanghailiang > >> > >> > >> This affects QMP right? > > > > 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. IOW you ack this patch for 2.2?