From: Christian Borntraeger <borntraeger@de.ibm.com>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Jens Freimann <jfrei@linux.vnet.ibm.com>,
Alexander Graf <agraf@suse.de>,
Xu Wang <gesaint@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 4/6] s390x/watchdog: diag288 migration support
Date: Thu, 11 Jun 2015 17:53:31 +0200 [thread overview]
Message-ID: <1434038013-28990-5-git-send-email-borntraeger@de.ibm.com> (raw)
In-Reply-To: <1434038013-28990-1-git-send-email-borntraeger@de.ibm.com>
From: Xu Wang <gesaint@linux.vnet.ibm.com>
Add vmstate structure to keep state and data during migration.
Signed-off-by: Xu Wang <gesaint@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
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
next prev parent reply other threads:[~2015-06-11 15:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 15:53 [Qemu-devel] [PATCH 0/6] s390x/watchdog: add diag288 based watchdog Christian Borntraeger
2015-06-11 15:53 ` [Qemu-devel] [PATCH 1/6] watchdog: change option wording to allow for more watchdogs Christian Borntraeger
2015-06-11 15:53 ` [Qemu-devel] [PATCH 2/6] s390x/watchdog: introduce diag288 watchdog device Christian Borntraeger
2015-06-11 15:53 ` [Qemu-devel] [PATCH 3/6] s390x/kvm: diag288 instruction interception and handling Christian Borntraeger
2015-06-11 15:53 ` Christian Borntraeger [this message]
2015-06-11 15:53 ` [Qemu-devel] [PATCH 5/6] nmi: Implement inject_nmi() for non-monitor context use Christian Borntraeger
2015-06-11 15:53 ` [Qemu-devel] [PATCH 6/6] watchdog: Add new Virtual Watchdog action INJECT-NMI Christian Borntraeger
2015-06-15 13:55 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434038013-28990-5-git-send-email-borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=agraf@suse.de \
--cc=cornelia.huck@de.ibm.com \
--cc=gesaint@linux.vnet.ibm.com \
--cc=jfrei@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).