qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: mdroth@linux.vnet.ibm.com, dgilbert@redhat.com, agraf@suse.de,
	thuth@redhat.com, lvivier@redhat.com, qemu-ppc@nongnu.org,
	qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <20161122232814.GF28479@umbus.fritz.box> (raw)
In-Reply-To: <5a09af81-9c38-db8c-119a-418e85724dda@ozlabs.ru>

[-- Attachment #1: Type: text/plain, Size: 1843 bytes --]

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 <david@gibson.dropbear.id.au>
> 
> 
> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> 
> 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-11-23  0:57 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21  5:31 [Qemu-devel] [PATCHv2 0/5] Last minute ppc migration fixes David Gibson
2016-11-21  5:31 ` [Qemu-devel] [PATCHv2 1/5] target-ppc: Fix CPU migration from qemu-2.6 <-> later versions David Gibson
2016-11-21 10:12   ` Dr. David Alan Gilbert
2016-11-21 10:41   ` Thomas Huth
2016-11-21 14:14   ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-11-22  8:19   ` [Qemu-devel] " Alexey Kardashevskiy
2016-11-22 23:28     ` David Gibson [this message]
2016-11-21  5:31 ` [Qemu-devel] [PATCHv2 2/5] migration: Add VMSTATE_UINTTL_TEST() David Gibson
2016-11-21 10:02   ` Dr. David Alan Gilbert
2016-11-21 10:43   ` Thomas Huth
2016-11-21 14:16   ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-11-21  5:31 ` [Qemu-devel] [PATCHv2 3/5] target-ppc: Allow eventual removal of old migration mistakes David Gibson
2016-11-21 10:24   ` Dr. David Alan Gilbert
2016-11-21 10:47   ` Thomas Huth
2016-11-21 15:26   ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-11-21 23:11     ` David Gibson
2016-11-22  8:32   ` [Qemu-devel] " Alexey Kardashevskiy
2016-11-21  5:31 ` [Qemu-devel] [PATCHv2 4/5] Revert "spapr: Fix migration of PCI host bridges from qemu-2.7" David Gibson
2016-11-21 10:51   ` Thomas Huth
2016-11-21 15:27   ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-11-22  8:33   ` [Qemu-devel] " Alexey Kardashevskiy
2016-11-21  5:31 ` [Qemu-devel] [PATCHv2 5/5] spapr: Fix 2.7<->2.8 migration of PCI host bridge David Gibson
2016-11-21 10:43   ` Dr. David Alan Gilbert
2016-11-21 12:02   ` Thomas Huth
2016-11-21 16:02     ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-11-21 23:15       ` David Gibson
2016-11-22  9:42         ` Greg Kurz
2016-11-22  8:17   ` [Qemu-devel] " Alexey Kardashevskiy
2016-11-23  0:17     ` David Gibson
2016-11-23  2:28       ` Alexey Kardashevskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161122232814.GF28479@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=dgilbert@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).