qemu-server/PVE/QemuServer
Thomas Lamprecht 33b0d3b7be memory hotplug: rework max memory handling, make phys-bits dependent
QEMU 7.1 introduced some actual checks for the max memory value in
1caab5cf86bd ("i386/pc: bounds check phys-bits against max used GPA")
and while correct it breaks our by-luck working hard coded max mem of
4 TB for cases with smaller phys bit address sizes, like some older
CPUs or most CPU types have per default if not 'host' or 'max'.

QEMU uses 40 bits per default if the CPU isn't set to host or
phys-bits is not set explicitly.

For 40 bit it seems that depending on machine type one has a max
possible mem of: i440 -> 752, q35 -> 722 GiB, but instead of reducing
it to 704 GiB (512+1128+64) in a hard coded way we acutally check for
the bit size that will probably be used and use that to determine the
max memory size useable.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 16:54:49 +01:00
..
Agent.pm tree wide cleanup of s/return undef/return/ 2020-10-16 16:20:05 +02:00
CGroup.pm add PVE::QemuServer::Cgroup 2020-11-24 12:00:33 +01:00
Cloudinit.pm drop get_pending_changes and simplify cloudinit_pending api call 2022-11-16 18:17:07 +01:00
CPUConfig.pm cpu config: indentation fixup 2022-11-17 16:46:40 +01:00
Drive.pm fix #4321: properly check cloud-init drive permissions 2022-11-17 08:10:28 +01:00
Helpers.pm move 'windows_version' to Helpers 2022-11-10 17:02:34 +01:00
ImportDisk.pm api: support VM disk import 2022-04-04 16:41:13 +02:00
Machine.pm cfg2cmd: fix +pveN machine types with pxe 2021-04-18 17:58:56 +02:00
Makefile add PVE::QemuServer::Cgroup 2020-11-24 12:00:33 +01:00
Memory.pm memory hotplug: rework max memory handling, make phys-bits dependent 2022-11-17 16:54:49 +01:00
Monitor.pm mon_cmd: add explicit return 2019-11-30 17:24:55 +01:00
OVF.pm parse ovf: untaint path when calling file_size_info 2022-03-11 10:45:59 +01:00
PCI.pm pci: make mediated device sysfs path independent of PCI id 2022-11-09 09:06:19 +01:00
USB.pm usb: fixup: include USB config only for non-q35 again 2022-11-11 07:43:03 +01:00