From patchwork Tue Sep 24 07:27:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 277364 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CE2DC2C00C3 for ; Tue, 24 Sep 2013 17:28:29 +1000 (EST) Received: from localhost ([::1]:43933 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VON2p-000189-0X for incoming@patchwork.ozlabs.org; Tue, 24 Sep 2013 03:28:27 -0400 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 d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 24 Sep 2013 08:27:33 +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 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r8O7RV6k028302; Tue, 24 Sep 2013 01:27:31 -0600 Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id B0D9D1224437; Tue, 24 Sep 2013 09:27:31 +0200 (CEST) From: Christian Borntraeger To: Anthony Liguori Date: Tue, 24 Sep 2013 09:27:44 +0200 Message-Id: <1380007671-18976-11-git-send-email-borntraeger@de.ibm.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1380007671-18976-1-git-send-email-borntraeger@de.ibm.com> References: <1380007671-18976-1-git-send-email-borntraeger@de.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13092407-1948-0000-0000-000006644650 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 195.75.94.110 Cc: qemu-devel , Christian Borntraeger , Heinz Graalfs , Alexander Graf , Richard Henderson Subject: [Qemu-devel] [PULL 10/17] s390/sclpquiesce: Add code to support live migration X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;