qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, Jes.Sorensen@redhat.com,
	Jason Wang <jasowang@redhat.com>,
	qemu-devel@nongnu.org, quintela@redhat.com
Subject: [Qemu-devel] Re: [PATCH V3] floppy: save and restore DIR register
Date: Fri, 1 Apr 2011 18:03:37 +0800	[thread overview]
Message-ID: <19861.41721.462027.268384@gargle.gargle.HOWL> (raw)
In-Reply-To: <4D957B7D.3060802@redhat.com>

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.

 > (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). A better solution maybe:

1 Set default_migration_media_changed be 0 for 0.15 and 1 for elder
2 Unconditiaonlly send subsection when it was 0, and do not send subsection when
it was 1
3 Set media_changed to default_migration_media_changed in pre_load()
4 Let all pre/post to be in subsection

After those, we can make sure the migration between 0.15 could get correct
media_changed, also make sure the seamless migration between 0.15 and older
machine types.

Any suggestions?

 > > +    } else {
 > > +        drive->bs->media_changed = drive->media_changed;
 > > +        return 0;
 > > +    }
 > 
 > The code is also missing the case of a pc-0.14 machine.  The problem 
 > here is that the pc-0.15 machine hasn't been created yet, you get the 
 > honor. :(
 > 

Would create such one :)

 > Paolo

  reply	other threads:[~2011-04-01 10:03 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 [this message]
2011-04-01 11:22     ` Paolo Bonzini
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=19861.41721.462027.268384@gargle.gargle.HOWL \
    --to=jasowang@redhat.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@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).