]> git.proxmox.com Git - qemu-server.git/commit
hugepages: fix memory size checking
authorStefan Reiter <s.reiter@proxmox.com>
Mon, 28 Oct 2019 13:30:41 +0000 (14:30 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 29 Oct 2019 15:52:54 +0000 (16:52 +0100)
commit062a7ea71435396bc9c9b1c7f642e749419a8371
treebf32408e6b43f9497f7bd0d08fef77ef9344d741
parent331a5079e1a8c5bd0f82c91ff9335c36c1c333f8
hugepages: fix memory size checking

The codepath for "any" hugepages did not check if memory size was even,
leading to the code below trying to allocate half a hugepage (e.g. VM
with 2049MiB RAM would lead to 1024.5 2kB hugepages).

Also improve error message for systems with only 1GB hugepages enabled.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
PVE/QemuServer/Memory.pm