From: Paolo Bonzini <pbonzini@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: kwolf@redhat.com, "Michael S. Tsirkin" <mst@redhat.com>,
Jes.Sorensen@redhat.com, quintela@redhat.com,
qemu-devel@nongnu.org, Amit Shah <amit.shah@redhat.com>
Subject: [Qemu-devel] Re: [PATCH V3] floppy: save and restore DIR register
Date: Fri, 01 Apr 2011 13:22:51 +0200 [thread overview]
Message-ID: <4D95B58B.6060606@redhat.com> (raw)
In-Reply-To: <19861.41721.462027.268384@gargle.gargle.HOWL>
On 04/01/2011 12:03 PM, Jason Wang wrote:
> Paolo Bonzini writes:
> > On 04/01/2011 08:22 AM, Jason Wang wrote:
> > > +
> > > + if (drive->bs == NULL) {
> > > + return 1;
> >
> > Is it okay to return 1 here? Have you tested the case when both the
> > source and the target drives have no floppy?
> >
>
> Thanks for the reminding, and it could be fixed by put all pre/post callbacks
> into the subsections.
Not sure that works, post callbacks are not called for subsections that
are not needed.
> > (The "media_changed == 2" in my sample code was basically a way to save
> > the "media present" state of the drive on the source).
>
> Right, but it would make subsection saving be the common case (consider most of
> the vm may just have one floppy but we have two drives).
Hmm, right, there's 2 bits involved---media present and media changed.
> 1 Set default_migration_media_changed be 0 for 0.15 and 1 for elder
> 2 Unconditionally send subsection when it was 0, and do not send subsection when
> it was 1
Which means, never send it for pc-0.14 and always for pc-0.15. At this
point I'm starting to think that this new-to-old migration business is a
lost cause, and it's easier to bump the version number and just default
the field to 1 if the version is old. :(
The problem here is that you're solving a different problem than what
subsections were supposed to help with. Subsections help with "the
value that old versions used is usually but not always correct". Here
you have "the value that old versions used is usually *in*correct, but
nobody noticed so far".
Michael/Amit, as you were the ones proposing stronger new-to-old
support, can you read the thread and see if you have any ideas?
Paolo
next prev parent reply other threads:[~2011-04-01 11:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 6:22 [Qemu-devel] [PATCH V3] floppy: save and restore DIR register Jason Wang
2011-04-01 6:54 ` [Qemu-devel] " Jes Sorensen
2011-04-01 7:15 ` Paolo Bonzini
2011-04-01 10:03 ` Jason Wang
2011-04-01 11:22 ` Paolo Bonzini [this message]
2011-04-06 8:41 ` Juan Quintela
2011-04-06 9:18 ` Juan Quintela
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=4D95B58B.6060606@redhat.com \
--to=pbonzini@redhat.com \
--cc=Jes.Sorensen@redhat.com \
--cc=amit.shah@redhat.com \
--cc=jasowang@redhat.com \
--cc=kwolf@redhat.com \
--cc=mst@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).