public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Constantin Herold <proxmox8914@herold.me>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 qemu-server 2/2] fix #3581: pass size via argument for memory-backend-ram qmp call
Date: Tue, 17 Aug 2021 17:34:34 +0200	[thread overview]
Message-ID: <20210817153434.1983-2-proxmox8914@herold.me> (raw)
In-Reply-To: <20210817153434.1983-1-proxmox8914@herold.me>

Signed-off-by: Constantin Herold <proxmox8914@herold.me>
---
 PVE/QemuServer/Memory.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/PVE/QemuServer/Memory.pm b/PVE/QemuServer/Memory.pm
index f3e15f1..a41f5ae 100644
--- a/PVE/QemuServer/Memory.pm
+++ b/PVE/QemuServer/Memory.pm
@@ -143,8 +143,7 @@ sub qemu_memory_hotplug {
 			my $hugepages_host_topology = hugepages_host_topology();
 			hugepages_allocate($hugepages_topology, $hugepages_host_topology);
 
-			eval { mon_cmd($vmid, "object-add", 'qom-type' => "memory-backend-file", id => "mem-$name", props => {
-					     size => int($dimm_size*1024*1024), 'mem-path' => $path, share => JSON::true, prealloc => JSON::true } ); };
+			eval { mon_cmd($vmid, "object-add", 'qom-type' => "memory-backend-file", id => "mem-$name", size => int($dimm_size*1024*1024), 'mem-path' => $path, share => JSON::true, prealloc => JSON::true ) };
 			if (my $err = $@) {
 			    hugepages_reset($hugepages_host_topology);
 			    die $err;
@@ -155,7 +154,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) ) };
 		}
 
 		if (my $err = $@) {
-- 
2.23.0




  reply	other threads:[~2021-08-17 15:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 15:34 [pve-devel] [PATCH v2 qemu-server 1/2] fix #3581: cover letter Constantin Herold
2021-08-17 15:34 ` Constantin Herold [this message]
2021-08-18  8:50   ` [pve-devel] applied: [PATCH v2 qemu-server 2/2] fix #3581: pass size via argument for memory-backend-ram qmp call Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210817153434.1983-2-proxmox8914@herold.me \
    --to=proxmox8914@herold.me \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal