From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9Lso-0007B9-FR for qemu-devel@nongnu.org; Tue, 22 Nov 2016 19:57:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9Lsn-0008TX-FI for qemu-devel@nongnu.org; Tue, 22 Nov 2016 19:57:54 -0500 Date: Wed, 23 Nov 2016 10:28:14 +1100 From: David Gibson Message-ID: <20161122232814.GF28479@umbus.fritz.box> References: <1479706302-2251-1-git-send-email-david@gibson.dropbear.id.au> <1479706302-2251-2-git-send-email-david@gibson.dropbear.id.au> <5a09af81-9c38-db8c-119a-418e85724dda@ozlabs.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TeJTyD9hb8KJN2Jy" Content-Disposition: inline In-Reply-To: <5a09af81-9c38-db8c-119a-418e85724dda@ozlabs.ru> Subject: Re: [Qemu-devel] [PATCHv2 1/5] target-ppc: Fix CPU migration from qemu-2.6 <-> later versions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy 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 --TeJTyD9hb8KJN2Jy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > >=20 > > 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. > >=20 > > Signed-off-by: David Gibson >=20 >=20 > Reviewed-by: Alexey Kardashevskiy >=20 > 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. --=20 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 --TeJTyD9hb8KJN2Jy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYNNSIAAoJEGw4ysog2bOSNd8P/A1eHzRESL+zT/kZZIR8uxVi X9WDgDItMkv4JrC/Q8cYuuWzrfKS/odldVXIrMNmmEKUMVIfFHpcatnyYvVsTIAB wzchCx9qO0U49HnXOnlbmYlpwStuPSEnVb2f8CgkNsHW8+831Fm6qLMIyRPrCUTM ReQotYgoOz57lUt0upR3HQN5nuJqV7Whvj5gvdCJPXHse48B2Uf16+/6Z2FYhi5r eaYf3uDGKMRbxc5IixtbamMPcK4VVHnmgpSy7c9FopDgFOtJSBBKLDA4TrjhE0ae rHUGwk7HThu1HtfuUFOM++/stLTAUUiaUy1F+83SO7phIeZrzSWZnY3XBZCzLVtH tFZt7x07yqLYrWctZ2o3Yy6G85ItngwgwT6IIvUgJwwMDXUqNuy+jReoMtmt4+gB 0VtUBbcvEHfzmiokPTmcasRprmX88hvFmPjQTi7WLEMM89qBlbnG8CTIavPFX7Kv W60xD5lFhQv2SPaYizYOHjsxwa1A9CteDaRi3fkDRQ9h/Vob+wD+7uiMwCX6gttF Wn29wZkdpHseYqQqYRtyy2yhougeL5VrAjMtW+FHfa2+XtUllMfeyf/yHW4vfIxE 3xSl8rrNRvhomFUBcnFfBb0VQeGvkoWYxyH6rag8pG0EOLuRoh8gmAmKLinoaR6h XVj/WJ/kraiuyYRLpwQi =wYwL -----END PGP SIGNATURE----- --TeJTyD9hb8KJN2Jy--