From: Laszlo Ersek <lersek@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: blauwirbel@gmail.com, pbonzini@redhat.com, akong@redhat.com,
qemu-devel@nongnu.org
Subject: [Qemu-devel] v1->v2 diff (PIIX3: reset the VM when the Reset Control Register's RCPU bit gets set)
Date: Tue, 15 Jan 2013 21:12:28 +0100 [thread overview]
Message-ID: <50F5B82C.7030301@redhat.com> (raw)
In-Reply-To: <1358280254-16512-1-git-send-email-lersek@redhat.com>
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index 75dc9c4..38a1027 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -477,9 +477,26 @@ static void piix3_pre_save(void *opaque)
}
}
+static bool piix3_rcr_needed(void *opaque)
+{
+ PIIX3State *piix3 = opaque;
+
+ return (piix3->rcr != 0);
+}
+
+static const VMStateDescription vmstate_piix3_rcr = {
+ .name = "PIIX3/rcr",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .fields = (VMStateField []) {
+ VMSTATE_UINT8(rcr, PIIX3State),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static const VMStateDescription vmstate_piix3 = {
.name = "PIIX3",
- .version_id = 4,
+ .version_id = 3,
.minimum_version_id = 2,
.minimum_version_id_old = 2,
.post_load = piix3_post_load,
@@ -488,8 +505,14 @@ static const VMStateDescription vmstate_piix3 = {
VMSTATE_PCI_DEVICE(dev, PIIX3State),
VMSTATE_INT32_ARRAY_V(pci_irq_levels_vmstate, PIIX3State,
PIIX_NUM_PIRQS, 3),
- VMSTATE_UINT8_V(rcr, PIIX3State, 4),
VMSTATE_END_OF_LIST()
+ },
+ .subsections = (VMStateSubsection []) {
+ {
+ .vmsd = &vmstate_piix3_rcr,
+ .needed = piix3_rcr_needed,
+ },
+ { 0 }
}
};
next prev parent reply other threads:[~2013-01-15 20:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 23:47 [Qemu-devel] [PATCH] PIIX3: reset the VM when the Reset Control Register's RCPU bit gets set Laszlo Ersek
2013-01-15 16:53 ` Paolo Bonzini
2013-01-15 19:09 ` Laszlo Ersek
2013-01-15 20:04 ` [Qemu-devel] [PATCH v2] " Laszlo Ersek
2013-01-15 20:12 ` Laszlo Ersek [this message]
2013-01-16 10:54 ` Paolo Bonzini
2013-01-16 18:06 ` Anthony Liguori
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=50F5B82C.7030301@redhat.com \
--to=lersek@redhat.com \
--cc=akong@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=pbonzini@redhat.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).