[pve-devel] [PATCH qemu-server] fix #3581: pass size via argument for memory-backend-ram qmp call

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Aug 17 15:21:48 CEST 2021


Hi,

On Thu, Aug 12, 2021 at 08:16:42PM +0200, Constantin Herold wrote:
> Signed-off-by: Constantin Herold <proxmox8914 at herold.me>
> ---
>  PVE/QemuServer/Memory.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/QemuServer/Memory.pm b/PVE/QemuServer/Memory.pm
> index f3e15f1..e34727f 100644
> --- a/PVE/QemuServer/Memory.pm
> +++ b/PVE/QemuServer/Memory.pm
> @@ -155,7 +155,7 @@ sub qemu_memory_hotplug {
>  		    eval { hugepages_update_locked($code); };
>  
>  		} else {
> -		    eval { mon_cmd($vmid, "object-add", 'qom-type' => "memory-backend-ram", id => "mem-$name", props => { size => int($dimm_size*1024*1024) } ) };
> +		    eval { mon_cmd($vmid, "object-add", 'qom-type' => "memory-backend-ram", id => "mem-$name", size => int($dimm_size*1024*1024) ) };

Looks fine.

There's another `object-add` command a few lines higher up which also
still uses `props` and needs to be changed in the same way.

Care to include it in a v2?
It would also be nice to include the cause in the commit message,
something like:

    `props` was deprecated with qemu 5.0 and removed in qemu 6.0.
    The commands are now generally flattened.





More information about the pve-devel mailing list