qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC][PATCH] ide: Break migration by splitting error st


From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]