From 8156d480861e937768d7d9ac0b73c1e74c368f1d Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 2 Jun 2016 10:48:25 +0200 Subject: pc: allow raising low memory via max-ram-below-4g option This patch extends the functionality of the max-ram-below-4g option to also allow increasing lowmem. Use case: Give as much memory as possible to legacy non-PAE guests. While being at it also rework the lowmem calculation logic and add a longish comment describing how it works and what the compatibility constrains are. Note: This is a incompatible change. When setting max-ram-below-4g to a value larger than 3.5G (or 3G with gigabyte alignment) it has no effect on older qemu versions: qemu silently ignores it. With the patch applied it actually has an effect and changes the ram layout. Highly unlikely to hit in practive though as there is no reason start old qemu versions that way. Signed-off-by: Gerd Hoffmann Reviewed-by: Eduardo Habkost Message-Id: <1464857305-26675-1-git-send-email-kraxel@redhat.com> Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/i386/pc.c') diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e29ccc8341..bfaf5a399b 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1893,7 +1893,7 @@ static void pc_machine_initfn(Object *obj) pc_machine_get_hotplug_memory_region_size, NULL, NULL, NULL, &error_abort); - pcms->max_ram_below_4g = 1ULL << 32; /* 4G */ + pcms->max_ram_below_4g = 0xe0000000; /* 3.5G */ object_property_add(obj, PC_MACHINE_MAX_RAM_BELOW_4G, "size", pc_machine_get_max_ram_below_4g, pc_machine_set_max_ram_below_4g, -- cgit v1.2.3