qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCHv2 1/5] target-ppc: Fix CPU migration from qemu-2


From: David Gibson
Subject: Re: [Qemu-devel] [PATCHv2 1/5] target-ppc: Fix CPU migration from qemu-2.6 <-> later versions
Date: Wed, 23 Nov 2016 10:28:14 +1100
User-agent: Mutt/1.7.1 (2016-10-04)

On Tue, Nov 22, 2016 at 07:19:38PM +1100, Alexey Kardashevskiy wrote:
> On 21/11/16 16:31, David Gibson wrote:
> > When migration for target-ppc was converted to vmstate, several
> > VMSTATE_EQUAL() checks were foolishly included of things that really
> > should be internal state.  Specifically we verified equality of the
> > insns_flags and insns_flags2 fields, which are used within TCG to
> > determine which groups of instructions are available on this cpu
> > model.  Between qemu-2.6 and qemu-2.7 we made some changes to these
> > classes which broke migration.
> > 
> > This path fixes migration both forwards and backwards.  On migration
> > from 2.6 to later versions we import the fields into teporary
> > variables, which we then ignore.  In migration backwards, we populate
> > the temporary fields from the runtime fields, but mask out the bits
> > which were added after qemu-2.6, allowing the VMSTATE_EQUAL in
> > qemu-2.6 to accept the stream.
> > 
> > Signed-off-by: David Gibson <address@hidden>
> 
> 
> Reviewed-by: Alexey Kardashevskiy <address@hidden>
> 
> One question though - do we care about TCG migration at all? If so, we
> could want to migrate these bits, just not with _EQUAL but rather check
> that the source does not have bits which are not supported by the
> destination.

Yes, we do care about TCG migration, but the conclusion doesn't
follow.  insns_flags is a qemu internal representation, not anything
architected, and it never changes during runtime.  We should be free
to change that representation, and as long as the CPUs are compatible
it should still work.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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