Skip to contentSkip to conversation

pc: allow raising low memory via max-ram-below-4g option

PATCH Superseded Gerd Hoffmann 1 participant 1 message Nov 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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. 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.

---
 hw/i386/pc.c      |  2 +-
 hw/i386/pc_piix.c | 61 +++++++++++++++++++++++++++++++++++--------------------
 2 files changed, 40 insertions(+), 23 deletions(-)
hw/i386/pc.c +1 -1
index 0cb8afd..55d6ca3 100644
@@ -1885,7 +1885,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,
hw/i386/pc_piix.c +39 -22

68 lines not on this page · raw message

Signature · 1 line
1.8.3.1