From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 6AB436D932 for ; Tue, 17 Aug 2021 17:35:38 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 620E6239D7 for ; Tue, 17 Aug 2021 17:35:08 +0200 (CEST) Received: from mail.herold.me (mail.herold.me [IPv6:2a02:8106:0:5e02:42:c0ff:fea8:366]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 19E1923970 for ; Tue, 17 Aug 2021 17:35:04 +0200 (CEST) X-Virus-Scanned: Yes From: Constantin Herold DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=herold.me; s=mail; t=1629214495; bh=CtkQUEfinCAQUE9Rgjfl6dGKK1zOnbYSCMupLYUf+Wg=; h=From:To:Cc:Subject:In-Reply-To:References; b=p7/tzZEG/z5JpedKFKH7tWj6SCb39F8sPjCowm5vQJ+KQtfbBuUMPs8I/NOexgnXi lmqNg9iCPzlEPiAmqt11RCunvBUKVzpl5QnmEXhz6wkKqcKJaQsjuhlrY3pf5RzOsJ qdU7Bjplc+LEHLzvDAoDEFZ/Sv8/9zA3sG5NTZRk= To: pve-devel@lists.proxmox.com Date: Tue, 17 Aug 2021 17:34:34 +0200 Message-Id: <20210817153434.1983-2-proxmox8914@herold.me> In-Reply-To: <20210817153434.1983-1-proxmox8914@herold.me> References: <20210817153434.1983-1-proxmox8914@herold.me> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.450 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain KAM_INFOUSMEBIZ 0.75 Prevalent use of .info|.us|.me|.me.uk|.biz|xyz|id|rocks|life domains in spam/malware SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [herold.me, memory.pm] Subject: [pve-devel] [PATCH v2 qemu-server 2/2] fix #3581: pass size via argument for memory-backend-ram qmp call X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 15:35:38 -0000 Signed-off-by: Constantin Herold --- 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