qemu-devel
[Top][All Lists]
Advanced

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

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


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH V3] floppy: save and restore DIR register
Date: Fri, 01 Apr 2011 13:22:51 +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/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



reply via email to

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