On Tue, Jul 09, 2013 at 09:08:01AM -0500, Anthony Liguori wrote: > Alexey Kardashevskiy <a...@ozlabs.ru> writes: > > On 07/09/2013 04:29 AM, Anthony Liguori wrote: > >> Alexey Kardashevskiy <a...@ozlabs.ru> writes: [snip] > >>> +#endif /* TARGET_PPC64 */ > >>> + .vmsd = &vmstate_tlb6xx, > >>> + .needed = tlb6xx_needed, > >>> + } , { > >>> + .vmsd = &vmstate_tlbemb, > >>> + .needed = tlbemb_needed, > >>> + } , { > >>> + .vmsd = &vmstate_tlbmas, > >>> + .needed = tlbmas_needed, > >>> + } , { > >>> + /* FIXME: DCRs? */ > >>> + /* FIXME: timebase? */ > >>> + /* empty */ > >> > >> 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 should > > not prevent the rest of the patch to go upstream. > > So migration doesn't work? > > 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. -- 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
pgpFmGzxALKE8.pgp
Description: PGP signature