From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwZZj-0008Sd-0t for qemu-devel@nongnu.org; Tue, 09 Jul 2013 11:11:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwZZb-0004uR-4u for qemu-devel@nongnu.org; Tue, 09 Jul 2013 11:11:30 -0400 Date: Wed, 10 Jul 2013 01:11:20 +1000 From: David Gibson Message-ID: <20130709151120.GM2696@voom.redhat.com> References: <1372315560-5478-1-git-send-email-aik@ozlabs.ru> <1372315560-5478-5-git-send-email-aik@ozlabs.ru> <874nc429d1.fsf@codemonkey.ws> <51DB9C4B.6080106@ozlabs.ru> <87r4f74yim.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rf72Gf+bfLC8kxKs" Content-Disposition: inline In-Reply-To: <87r4f74yim.fsf@codemonkey.ws> Subject: Re: [Qemu-devel] [PATCH 04/17] target-ppc: Convert ppc cpu savevm to VMStateDescription List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Alexey Kardashevskiy , qemu-devel@nongnu.org, Alexander Graf , qemu-ppc@nongnu.org, Paolo Bonzini , Paul Mackerras --rf72Gf+bfLC8kxKs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 09, 2013 at 09:08:01AM -0500, Anthony Liguori wrote: > Alexey Kardashevskiy writes: > > On 07/09/2013 04:29 AM, Anthony Liguori wrote: > >> Alexey Kardashevskiy writes: [snip] > >>> +#endif /* TARGET_PPC64 */ > >>> + .vmsd =3D &vmstate_tlb6xx, > >>> + .needed =3D tlb6xx_needed, > >>> + } , { > >>> + .vmsd =3D &vmstate_tlbemb, > >>> + .needed =3D tlbemb_needed, > >>> + } , { > >>> + .vmsd =3D &vmstate_tlbmas, > >>> + .needed =3D tlbmas_needed, > >>> + } , { > >>> + /* FIXME: DCRs? */ > >>> + /* FIXME: timebase? */ > >>> + /* empty */ > >>=20 > >> Are they needed or not needed? > > > > DCR is not needed, I'll remove it. More precisely, DCRs are only needed on the BookE CPUs which have them. They can be added later without breaking compatibility, and would be best added by someone working on the BookE stuff who can test it properly. > > Timebase is needed but it requires kernel support and either way it sho= uld > > not prevent the rest of the patch to go upstream. >=20 > So migration doesn't work? >=20 > If you need timebase, what happens without it? Migration will (in fact, does) work without anything extra for the timebase. What's less clear is if all the timing edge cases are correct at present. As a rule, the guest should see the timebase advance across the migration according to the elapsed wall clock time. But the guest *must not* see the timebase go backwards, even if the source and destination host clocks are out of sync in such a way that time appears to go backwards across the migration. Under TCG, the guest timebase is not tracked as it advances, but an appropriate value is computed from the host system time when the timebase is read. Under KVM, the host and guest timebase are the same register physically. We don't yet, but we probably should, context switch the upper bits of the timebase, to give the guest its own logical value for it. Getting all the combinations of cases corrects probably needs some sort of real time <-> guest timebase delta transferred across the migration, but working out exactly what's needed and how to encode it is a bit fiddly. Since the common cases work already, and it's fairly straightforward to add whatever delta is needed in a backwards compatible way. It seems reasonable, therefore to get migration mostly working, even with some known bugs in timing edge cases. --=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 --rf72Gf+bfLC8kxKs Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iEYEARECAAYFAlHcKBgACgkQaILKxv3ab8Z5VACeK5a1PmD565uKy4YL2vIVFZ0N +0MAnAjbpMkw1kucXp4H4lunPAtdT/Io =Lh/6 -----END PGP SIGNATURE----- --rf72Gf+bfLC8kxKs--