qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH 11/11] test-vmstate: add test case to verify


From: Peter Maydell
Subject: Re: [Qemu-devel] Re: [PATCH 11/11] test-vmstate: add test case to verify we don't change VMState
Date: Wed, 23 Mar 2011 16:45:53 +0000

On 23 March 2011 16:27, Anthony Liguori <address@hidden> wrote:
> Migration uses the VMStateDescription name as a section identifier.  The
> section identifiers MUST be unique for a given device.  Otherwise, if both
> devices are present, migration fails miserably.

So how does it work if you have two devices of the same type
in the system? I'd assumed that the unique identifier would
be one based on the actually instantiated devices.

> It also means that if the
> wrong devices are created on the destination, instead of predictable
> failure, you get unpredictable guest corruption.
>
> The Right Way to support what you're describing above is to have a single
> VMStateField array and two VMStateDescriptions.  IOW:

This doesn't make sense because it's decoupling the information
about minimum version ID etc (in the VMStateDescription) from
the information about which fields are in which version (which
is in the VMStateField array when it's initialised via
VMSTATE_*_V() macros). So although you get to avoid duplicating
all the fields in the arrangement you suggest you still end
up with version_id, minimum_version_id etc being duplicated
and needing to stay in sync.

-- PMM



reply via email to

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