... which is current ACPI implementation limit.

Signed-off-by: Igor Mammedov <imamm...@redhat.com>
---
 hw/i386/pc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 69e4225..6fe1803 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1204,6 +1204,12 @@ FWCfgState *pc_memory_init(MemoryRegion *system_memory,
         ram_addr_t hotplug_mem_size =
             machine->init_args.maxram_size - ram_size;
 
+        if (machine->init_args.ram_slots > 256) {
+            error_report("unsupported amount of memory slots: %"PRIu64,
+                         machine->init_args.ram_slots);
+            exit(EXIT_FAILURE);
+        }
+
         pcms->hotplug_memory_base =
             ROUND_UP(0x100000000ULL + above_4g_mem_size, 1ULL << 30);
 
-- 
1.9.0


Reply via email to