On 11/19/2014 08:13 AM, Luiz Capitulino wrote: > On Wed, 19 Nov 2014 12:32:46 +0200 > "Michael S. Tsirkin" <m...@redhat.com> 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 <zhang.zhanghaili...@huawei.com> >> >> >> 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. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature