diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2016-06-02 10:48:25 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-06-06 18:57:06 +0200 |
commit | 8156d480861e937768d7d9ac0b73c1e74c368f1d (patch) | |
tree | b0e78971775be6a523bf0d1055b3bd3d2e703eda /hw/i386/pc.c | |
parent | 46e7b70699d8bf4db08c8bb5111974318dd5416d (diff) | |
download | qemu-8156d480861e937768d7d9ac0b73c1e74c368f1d.tar.gz qemu-8156d480861e937768d7d9ac0b73c1e74c368f1d.tar.bz2 qemu-8156d480861e937768d7d9ac0b73c1e74c368f1d.zip |
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 <kraxel@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1464857305-26675-1-git-send-email-kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r-- | hw/i386/pc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |