qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Alexander Graf <agraf@suse.de>
Cc: "Alexey Kardashevskiy" <aik@ozlabs.ru>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Paul Mackerras" <paulus@samba.org>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration
Date: Fri, 13 Sep 2013 15:20:39 +1000	[thread overview]
Message-ID: <20130913052039.GB28840@voom.redhat.com> (raw)
In-Reply-To: <7B3E1C54-B3E4-4E86-ACC0-2824199BA154@suse.de>

[-- Attachment #1: Type: text/plain, Size: 3413 bytes --]

On Mon, Sep 09, 2013 at 08:06:53AM +0200, Alexander Graf wrote:
> 
> 
> Am 09.09.2013 um 07:58 schrieb Alexey Kardashevskiy <aik@ozlabs.ru>:
> 
> > On 09/09/2013 03:50 PM, Alexander Graf wrote:
> >> 
> >> 
> >> Am 09.09.2013 um 04:40 schrieb Alexey Kardashevskiy <aik@ozlabs.ru>:
> >> 
> >>> On 09/06/2013 01:11 AM, Alexander Graf wrote:
> >>>> 
> >>>> On 05.09.2013, at 16:26, Benjamin Herrenschmidt wrote:
> >>>> 
> >>>>> On Thu, 2013-09-05 at 16:14 +0200, Andreas Färber wrote:
> >>>>> 
> >>>>>> Are you thinking of POWER8 having a different frequency than POWER8 in
> >>>>>> compat mode? Because migration from one -cpu to another is not supported
> >>>>>> elsewhere.
> >>>>>> 
> >>>>>> Even if we want to migrate from one POWER7 revision to another, we
> >>>>>> should let the destination use the revision of the source (guest ABI!),
> >>>>>> via property if need be. Anything else will lead to confusion as to what
> >>>>>> is supported and what is not. That -cpu host is the default for
> >>>>>> convenience shouldn't relieve admins/libvirt to think about sensible
> >>>>>> setups like they have to on x86.
> >>>>> 
> >>>>> Besides POWER8 uses 512Mhz too :-) It's been architected so it's
> >>>>> unlikely to change from now on.
> >>>> 
> >>>> Ok, ditch the tb frequency then. We can always default to 512Mhz when it's absent.
> >>> 
> >>> 
> >>> QEMU uses what kvmppc_get_tbfreq() returns. And ppc_tb_t carries this
> >>> value. It does not use 512MHz automatically but migration should always
> >>> assume 512MHz :-/
> >>> 
> >>> If we remove it, I would like to add assert(tb_freq!=512MHz) into
> >>> timebase_pre_save() and timebase_post_load(), is that ok?
> >> 
> >> Good point. This would break TCG migration, right?
> > 
> > 
> > In TCG we do not need any timebase offset at all, the time should migrate
> > as is, no? :)
> 
> I hope so, but we need to make sure we don't assert() in that case :).

Hrm.. that doesn't sound right.  Whether you have KVM or TCG, what you
need in the migration stream is enough data points that you can deduce
the guest timebase from the host real time.  On KVM that translates
into a diff between guest and host timebase, but on TCG you'll need to
implement that differently

> > 
> > It could break something like power5 migration under PR KVM, do not know...
> 
> Well, today we don't support full migration with PR KVM yet - IIRC we don't have access to all state. But that may change in the future.
> 
> I think it's ok to restrict live migration to machines with the same
> tb frequency when kvm is enabled. Whether you implement it through a
> hardcoded 512Mhz or through a timebase value that gets live migrated
> and then compared is up to you - both ways work for me :).

I don't think it's possible to allow KVM migration between hosts of
different tb frequency.  But I think encoding the frequency in the
stream and verifying it is a better option.  It might be useful for
migration on 970, and it might be useful for TCG migration and it
might be useful for TCG<->KVM migration. (For a TCG migration
destination you *can* potentially set the tb frequency according to
what you're told).

-- 
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 #2: Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2013-09-13  5:29 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03  7:31 [Qemu-devel] [RFC PATCH] spapr: support time base offset migration Alexey Kardashevskiy
2013-09-03  8:42 ` Andreas Färber
2013-09-03  9:07   ` Alexey Kardashevskiy
2013-09-03  9:22     ` Andreas Färber
2013-09-04  1:13       ` Alexey Kardashevskiy
2013-09-04  1:27         ` Alexander Graf
2013-09-05  4:30 ` David Gibson
2013-09-05  4:54   ` Alexey Kardashevskiy
2013-09-05  9:16     ` Alexander Graf
2013-09-05  9:48       ` Alexey Kardashevskiy
2013-09-05  9:58         ` Alexander Graf
2013-09-05 11:44           ` Benjamin Herrenschmidt
2013-09-05 12:37             ` Alexander Graf
2013-09-05 13:36               ` Benjamin Herrenschmidt
2013-09-05 13:39                 ` Alexander Graf
2013-09-05 14:14                   ` Andreas Färber
2013-09-05 14:26                     ` Benjamin Herrenschmidt
2013-09-05 15:11                       ` Alexander Graf
2013-09-09  2:40                         ` Alexey Kardashevskiy
2013-09-09  5:50                           ` Alexander Graf
2013-09-09  5:58                             ` Alexey Kardashevskiy
2013-09-09  6:06                               ` Alexander Graf
2013-09-09  9:29                                 ` Benjamin Herrenschmidt
2013-09-09  9:32                                   ` Alexander Graf
2013-09-09  9:38                                     ` Benjamin Herrenschmidt
2013-09-09  9:41                                       ` Alexander Graf
2013-09-13  5:20                                 ` David Gibson [this message]
2013-09-13 18:06                                   ` Alexander Graf
2013-09-05 11:42         ` Benjamin Herrenschmidt
2013-09-05 12:09           ` Alexey Kardashevskiy
2013-09-06  3:00     ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130913052039.GB28840@voom.redhat.com \
    --to=david@gibson.dropbear.id.au \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=paulus@samba.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).