qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: quintela@redhat.com
Cc: kwolf@redhat.com, Jes.Sorensen@redhat.com,
	Jason Wang <jasowang@redhat.com>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH v4] floppy: save and restore DIR register
Date: Wed, 06 Apr 2011 14:33:27 +0200	[thread overview]
Message-ID: <4D9C5D97.7090804@redhat.com> (raw)
In-Reply-To: <m3y63ninmh.fsf@neno.mitica>

On 04/06/2011 02:13 PM, Juan Quintela wrote:
> Jason Wang<jasowang@redhat.com>  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<jasowang@redhat.com>
>> ---
>>
>> 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<quintela@redhat.com>
>
> 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 <pbonzini@redhat.com>

Paolo

  reply	other threads:[~2011-04-06 12:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06 10:34 [Qemu-devel] [PATCH v4] floppy: save and restore DIR register Jason Wang
2011-04-06 12:13 ` [Qemu-devel] " Juan Quintela
2011-04-06 12:33   ` Paolo Bonzini [this message]
2011-04-06 15:22 ` Kevin Wolf

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=4D9C5D97.7090804@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=jasowang@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).