mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
pc: exit QEMU if compat machine doesn't support memory hotlpug
... if user attempts to start it with memory hotplug enabled. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
de268e134c
commit
ca8336f385
1 changed files with 10 additions and 0 deletions
10
hw/i386/pc.c
10
hw/i386/pc.c
|
@ -1225,6 +1225,16 @@ FWCfgState *pc_memory_init(MemoryRegion *system_memory,
|
||||||
e820_add_entry(0x100000000ULL, above_4g_mem_size, E820_RAM);
|
e820_add_entry(0x100000000ULL, above_4g_mem_size, E820_RAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!guest_info->has_reserved_memory &&
|
||||||
|
(machine->ram_slots ||
|
||||||
|
(machine->maxram_size > ram_size))) {
|
||||||
|
MachineClass *mc = MACHINE_GET_CLASS(machine);
|
||||||
|
|
||||||
|
error_report("\"-memory 'slots|maxmem'\" is not supported by: %s",
|
||||||
|
mc->name);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
/* initialize hotplug memory address space */
|
/* initialize hotplug memory address space */
|
||||||
if (guest_info->has_reserved_memory &&
|
if (guest_info->has_reserved_memory &&
|
||||||
(ram_size < machine->maxram_size)) {
|
(ram_size < machine->maxram_size)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue