qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v3 16/34] pc: exit QEMU if compat machine doesn't su


From: Igor Mammedov
Subject: [Qemu-devel] [PATCH v3 16/34] pc: exit QEMU if compat machine doesn't support memory hotlpug
Date: Tue, 27 May 2014 15:01:13 +0200

... if user attempts to start it with memory hotplug enabled.

Signed-off-by: Igor Mammedov <address@hidden>
---
 hw/i386/pc.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 5be7b33..af68c99 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1229,6 +1229,16 @@ FWCfgState *pc_memory_init(MemoryRegion *system_memory,
         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 */
     if (guest_info->has_reserved_memory &&
         (ram_size < machine->maxram_size)) {
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]