[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 015/106] pc: exit QEMU if compat machine doesn't s
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 015/106] pc: exit QEMU if compat machine doesn't support memory hotlpug |
Date: |
Wed, 18 Jun 2014 19:16:30 +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 830aeee..4fad414 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1225,6 +1225,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 v2 013/106] pc: exit QEMU if number of slots more than supported 256, (continued)
- [Qemu-devel] [PULL v2 013/106] pc: exit QEMU if number of slots more than supported 256, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 035/106] acpi-test: update expected tables, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 062/106] NUMA: check if the total numa memory size is equal to ram_size, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 041/106] migration: introduce self_announce_delay(), Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 038/106] ich: get rid of spaces in type name, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 028/106] pc: add acpi-device link to PCMachineState, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 031/106] pc: add "hotplug-memory-region-size" property to PC_MACHINE, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 049/106] vhost_net should call the poll callback only when it is set, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 050/106] Refactor virtio-net to use generic get_vhost_net, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 051/106] vhost_net_init will use VhostNetOptions to get all its arguments, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 015/106] pc: exit QEMU if compat machine doesn't support memory hotlpug,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 047/106] Add G_IO_HUP handler for socket chardev, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 036/106] virtio: Drop superfluous conditionals around g_free(), Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 105/106] tests: simplify code, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 039/106] pc: q35: acpi: report error to user on unsupported unplug request, Michael S. Tsirkin, 2014/06/18