summaryrefslogtreecommitdiffstats
path: root/include/hw/ppc/spapr.h
diff options
context:
space:
mode:
authorBharata B Rao2015-06-29 10:44:27 +0200
committerDavid Gibson2015-09-23 02:51:10 +0200
commit4a1c9cf0073e733b421e7b82ad673e7cf6ed8454 (patch)
tree5a1f1733a3ad366cb77e43d796f2b91a53b6223f /include/hw/ppc/spapr.h
parentspapr_drc: don't allow 'empty' DRCs to be unisolated or allocated (diff)
downloadqemu-4a1c9cf0073e733b421e7b82ad673e7cf6ed8454.tar.gz
qemu-4a1c9cf0073e733b421e7b82ad673e7cf6ed8454.tar.xz
qemu-4a1c9cf0073e733b421e7b82ad673e7cf6ed8454.zip
spapr: Initialize hotplug memory address space
Initialize a hotplug memory region under which all the hotplugged memory is accommodated. Also enable memory hotplug by setting CONFIG_MEM_HOTPLUG. Modelled on i386 memory hotplug. Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc/spapr.h')
-rw-r--r--include/hw/ppc/spapr.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 8a0a74d5d9..e882770db7 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -5,6 +5,7 @@
#include "hw/boards.h"
#include "hw/ppc/xics.h"
#include "hw/ppc/spapr_drc.h"
+#include "hw/mem/pc-dimm.h"
struct VIOsPAPRBus;
struct sPAPRPHBState;
@@ -76,6 +77,7 @@ struct sPAPRMachineState {
/*< public >*/
char *kvm_type;
+ MemoryHotplugState hotplug_memory;
};
#define H_SUCCESS 0
@@ -610,4 +612,14 @@ int spapr_rtc_import_offset(DeviceState *dev, int64_t legacy_offset);
#define SPAPR_MEMORY_BLOCK_SIZE (1 << 28) /* 256MB */
+/*
+ * This defines the maximum number of DIMM slots we can have for sPAPR
+ * guest. This is not defined by sPAPR but we are defining it to 32 slots
+ * based on default number of slots provided by PowerPC kernel.
+ */
+#define SPAPR_MAX_RAM_SLOTS 32
+
+/* 1GB alignment for hotplug memory region */
+#define SPAPR_HOTPLUG_MEM_ALIGN (1ULL << 30)
+
#endif /* !defined (__HW_SPAPR_H__) */