All of lore.kernel.org
 help / color / mirror / Atom feed
From: mdroth <mdroth@linux.vnet.ibm.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Juan Quintela <quintela@redhat.com>,
	qemu-devel@nongnu.org, Nicholas Thomas <nick@bytemark.co.uk>
Subject: Re: [Qemu-devel] (Another) 1.4.1 -> 1.5.0 migration failure
Date: Tue, 21 May 2013 15:43:38 -0500	[thread overview]
Message-ID: <20130521204338.GG2441@vm> (raw)
In-Reply-To: <CAFEAcA9fG3vANr2T2EwspUH5dypBKgo7ox=YiAYOwjpJchMptg@mail.gmail.com>

On Tue, May 21, 2013 at 06:50:23PM +0100, Peter Maydell wrote:
> On 21 May 2013 18:26, mdroth <mdroth@linux.vnet.ibm.com> wrote:
> > static const VMStateDescription vmstate_i6300esb = {
> >     .name = "i6300esb_wdt",
> >     .version_id = sizeof(I6300State),
> >     .minimum_version_id = sizeof(I6300State),
> >     .minimum_version_id_old = sizeof(I6300State),
> 
> > apparently minimum version ID is set the size of the device struct?
> >
> > Almost certain that's the problem.
> 
> Haha, yeah, that's totally busted. Interestingly it's been
> like that since 2009. I think to fix this we probably need to:
>  * set version_id to something fixed but larger than
>    the worst sizeof() has ever been for this device.
>    Since we have plenty of space in an int we might as
>    well set it to 10000.
>  * set minimum_version_id and minimum_version_id_old to 1
>    [this is safe, I think, since the fields haven't ever
>    changed, but needs testing]
>  * add a big fat comment about why the weird version ID
> 
> This then brings it into line with everything else, and
> the standard rules about when to bump vmstate version
> and marking up new fields with first-version-present and
> so on all apply as usual.

Makes sense, but apparently version IDs for incoming device state are
not allowed to exceed the destination's version, so we can't bump it
beyond the value in 1.5 without breaking migration from 1.5+ -> 1.5

So I think our only option for version ID is to lock in the 1.5 value,
which seems to be 1936 (hopefully that's consistent across builds...).

But reseting minimum version ID to 1 does seem to fix 1.4 -> 1.5+

> 
> thanks
> -- PMM
> 

  reply	other threads:[~2013-05-21 20:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21 11:33 [Qemu-devel] (Another) 1.4.1 -> 1.5.0 migration failure Nicholas Thomas
2013-05-21 11:55 ` Andreas Färber
2013-05-21 12:20   ` Nicholas Thomas
2013-05-21 16:55 ` mdroth
2013-05-21 17:26   ` mdroth
2013-05-21 17:50     ` Peter Maydell
2013-05-21 20:43       ` mdroth [this message]
2013-05-21 21:16         ` Peter Maydell
2013-05-21 22:07           ` mdroth

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=20130521204338.GG2441@vm \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=nick@bytemark.co.uk \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.