[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 015/103] pc: exit QEMU if compat machine doesn't supp
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 015/103] pc: exit QEMU if compat machine doesn't support memory hotlpug |
Date: |
Tue, 17 Jun 2014 20:37:11 +0300 |
From: Igor Mammedov <address@hidden>
... if user attempts to start it with memory hotplug enabled.
Signed-off-by: Igor Mammedov <address@hidden>
Acked-by: Peter Crosthwaite <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/pc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 2320442..de5f259 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)) {
--
MST
- [Qemu-devel] [PULL 002/103] pc: ACPI BIOS: use enum for defining memory affinity flags, (continued)
- [Qemu-devel] [PULL 010/103] memory: add memory_region_is_mapped() API, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 009/103] pc: implement pc-dimm device abstraction, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 014/103] pc: add 'etc/reserved-memory-end' fw_cfg interface for SeaBIOS, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 015/103] pc: exit QEMU if compat machine doesn't support memory hotlpug,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 013/103] pc: exit QEMU if number of slots more than supported 256, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 017/103] pc-dimm: add busy address check and address auto-allocation, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 018/103] pc-dimm: add busy slot check and slot auto-allocation, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 019/103] acpi: rename cpu_hotplug_defs.h to pc-hotplug.h, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 020/103] acpi: memory hotplug ACPI hardware implementation, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 021/103] trace: add acpi memory hotplug IO region events, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 022/103] trace: pc: add PC_DIMM slot & address allocation, Michael S. Tsirkin, 2014/06/17
- [Qemu-devel] [PULL 012/103] pc: initialize memory hotplug address space, Michael S. Tsirkin, 2014/06/17