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 | cb335bebe1f5eadd0188215a9703c3fd90cfe84e (patch) | |
tree | 2ecaf3b4c6805eca055b800a209addf5b7d7b9be | |
parent | ea9ad3e945526c56935c245a268731878c74e570 (diff) | |
download | qemu-cb335bebe1f5eadd0188215a9703c3fd90cfe84e.zip qemu-cb335bebe1f5eadd0188215a9703c3fd90cfe84e.tar.gz qemu-cb335bebe1f5eadd0188215a9703c3fd90cfe84e.tar.bz2 |
s390/sclpconsole: Add code to support live migration for sclpconsole
This patch adds the necessary life migration pieces to the sclp code
by using 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>
-rw-r--r-- | hw/char/sclpconsole.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c index fd270be..776f284 100644 --- a/hw/char/sclpconsole.c +++ b/hw/char/sclpconsole.c @@ -197,9 +197,26 @@ static void trigger_ascii_console_data(void *opaque, int n, int level) sclp_service_interrupt(0); } +static const VMStateDescription vmstate_sclpconsole = { + .name = "sclpconsole", + .version_id = 0, + .minimum_version_id = 0, + .minimum_version_id_old = 0, + .fields = (VMStateField[]) { + VMSTATE_BOOL(event.event_pending, SCLPConsole), + VMSTATE_UINT8_ARRAY(iov, SCLPConsole, SIZE_BUFFER_VT220), + VMSTATE_UINT32(iov_sclp, SCLPConsole), + VMSTATE_UINT32(iov_bs, SCLPConsole), + VMSTATE_UINT32(iov_data_len, SCLPConsole), + VMSTATE_UINT32(iov_sclp_rest, SCLPConsole), + VMSTATE_END_OF_LIST() + } +}; + /* qemu object creation and initialization functions */ /* tell character layer our call-back functions */ + static int console_init(SCLPEvent *event) { static bool console_available; @@ -242,6 +259,7 @@ static void console_class_init(ObjectClass *klass, void *data) SCLPEventClass *ec = SCLP_EVENT_CLASS(klass); dc->props = console_properties; + dc->vmsd = &vmstate_sclpconsole; ec->init = console_init; ec->exit = console_exit; ec->get_send_mask = send_mask; |