From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMEr5-0002mS-2Z for qemu-devel@nongnu.org; Wed, 18 Sep 2013 06:19:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMEqq-0008VJ-KP for qemu-devel@nongnu.org; Wed, 18 Sep 2013 06:19:31 -0400 Received: from e06smtp18.uk.ibm.com ([195.75.94.114]:35523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMEqq-0008TE-AT for qemu-devel@nongnu.org; Wed, 18 Sep 2013 06:19:16 -0400 Received: from /spool/local by e06smtp18.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Sep 2013 11:19:12 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5123017D8062 for ; Wed, 18 Sep 2013 11:19:22 +0100 (BST) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8IAIxN0000470 for ; Wed, 18 Sep 2013 10:18:59 GMT Received: from d06av08.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r8IAJArd012307 for ; Wed, 18 Sep 2013 04:19:11 -0600 From: Christian Borntraeger Date: Wed, 18 Sep 2013 12:19:24 +0200 Message-Id: <1379499572-49737-4-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1379499572-49737-1-git-send-email-borntraeger@de.ibm.com> References: <1379499572-49737-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PATCH 03/11] s390/sclpquiesce: Add code to support live migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Christian Borntraeger , Jens Freimann , Heinz Graalfs , qemu-devel From: Heinz Graalfs This patch adds the necessary life migration pieces to sclpquiesce by using the vmstate_register. Signed-off-by: Heinz Graalfs Signed-off-by: Christian Borntraeger --- hw/s390x/sclpquiesce.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/s390x/sclpquiesce.c b/hw/s390x/sclpquiesce.c index 5fadc86..eba0e6e 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 { @@ -91,7 +102,7 @@ static int quiesce_init(SCLPEvent *event) qemu_register_powerdown_notifier(&qn.notifier); - return 0; + return vmstate_register(NULL, 0, &vmstate_sclpquiesce, event); } static void quiesce_class_init(ObjectClass *klass, void *data) -- 1.8.3.1