diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2015-05-27 09:49:43 +0200 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2015-09-07 16:10:43 +0200 |
commit | 515190d9da0c85084d32d6ad36afb15a6d35729e (patch) | |
tree | fc2b95cdacf14e44dc1034645c096c20523d1bcb /include/hw/s390x | |
parent | 732bdd383ee06be2655b1a849a628ff03b0000b8 (diff) | |
download | qemu-515190d9da0c85084d32d6ad36afb15a6d35729e.zip qemu-515190d9da0c85084d32d6ad36afb15a6d35729e.tar.gz qemu-515190d9da0c85084d32d6ad36afb15a6d35729e.tar.bz2 |
s390/sclp: introduce a root sclp device
Let's create a root sclp device, which has other sclp devices as
children (e.g. the event facility for now) and can later be used
for migration of sclp specific attributes and setup of memory.
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'include/hw/s390x')
-rw-r--r-- | include/hw/s390x/event-facility.h | 2 | ||||
-rw-r--r-- | include/hw/s390x/sclp.h | 22 |
2 files changed, 22 insertions, 2 deletions
diff --git a/include/hw/s390x/event-facility.h b/include/hw/s390x/event-facility.h index 3c1ee35..dd88818 100644 --- a/include/hw/s390x/event-facility.h +++ b/include/hw/s390x/event-facility.h @@ -189,8 +189,6 @@ typedef struct SCLPEventClass { OBJECT_GET_CLASS(SCLPEventFacilityClass, (obj), \ TYPE_SCLP_EVENT_FACILITY) -typedef struct SCLPEventFacility SCLPEventFacility; - typedef struct SCLPEventFacilityClass { SysBusDeviceClass parent_class; void (*command_handler)(SCLPEventFacility *ef, SCCB *sccb, uint64_t code); diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h index e8a64e2..f243438 100644 --- a/include/hw/s390x/sclp.h +++ b/include/hw/s390x/sclp.h @@ -163,6 +163,28 @@ typedef struct SCCB { char data[SCCB_DATA_LEN]; } QEMU_PACKED SCCB; +#define TYPE_SCLP "sclp" +#define SCLP(obj) OBJECT_CHECK(SCLPDevice, (obj), TYPE_SCLP) +#define SCLP_CLASS(oc) OBJECT_CLASS_CHECK(SCLPDeviceClass, (oc), TYPE_SCLP) +#define SCLP_GET_CLASS(obj) OBJECT_GET_CLASS(SCLPDeviceClass, (obj), TYPE_SCLP) + +typedef struct SCLPEventFacility SCLPEventFacility; + +typedef struct SCLPDevice { + /* private */ + DeviceState parent_obj; + SCLPEventFacility *event_facility; + + /* public */ +} SCLPDevice; + +typedef struct SCLPDeviceClass { + /* private */ + DeviceClass parent_class; + + /* public */ +} SCLPDeviceClass; + typedef struct sclpMemoryHotplugDev sclpMemoryHotplugDev; #define TYPE_SCLP_MEMORY_HOTPLUG_DEV "sclp-memory-hotplug-dev" |