On Wed, 2013-07-10 at 01:11 +1000, David Gibson wrote: > 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.
DCRs are also not in the core, they are in the fabric (ie, global chip things) anyway. > 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. What do you mean by the "common case" ? The common case of KVM does not work afaik. The timebase *will* appear to go backward if the target machine was booted after the source machine today which is likely to crash the kernel. The timebase context switching must be implemented asap. We've discussed it a few times here and we know how to do it, it's just not done yet. Cheers, Ben.