[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 013/106] pc: exit QEMU if number of slots more tha
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 013/106] pc: exit QEMU if number of slots more than supported 256 |
Date: |
Wed, 18 Jun 2014 19:16:23 +0300 |
From: Igor Mammedov <address@hidden>
... which is imposed by current naming scheme of ACPI memory devices.
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>
---
include/hw/acpi/acpi.h | 6 ++++++
hw/i386/pc.c | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h
index a9fae9d..e93de6c 100644
--- a/include/hw/acpi/acpi.h
+++ b/include/hw/acpi/acpi.h
@@ -26,6 +26,12 @@
#include "exec/memory.h"
#include "hw/irq.h"
+/*
+ * current device naming scheme supports
+ * only upto 256 memory devices
+ */
+#define ACPI_MAX_RAM_SLOTS 256
+
/* from linux include/acpi/actype.h */
/* Default ACPI register widths */
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);
--
MST
- [Qemu-devel] [PULL v2 006/106] vl.c: extend -m option to support options for memory hotplug, (continued)
- [Qemu-devel] [PULL v2 006/106] vl.c: extend -m option to support options for memory hotplug, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 020/106] acpi: memory hotplug ACPI hardware implementation, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 017/106] pc-dimm: add busy address check and address auto-allocation, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 008/106] qdev: expose DeviceState.hotplugged field as a property, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 048/106] vhost: add vhost_get_features and vhost_ack_features, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 076/106] memory: move mem_path handling to memory_region_allocate_system_memory, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 037/106] virtio: Drop superfluous conditionals around g_strdup(), Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 072/106] configure: add Linux libnuma detection, Michael S. Tsirkin, 2014/06/18
- Re: [Qemu-devel] [PULL v2 000/106] pc, pci, virtio, hotplug fixes, enhancements, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 032/106] pc: ACPI BIOS: reserve SRAT entry for hotplug mem hole, Michael S. Tsirkin, 2014/06/18
- [Qemu-devel] [PULL v2 013/106] pc: exit QEMU if number of slots more than supported 256,
Michael S. Tsirkin <=
- [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, 2014/06/18