diff options
author | Bharata B Rao <bharata@linux.vnet.ibm.com> | 2015-06-29 14:14:27 +0530 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2015-09-23 10:51:10 +1000 |
commit | 4a1c9cf0073e733b421e7b82ad673e7cf6ed8454 (patch) | |
tree | 5a1f1733a3ad366cb77e43d796f2b91a53b6223f /include | |
parent | 9d1852ce11c888e3ad5096be505d14045d8b49ae (diff) | |
download | qemu-4a1c9cf0073e733b421e7b82ad673e7cf6ed8454.zip qemu-4a1c9cf0073e733b421e7b82ad673e7cf6ed8454.tar.gz qemu-4a1c9cf0073e733b421e7b82ad673e7cf6ed8454.tar.bz2 |
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')
-rw-r--r-- | include/hw/ppc/spapr.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 8a0a74d..e882770 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__) */ |