diff options
author | Igor Mammedov | 2014-06-02 15:25:09 +0200 |
---|---|---|
committer | Michael S. Tsirkin | 2014-06-19 15:41:48 +0200 |
commit | a0cc8856e8722188583901665c7d9e5ddc752fc0 (patch) | |
tree | 7d701e81e165ae71171b3085a877a03d09e38c30 /hw/i386 | |
parent | pc: initialize memory hotplug address space (diff) | |
download | qemu-a0cc8856e8722188583901665c7d9e5ddc752fc0.tar.gz qemu-a0cc8856e8722188583901665c7d9e5ddc752fc0.tar.xz qemu-a0cc8856e8722188583901665c7d9e5ddc752fc0.zip |
pc: exit QEMU if number of slots more than supported 256
... which is imposed by current naming scheme of ACPI memory devices.
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>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/pc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 6cdcb0048d..366e799bb0 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1230,6 +1230,12 @@ FWCfgState *pc_memory_init(MemoryRegion *system_memory, ram_addr_t hotplug_mem_size = machine->maxram_size - ram_size; + if (machine->ram_slots > ACPI_MAX_RAM_SLOTS) { + error_report("unsupported amount of memory slots: %"PRIu64, + machine->ram_slots); + exit(EXIT_FAILURE); + } + pcms->hotplug_memory_base = ROUND_UP(0x100000000ULL + above_4g_mem_size, 1ULL << 30); |