diff options
author | Matthew Rosato | 2014-08-28 17:25:32 +0200 |
---|---|---|
committer | Christian Borntraeger | 2014-09-01 09:25:32 +0200 |
commit | 0844df77fdf9cd115a3b8f414333d41b3a88bc9d (patch) | |
tree | 388bf334ef6e44fefa3ce074ab720928def46909 /include | |
parent | pc-bios/s390-ccw.img binary update (diff) | |
download | qemu-0844df77fdf9cd115a3b8f414333d41b3a88bc9d.tar.gz qemu-0844df77fdf9cd115a3b8f414333d41b3a88bc9d.tar.xz qemu-0844df77fdf9cd115a3b8f414333d41b3a88bc9d.zip |
sclp-s390: Add device to manage s390 memory hotplug
Add sclpMemoryHotplugDev to contain associated data structures, etc.
Signed-off-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/s390x/sclp.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h index 7ef16226df..5c435749e1 100644 --- a/include/hw/s390x/sclp.h +++ b/include/hw/s390x/sclp.h @@ -37,6 +37,7 @@ #define SCLP_STARTING_SUBINCREMENT_ID 0x10001 #define SCLP_INCREMENT_UNIT 0x10000 #define MAX_AVAIL_SLOTS 32 +#define MAX_STORAGE_INCREMENTS 1020 /* CPU hotplug SCLP codes */ #define SCLP_HAS_CPU_INFO 0x0C00000000000000ULL @@ -156,6 +157,23 @@ typedef struct SCCB { char data[SCCB_DATA_LEN]; } QEMU_PACKED SCCB; +typedef struct sclpMemoryHotplugDev sclpMemoryHotplugDev; + +#define TYPE_SCLP_MEMORY_HOTPLUG_DEV "sclp-memory-hotplug-dev" +#define SCLP_MEMORY_HOTPLUG_DEV(obj) \ + OBJECT_CHECK(sclpMemoryHotplugDev, (obj), TYPE_SCLP_MEMORY_HOTPLUG_DEV) + +struct sclpMemoryHotplugDev { + SysBusDevice parent; + ram_addr_t standby_mem_size; + ram_addr_t padded_ram_size; + ram_addr_t pad_size; + ram_addr_t standby_subregion_size; + ram_addr_t rzm; + int increment_size; + char *standby_state_map; +}; + static inline int sccb_data_len(SCCB *sccb) { return be16_to_cpu(sccb->h.length) - sizeof(sccb->h); @@ -163,6 +181,8 @@ static inline int sccb_data_len(SCCB *sccb) void s390_sclp_init(void); +sclpMemoryHotplugDev *init_sclp_memory_hotplug_dev(void); +sclpMemoryHotplugDev *get_sclp_memory_hotplug_dev(void); void sclp_service_interrupt(uint32_t sccb); void raise_irq_cpu_hotplug(void); |