qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [Qemu-devel] [PATCH 04/17] target-ppc: Convert ppc cpu sa


From: David Gibson
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH 04/17] target-ppc: Convert ppc cpu savevm to VMStateDescription
Date: Wed, 10 Jul 2013 17:49:54 +1000
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jul 10, 2013 at 01:31:24PM +1000, Benjamin Herrenschmidt wrote:
> 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.

Hmm.. good point.  I mean that I did some sample migrates and they
worked.  But that was probably full-emu and/or the same source and
dest machine.  So above should be rephrased as "at least one case"
works, which is more than previously.

But yes the timebase handling needs to be sorted out.

-- 
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: pgpcZl1yZMk0b.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]