From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Reset interrupt_request on loadvm
Date: Mon, 02 Jun 2008 21:06:52 +0200 [thread overview]
Message-ID: <484444CC.8040202@web.de> (raw)
Trying to use savevm/loadvm to reduce my debug round-trip times, I came
across this bug. The following reset is required to avoid spurious IRQ
injections after the system state has been loaded from a snapshot. Not
sure if it is a regression of SVN head, but Qemu from my Suse 10.3 seems
to be immune.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---
cpu-defs.h | 3 +++
vl.c | 3 +++
2 files changed, 6 insertions(+)
Index: b/cpu-defs.h
===================================================================
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -172,3 +172,6 @@ typedef struct CPUTLBEntry {
const char *cpu_model_str;
#endif
+
+#define foreach_cpu(env) \
+ for(env = first_cpu; env != NULL; env = env->next_cpu)
Index: b/vl.c
===================================================================
--- a/vl.c
+++ b/vl.c
@@ -6032,6 +6032,7 @@ static SaveStateEntry *find_se(const cha
static int qemu_loadvm_state(QEMUFile *f)
{
SaveStateEntry *se;
+ CPUState *env;
int len, ret, instance_id, record_len, version_id;
int64_t total_len, end_pos, cur_pos;
unsigned int v;
@@ -6046,6 +6047,8 @@ static int qemu_loadvm_state(QEMUFile *f
ret = -1;
goto the_end;
}
+ foreach_cpu(env)
+ env->interrupt_request = 0;
total_len = qemu_get_be64(f);
end_pos = total_len + qemu_ftell(f);
for(;;) {
next reply other threads:[~2008-06-02 19:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-02 19:06 Jan Kiszka [this message]
2008-06-03 19:10 ` [Qemu-devel] [PATCH] Reset interrupt_request on loadvm Anthony Liguori
2008-06-03 19:50 ` [Qemu-devel] " 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=484444CC.8040202@web.de \
--to=jan.kiszka@web.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.