diff options
author | Heinz Graalfs <graalfs@linux.vnet.ibm.com> | 2012-09-11 13:41:26 +0200 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2013-09-20 13:55:29 +0200 |
commit | 7e36b7a3561d685b8fb071b25ab887e890973a4d (patch) | |
tree | 4a6d70d29ee5c82b46e719eb887ddeab29ff735f /hw | |
parent | cb335bebe1f5eadd0188215a9703c3fd90cfe84e (diff) |
s390/sclpquiesce: Add code to support live migration
This patch adds the necessary life migration pieces to sclpquiesce
by using the vmstate_register.
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/s390x/sclpquiesce.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/hw/s390x/sclpquiesce.c b/hw/s390x/sclpquiesce.c index 5fadc86d42..d335251c00 100644 --- a/hw/s390x/sclpquiesce.c +++ b/hw/s390x/sclpquiesce.c @@ -65,6 +65,17 @@ static int read_event_data(SCLPEvent *event, EventBufferHeader *evt_buf_hdr, return 1; } +static const VMStateDescription vmstate_sclpquiesce = { + .name = "sclpquiesce", + .version_id = 0, + .minimum_version_id = 0, + .minimum_version_id_old = 0, + .fields = (VMStateField[]) { + VMSTATE_BOOL(event_pending, SCLPEvent), + VMSTATE_END_OF_LIST() + } +}; + typedef struct QuiesceNotifier QuiesceNotifier; static struct QuiesceNotifier { @@ -96,8 +107,10 @@ static int quiesce_init(SCLPEvent *event) static void quiesce_class_init(ObjectClass *klass, void *data) { + DeviceClass *dc = DEVICE_CLASS(klass); SCLPEventClass *k = SCLP_EVENT_CLASS(klass); + dc->vmsd = &vmstate_sclpquiesce; k->init = quiesce_init; k->get_send_mask = send_mask; |