qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] vmstate: struct (VMS_STRUCT) migration


From: Amit Shah
Subject: Re: [Qemu-devel] vmstate: struct (VMS_STRUCT) migration
Date: Thu, 3 Jul 2014 13:52:15 +0530

On (Wed) 25 Jun 2014 [16:36:59], Alexey Kardashevskiy wrote:
> Hi!
> 
> VMStateDescription supports enclosed VMStateDescription's via .vmsd. This
> is used in multiple places and VMStateDescription definitions look the same
> way - name, version_id, minimum_version_id, etc.
> 
> QEMU handles first level VMStateDescription and enclosed VMStateDescription
> slightly different - for the latter it ignores the version_id from the
> source and always uses the version_id on the destination side so version
> fields are useless (code is below).
> 
> Is that by design? Or a bug? I cannot see how we could fix it without
> breaking backward compatibility but I am sure the community does know that :)
> 
> If this is by design, it probably makes sense to remove unused
> version_id/minimum_version_id fields completely for vmsd's which we know
> are enclosed (or embedded?).
> 
> What do I miss here? Thanks!

No, you're not missing anything.  It's indeed a bug that crept in the
original implementation.

We discussed this detail during the KVM Forum 2013; and since we
anyway do need a new on-wire format, the one that will fix all bugs
(TM), this will be taken care of too...

You can see the slides / videos from mine and Alex Graf's
presentations.

The recommendation, for now, is to bump up the version field of the
parent vmsd when updating a substruct.  But obviously, this can be
easily missed.  The static checker just merged in the qemu tree does
catch these types of errors.

In the meanwhile, what you propose does make sense: getting rid of the
version_id and minimum_version_id fields in substructs.

                Amit



reply via email to

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