[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 13/33] pc: exit QEMU if number of slots more than
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v4 13/33] pc: exit QEMU if number of slots more than supported 256 |
Date: |
Mon, 2 Jun 2014 15:25:09 +0200 |
... which is imposed by current naming scheme of ACPI memory devices.
Signed-off-by: Igor Mammedov <address@hidden>
Acked-by: Peter Crosthwaite <address@hidden>
---
v2:
* use define for amount of supported slots, requested by Eduardo Habkost
---
hw/i386/pc.c | 6 ++++++
include/hw/acpi/acpi.h | 6 ++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index f94cfd9..5522503 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1234,6 +1234,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);
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 */
--
1.7.1
- Re: [Qemu-devel] [PATCH v4 05/33] add memdev backend infrastructure, (continued)
[Qemu-devel] [PATCH v4 07/33] qdev: hotplug for buss-less devices, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 09/33] pc: implement pc-dimm device abstraction, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 08/33] qdev: expose DeviceState.hotplugged field as a property, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 06/33] vl.c: extend -m option to support options for memory hotplug, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 11/33] pc-dimm: do not allow to set already used memdev, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 10/33] memory: add memory_region_is_mapped() API, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 12/33] pc: initialize memory hotplug address space, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 13/33] pc: exit QEMU if number of slots more than supported 256,
Igor Mammedov <=
[Qemu-devel] [PATCH v4 14/33] pc: add 'etc/reserved-memory-end' fw_cfg interface for SeaBIOS, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 15/33] pc: exit QEMU if compat machine doesn't support memory hotlpug, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 17/33] pc-dimm: add busy address check and address auto-allocation, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 16/33] pc: add memory hotplug handler to PC_MACHINE, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 18/33] pc-dimm: add busy slot check and slot auto-allocation, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 19/33] acpi: rename cpu_hotplug_defs.h to pc-hotplug.h, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 20/33] acpi: memory hotplug ACPI hardware implementation, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 21/33] trace: add acpi memory hotplug IO region events, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 23/33] acpi:piix4: allow plug/unlug callbacks handle not only PCI devices, Igor Mammedov, 2014/06/02
[Qemu-devel] [PATCH v4 22/33] trace: pc: add PC_DIMM slot & address allocation, Igor Mammedov, 2014/06/02