From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UetQz-0004PQ-VO for qemu-devel@nongnu.org; Tue, 21 May 2013 16:45:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UetQv-0007g4-9v for qemu-devel@nongnu.org; Tue, 21 May 2013 16:45:25 -0400 Received: from mail-ob0-x233.google.com ([2607:f8b0:4003:c01::233]:62458) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UetQv-0007fv-4Z for qemu-devel@nongnu.org; Tue, 21 May 2013 16:45:21 -0400 Received: by mail-ob0-f179.google.com with SMTP id ta14so145235obb.24 for ; Tue, 21 May 2013 13:45:20 -0700 (PDT) Sender: fluxion Date: Tue, 21 May 2013 15:43:38 -0500 From: mdroth Message-ID: <20130521204338.GG2441@vm> References: <1369136018.15129.1538.camel@eboracum.office.bytemark.co.uk> <20130521165556.GA13602@vm> <20130521172608.GB13602@vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] (Another) 1.4.1 -> 1.5.0 migration failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Juan Quintela , qemu-devel@nongnu.org, Nicholas Thomas On Tue, May 21, 2013 at 06:50:23PM +0100, Peter Maydell wrote: > On 21 May 2013 18:26, mdroth 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 >