From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VON29-000135-Tr for qemu-devel@nongnu.org; Tue, 24 Sep 2013 03:27:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VON1z-0005hl-P8 for qemu-devel@nongnu.org; Tue, 24 Sep 2013 03:27:45 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:59035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VON1z-0005gN-Gg for qemu-devel@nongnu.org; Tue, 24 Sep 2013 03:27:35 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Sep 2013 08:27:34 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 72259219005C for ; Tue, 24 Sep 2013 08:27:32 +0100 (BST) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8O7RKAk58916900 for ; Tue, 24 Sep 2013 07:27:20 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r8O7RVdG028298 for ; Tue, 24 Sep 2013 01:27:32 -0600 From: Christian Borntraeger Date: Tue, 24 Sep 2013 09:27:43 +0200 Message-Id: <1380007671-18976-10-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1380007671-18976-1-git-send-email-borntraeger@de.ibm.com> References: <1380007671-18976-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PULL 09/17] s390/sclpconsole: Add code to support live migration for sclpconsole List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel , Christian Borntraeger , Heinz Graalfs , Alexander Graf , Richard Henderson From: Heinz Graalfs This patch adds the necessary life migration pieces to the sclp code by using vmstate_register. Signed-off-by: Heinz Graalfs Reviewed-by: Alexander Graf Signed-off-by: Christian Borntraeger --- hw/char/sclpconsole.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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; -- 1.8.3.1