From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [STABLE PATCH] ide: fix migration bug
Date: Fri, 28 Aug 2009 16:37:35 +0200 [thread overview]
Message-ID: <1251470255-1753-1-git-send-email-kraxel@redhat.com> (raw)
ide_cmd_write() sets cmd field for both master and slave interface.
Do the same when loading state.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/ide.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/hw/ide.c b/hw/ide.c
index 1e38ae3..99d8016 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -3271,6 +3271,7 @@ static int pci_ide_load(QEMUFile* f, void *opaque, int version_id)
qemu_get_8s(f, &s->cmd);
qemu_get_8s(f, &drive1_selected);
s->cur_drive = &d->ide_if[i * 2 + (drive1_selected != 0)];
+ s[1].cmd = s[0].cmd;
}
/* per IDE drive data */
@@ -3755,6 +3756,7 @@ static int pmac_ide_load(QEMUFile *f, void *opaque, int version_id)
qemu_get_8s(f, &s->cmd);
qemu_get_8s(f, &drive1_selected);
s->cur_drive = &s[(drive1_selected != 0)];
+ s[1].cmd = s[0].cmd;
/* per IDE drive data */
for(i = 0; i < 2; i++) {
@@ -4196,6 +4198,7 @@ static int md_load(QEMUFile *f, void *opaque, int version_id)
qemu_get_8s(f, &s->ide->cmd);
qemu_get_8s(f, &drive1_selected);
s->ide->cur_drive = &s->ide[(drive1_selected != 0)];
+ s->ide[1].cmd = s->ide[0].cmd;
for (i = 0; i < 2; i ++)
ide_load(f, &s->ide[i], version_id);
--
1.6.2.5
reply other threads:[~2009-08-28 14:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1251470255-1753-1-git-send-email-kraxel@redhat.com \
--to=kraxel@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).