mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
xen: fix ram init regression
Commit "8156d48
pc: allow raising low memory via max-ram-below-4g
option" causes a regression on xen, because it uses a different
memory split.
This patch initializes max-ram-below-4g to zero and leaves the
initialization to the memory initialization functions. That way
they can pick different default values (max-ram-below-4g is zero
still) or use the user supplied value (max-ram-below-4g is non-zero).
Also skip the whole ram split calculation on Xen. xen_ram_init()
does its own split calculation anyway so it is superfluous, also
this way xen_ram_init can actually see whenever max-ram-below-4g
is zero or not.
Reported-by: Anthony PERARD <anthony.perard@citrix.com>
Tested-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
e2c8f9e44e
commit
5ec7d09818
4 changed files with 36 additions and 24 deletions
|
@ -1919,7 +1919,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 = 0xe0000000; /* 3.5G */
|
||||
pcms->max_ram_below_4g = 0; /* use default */
|
||||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue