Received: from eggs.gnu.org ([2001:4830:134:3::10]:54393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z34n9-00033R-PE for qemu-devel@nongnu.org; Thu, 11 Jun 2015 11:53:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z34n5-0000NM-86 for qemu-devel@nongnu.org; Thu, 11 Jun 2015 11:53:19 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:35516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z34n4-0000Lm-Vi for qemu-devel@nongnu.org; Thu, 11 Jun 2015 11:53:15 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 Jun 2015 16:53:13 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0E93F219005F for ; Thu, 11 Jun 2015 16:52:49 +0100 (BST) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t5BFr9aE24838250 for ; Thu, 11 Jun 2015 15:53:09 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t5BFr9NG031144 for ; Thu, 11 Jun 2015 09:53:09 -0600 From: Christian Borntraeger Date: Thu, 11 Jun 2015 17:53:31 +0200 Message-Id: <1434038013-28990-5-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1434038013-28990-1-git-send-email-borntraeger@de.ibm.com> References: <1434038013-28990-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PATCH 4/6] s390x/watchdog: diag288 migration support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: Cornelia Huck , Christian Borntraeger , Jens Freimann , Alexander Graf , Xu Wang From: Xu Wang Add vmstate structure to keep state and data during migration. Signed-off-by: Xu Wang Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger --- hw/watchdog/wdt_diag288.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/watchdog/wdt_diag288.c b/hw/watchdog/wdt_diag288.c index 351b5a8..1185e06 100644 --- a/hw/watchdog/wdt_diag288.c +++ b/hw/watchdog/wdt_diag288.c @@ -21,6 +21,17 @@ static WatchdogTimerModel model = { .wdt_description = "diag288 device for s390x platform", }; +static const VMStateDescription vmstate_diag288 = { + .name = "vmstate_diag288", + .version_id = 0, + .minimum_version_id = 0, + .fields = (VMStateField[]) { + VMSTATE_TIMER_PTR(timer, DIAG288State), + VMSTATE_BOOL(enabled, DIAG288State), + VMSTATE_END_OF_LIST() + } +}; + static void wdt_diag288_reset(DeviceState *dev) { DIAG288State *diag288 = DIAG288(dev); @@ -90,6 +101,7 @@ static void wdt_diag288_class_init(ObjectClass *klass, void *data) dc->unrealize = wdt_diag288_unrealize; dc->reset = wdt_diag288_reset; set_bit(DEVICE_CATEGORY_MISC, dc->categories); + dc->vmsd = &vmstate_diag288; diag288->handle_timer = wdt_diag288_handle_timer; } -- 2.3.0