From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: quintela@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [RFC][PATCH] ide: Break migration by splitting error status from status register
Date: Mon, 06 Jun 2011 14:35:03 +0200 [thread overview]
Message-ID: <4DECC977.7070501@redhat.com> (raw)
In-Reply-To: <1306836595-8481-1-git-send-email-kwolf@redhat.com>
On 05/31/2011 12:09 PM, Kevin Wolf wrote:
> When adding the werror=stop mode, some flags were added to s->status
> which are used to determine what kind of operation should be restarted
> when the VM is continued.
>
> Unfortunately, it turns out that s->status is in fact a device register
> and as such is visible to the guest (some of the abused bits are even
> writable for the guest).
>
> Splitting the internal status and the status register into two different
> variables is easy enough, but this will break migration: We must have a
> way to detect what s->status really means. Is it only the status register
> (as used by new versions) or do we have to extract internal error status
> flags?
>
> Here we seem to be lacking some kind of optional subsection that would
> be simply ignored by older versions, but can contain information for new
> versions. Is there any precedence on how to solve this?
You need to stop writing either status field to the migration stream;
instead you recreate the "wrong" status field before saving, and set the
"right" status fields from the saved data after loading.
On top of this, you use a subsection to save bits 3-7 of the "real" IDE
status registers. These had been hijacked, so there is no room for them
in the migration stream. Of course, the subsection is needed only if
any of those bits is set.
Paolo
prev parent reply other threads:[~2011-06-06 12:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-31 10:09 [Qemu-devel] [RFC][PATCH] ide: Break migration by splitting error status from status register Kevin Wolf
2011-06-06 12:35 ` Paolo Bonzini [this message]
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=4DECC977.7070501@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).