Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size

2014-11-20 Thread Michael S. Tsirkin
On Wed, Nov 19, 2014 at 09:31:35AM -0700, Eric Blake wrote: On 11/19/2014 09:06 AM, Michael S. Tsirkin wrote: 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

Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size

2014-11-19 Thread Igor Mammedov
On Mon, 17 Nov 2014 13:11:08 +0800 zhanghailiang zhang.zhanghaili...@huawei.com 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

Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size

2014-11-19 Thread Michael S. Tsirkin
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

Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size

2014-11-19 Thread Luiz Capitulino
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,

Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size

2014-11-19 Thread Eric Blake
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

Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size

2014-11-19 Thread Michael S. Tsirkin
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 m...@redhat.com wrote: On Mon, Nov 17, 2014 at 01:11:08PM +0800, zhanghailiang wrote: The global parameter 'ram_size' does

Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size

2014-11-19 Thread Eric Blake
On 11/19/2014 09:06 AM, Michael S. Tsirkin wrote: 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

Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size

2014-11-19 Thread zhanghailiang
On 2014/11/20 0:31, Eric Blake wrote: On 11/19/2014 09:06 AM, Michael S. Tsirkin wrote: 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

Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size

2014-11-19 Thread zhanghailiang
On 2014/11/19 18:32, 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

[Qemu-devel] [PATCH v2 1/3] pc-dimm: add a function to calculate VM's current RAM size

2014-11-16 Thread zhanghailiang
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