summaryrefslogtreecommitdiffstats
path: root/hw/i386/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r--hw/i386/pc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 6cdcb00..366e799 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);
OpenPOWER on IntegriCloud