aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/event-facility.c
diff options
context:
space:
mode:
authorJason J. Herne <jjherne@us.ibm.com>2014-01-20 14:51:50 -0500
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-01-21 16:48:39 +0100
commit492044581c26ba9ace3af5c6abb2a911a23ad188 (patch)
tree43b4efcfd659477cdb2710e5b4521107c4223f82 /hw/s390x/event-facility.c
parent8cc3aecf8461bd38028ddb4a56a17d0a1583de36 (diff)
s390-sclp: SCLP Event integration
Add an sclp event for "cpu was hot plugged". This allows Qemu to deliver an SCLP interrupt to the guest stating that the requested cpu hotplug was completed. Signed-off-by: Jason J. Herne <jjherne@us.ibm.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'hw/s390x/event-facility.c')
-rw-r--r--hw/s390x/event-facility.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
index 25951a020a..a73c0b924a 100644
--- a/hw/s390x/event-facility.c
+++ b/hw/s390x/event-facility.c
@@ -32,6 +32,8 @@ struct SCLPEventFacility {
unsigned int receive_mask;
};
+SCLPEvent cpu_hotplug;
+
/* return true if any child has event pending set */
static bool event_pending(SCLPEventFacility *ef)
{
@@ -335,6 +337,10 @@ static int init_event_facility(S390SCLPDevice *sdev)
}
qdev_init_nofail(quiesce);
+ object_initialize(&cpu_hotplug, sizeof(cpu_hotplug), TYPE_SCLP_CPU_HOTPLUG);
+ qdev_set_parent_bus(DEVICE(&cpu_hotplug), BUS(&event_facility->sbus));
+ object_property_set_bool(OBJECT(&cpu_hotplug), true, "realized", NULL);
+
return 0;
}