From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VON2A-00013d-9h for qemu-devel@nongnu.org; Tue, 24 Sep 2013 03:27:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VON20-0005in-VQ for qemu-devel@nongnu.org; Tue, 24 Sep 2013 03:27:46 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:40368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VON20-0005iR-LV for qemu-devel@nongnu.org; Tue, 24 Sep 2013 03:27:36 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Sep 2013 08:27:36 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id C5E97219005F 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 b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8O7RKpp32571610 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 r8O7RVci028315 for ; Tue, 24 Sep 2013 01:27:32 -0600 From: Christian Borntraeger Date: Tue, 24 Sep 2013 09:27:44 +0200 Message-Id: <1380007671-18976-11-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 10/17] s390/sclpquiesce: Add code to support live migration 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 sclpquiesce by using the vmstate_register. Signed-off-by: Heinz Graalfs Reviewed-by: Alexander Graf Signed-off-by: Christian Borntraeger --- hw/s390x/sclpquiesce.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hw/s390x/sclpquiesce.c b/hw/s390x/sclpquiesce.c index 5fadc86..d335251 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; -- 1.8.3.1