On 21 May 2013 18:26, mdroth <mdr...@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.

thanks
-- PMM

Reply via email to