qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v4] floppy: save and restore DIR register


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH v4] floppy: save and restore DIR register
Date: Wed, 06 Apr 2011 14:33:27 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 04/06/2011 02:13 PM, Juan Quintela wrote:
Jason Wang<address@hidden>  wrote:
We need to keep DIR register unchanged across migration, but currently it
depends on the media_changed flags from block layer. Since we do not
save/restore it and the bdrv_open() called in dest node may set the
media_changed flag when trying to open floppy image, guest driver may think the
floppy have changed after migration. To fix this, a new filed media_changed in
FDrive strcutre was introduced in order to save and restore the it from block
layer through pre_save/post_load callbacks.

Signed-off-by: Jason Wang<address@hidden>
---

Changed from V3:
According to Juan's suggestions, back to v2 and just add the checking for
media_changed "changed" in .needed.
Do not fail the migration when src have a drive but dest does not, we can treat
it as user ejected the floppy.

Changed from V2:
According to Paolo's suggestions, a default_migration_media_changed property was
added to avoid saving subsections as much as possible. Its was set media_changed
in pre_load callback and then we can avoid the saving when it was equal to the
media_changed when migrating the FDrive. Behaviors of elder machine types are
also kept through compat_props.

Changed from V1:
Check the drive->bs during post_load.

  hw/fdc.c |   51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
  1 files changed, 50 insertions(+), 1 deletions(-)


Reviewed-by: Juan Quintela<address@hidden>

This solution is way less invasive that v3, and achieves exactly the
same compatibility.

True, thanks for putting up with the reviews! :)

Acked-by: Paolo Bonzini <address@hidden>

Paolo



reply via email to

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