Received: from eggs.gnu.org ([2001:4830:134:3::10]:41131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4T3q-0005rb-32 for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:00:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4T3m-0001Tq-BV for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:00:17 -0400 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:33699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4T3m-0001T7-0c for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:00:14 -0400 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 15 Jun 2015 13:00:12 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 663EF1B08067 for ; Mon, 15 Jun 2015 13:01:10 +0100 (BST) Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t5FC0ASd19922952 for ; Mon, 15 Jun 2015 12:00:10 GMT Received: from d06av04.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t5FC08Cf000941 for ; Mon, 15 Jun 2015 06:00:09 -0600 From: Christian Borntraeger Date: Mon, 15 Jun 2015 14:00:28 +0200 Message-Id: <1434369631-76375-5-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1434369631-76375-1-git-send-email-borntraeger@de.ibm.com> References: <1434369631-76375-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PULL 4/7] s390x/watchdog: diag288 migration support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel , Alexander Graf , Christian Borntraeger , Jens Freimann , Cornelia Huck , 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