diff options
author | Matthew Rosato <mjrosato@linux.vnet.ibm.com> | 2014-08-28 11:25:32 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-09-01 09:25:32 +0200 |
commit | 0844df77fdf9cd115a3b8f414333d41b3a88bc9d (patch) | |
tree | 388bf334ef6e44fefa3ce074ab720928def46909 /hw/s390x | |
parent | f3602219884127c6f15958148c540302db5cf77b (diff) | |
download | qemu-0844df77fdf9cd115a3b8f414333d41b3a88bc9d.zip qemu-0844df77fdf9cd115a3b8f414333d41b3a88bc9d.tar.gz qemu-0844df77fdf9cd115a3b8f414333d41b3a88bc9d.tar.bz2 |
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 'hw/s390x')
-rw-r--r-- | hw/s390x/sclp.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index d8ddf35..769d7c3 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -183,3 +183,33 @@ void s390_sclp_init(void) OBJECT(dev), NULL); qdev_init_nofail(dev); } + +sclpMemoryHotplugDev *init_sclp_memory_hotplug_dev(void) +{ + DeviceState *dev; + dev = qdev_create(NULL, TYPE_SCLP_MEMORY_HOTPLUG_DEV); + object_property_add_child(qdev_get_machine(), + TYPE_SCLP_MEMORY_HOTPLUG_DEV, + OBJECT(dev), NULL); + qdev_init_nofail(dev); + return SCLP_MEMORY_HOTPLUG_DEV(object_resolve_path( + TYPE_SCLP_MEMORY_HOTPLUG_DEV, NULL)); +} + +sclpMemoryHotplugDev *get_sclp_memory_hotplug_dev(void) +{ + return SCLP_MEMORY_HOTPLUG_DEV(object_resolve_path( + TYPE_SCLP_MEMORY_HOTPLUG_DEV, NULL)); +} + +static TypeInfo sclp_memory_hotplug_dev_info = { + .name = TYPE_SCLP_MEMORY_HOTPLUG_DEV, + .parent = TYPE_SYS_BUS_DEVICE, + .instance_size = sizeof(sclpMemoryHotplugDev), +}; + +static void register_types(void) +{ + type_register_static(&sclp_memory_hotplug_dev_info); +} +type_init(register_types); |