From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel@nongnu.org, Anthony Liguori <aliguori@us.ibm.com>
Cc: kvm@vger.kernel.org, Gleb Natapov <gleb@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Alexander Graf <agraf@suse.de>, Blue Swirl <blauwirbel@gmail.com>,
Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] [0.14?][PATCH v3 2/4] ioapic: Save/restore irr
Date: Thu, 3 Feb 2011 22:54:12 +0100 [thread overview]
Message-ID: <dd15c3f8ed4a04c8fd75899ec5f229436bc6c801.1296770049.git.jan.kiszka@web.de> (raw)
In-Reply-To: <cover.1296770049.git.jan.kiszka@web.de>
In-Reply-To: <cover.1296770049.git.jan.kiszka@web.de>
From: Jan Kiszka <jan.kiszka@siemens.com>
This is a guest modifiable state that must be saved/restored properly.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
hw/ioapic.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/hw/ioapic.c b/hw/ioapic.c
index 8bc31f7..8c46c1d 100644
--- a/hw/ioapic.c
+++ b/hw/ioapic.c
@@ -231,14 +231,27 @@ static void ioapic_mem_writel(void *opaque, target_phys_addr_t addr, uint32_t va
}
}
+static int ioapic_post_load(void *opaque, int version_id)
+{
+ IOAPICState *s = opaque;
+
+ if (version_id == 1) {
+ /* set sane value */
+ s->irr = 0;
+ }
+ return 0;
+}
+
static const VMStateDescription vmstate_ioapic = {
.name = "ioapic",
- .version_id = 1,
+ .version_id = 2,
+ .post_load = ioapic_post_load,
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.fields = (VMStateField []) {
VMSTATE_UINT8(id, IOAPICState),
VMSTATE_UINT8(ioregsel, IOAPICState),
+ VMSTATE_UINT32_V(irr, IOAPICState, 2),
VMSTATE_UINT64_ARRAY(ioredtbl, IOAPICState, IOAPIC_NUM_PINS),
VMSTATE_END_OF_LIST()
}
--
1.7.1
next prev parent reply other threads:[~2011-02-03 21:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-03 21:54 [Qemu-devel] [0.14?][PATCH v3 0/4] IOAPIC fixes Jan Kiszka
2011-02-03 21:54 ` [Qemu-devel] [0.14?][PATCH v3 1/4] ioapic: Implement EOI handling for level-triggered IRQs Jan Kiszka
2011-02-04 12:51 ` Anthony Liguori
2011-02-03 21:54 ` Jan Kiszka [this message]
2011-02-03 21:54 ` [Qemu-devel] [0.14?][PATCH v3 3/4] ioapic: Add support for qemu-kvm's vmstate v2 Jan Kiszka
2011-02-03 21:54 ` [Qemu-devel] [0.14?][PATCH v3 4/4] ioapic: Style & magics cleanup Jan Kiszka
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=dd15c3f8ed4a04c8fd75899ec5f229436bc6c801.1296770049.git.jan.kiszka@web.de \
--to=jan.kiszka@web.de \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@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).