Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-13 Thread Alexander Graf
On 13.09.2013, at 00:20, David Gibson wrote: On Mon, Sep 09, 2013 at 08:06:53AM +0200, Alexander Graf wrote: Am 09.09.2013 um 07:58 schrieb Alexey Kardashevskiy a...@ozlabs.ru: On 09/09/2013 03:50 PM, Alexander Graf wrote: Am 09.09.2013 um 04:40 schrieb Alexey Kardashevskiy

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-12 Thread David Gibson
On Mon, Sep 09, 2013 at 08:06:53AM +0200, Alexander Graf wrote: Am 09.09.2013 um 07:58 schrieb Alexey Kardashevskiy a...@ozlabs.ru: On 09/09/2013 03:50 PM, Alexander Graf wrote: Am 09.09.2013 um 04:40 schrieb Alexey Kardashevskiy a...@ozlabs.ru: On 09/06/2013 01:11 AM,

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-09 Thread Alexey Kardashevskiy
On 09/09/2013 03:50 PM, Alexander Graf wrote: Am 09.09.2013 um 04:40 schrieb Alexey Kardashevskiy a...@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

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-09 Thread Alexander Graf
Am 09.09.2013 um 07:58 schrieb Alexey Kardashevskiy a...@ozlabs.ru: On 09/09/2013 03:50 PM, Alexander Graf wrote: Am 09.09.2013 um 04:40 schrieb Alexey Kardashevskiy a...@ozlabs.ru: On 09/06/2013 01:11 AM, Alexander Graf wrote: On 05.09.2013, at 16:26, Benjamin Herrenschmidt wrote:

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-09 Thread Alexander Graf
On 09.09.2013, at 11:29, Benjamin Herrenschmidt wrote: On Mon, 2013-09-09 at 08:06 +0200, Alexander Graf wrote: 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

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-09 Thread Benjamin Herrenschmidt
On Mon, 2013-09-09 at 08:06 +0200, Alexander Graf wrote: 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

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-09 Thread Benjamin Herrenschmidt
On Mon, 2013-09-09 at 11:32 +0200, Alexander Graf wrote: On 09.09.2013, at 11:29, Benjamin Herrenschmidt wrote: On Mon, 2013-09-09 at 08:06 +0200, Alexander Graf wrote: I think it's ok to restrict live migration to machines with the same tb frequency when kvm is enabled. Whether you

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-09 Thread Alexander Graf
On 09.09.2013, at 11:38, Benjamin Herrenschmidt wrote: On Mon, 2013-09-09 at 11:32 +0200, Alexander Graf wrote: On 09.09.2013, at 11:29, Benjamin Herrenschmidt wrote: On Mon, 2013-09-09 at 08:06 +0200, Alexander Graf wrote: I think it's ok to restrict live migration to machines with the

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-08 Thread Alexey Kardashevskiy
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

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-08 Thread Alexander Graf
Am 09.09.2013 um 04:40 schrieb Alexey Kardashevskiy a...@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

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Alexander Graf
On 05.09.2013, at 06:54, Alexey Kardashevskiy wrote: On 09/05/2013 02:30 PM, David Gibson wrote: On Tue, Sep 03, 2013 at 05:31:42PM +1000, Alexey Kardashevskiy wrote: This allows guests to have a different timebase origin from the host. This is needed for migration, where a guest can

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Alexey Kardashevskiy
On 09/05/2013 07:16 PM, Alexander Graf wrote: On 05.09.2013, at 06:54, Alexey Kardashevskiy wrote: On 09/05/2013 02:30 PM, David Gibson wrote: On Tue, Sep 03, 2013 at 05:31:42PM +1000, Alexey Kardashevskiy wrote: This allows guests to have a different timebase origin from the host. This

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Alexander Graf
On 05.09.2013, at 11:48, Alexey Kardashevskiy wrote: On 09/05/2013 07:16 PM, Alexander Graf wrote: On 05.09.2013, at 06:54, Alexey Kardashevskiy wrote: On 09/05/2013 02:30 PM, David Gibson wrote: [...] #endif /* TARGET_PPC64 */ } @@ -1082,6 +1102,9 @@ int

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Benjamin Herrenschmidt
On Thu, 2013-09-05 at 19:48 +1000, Alexey Kardashevskiy wrote: I do not have pure guest timebase in QEMU and I need it on the destination. But I have host timebase + offset to calculate it. And tb_offset is already in ppc_tb_t. It looked logical to me to send the existing field and add

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Alexey Kardashevskiy
On 09/05/2013 09:42 PM, Benjamin Herrenschmidt wrote: On Thu, 2013-09-05 at 19:48 +1000, Alexey Kardashevskiy wrote: I do not have pure guest timebase in QEMU and I need it on the destination. But I have host timebase + offset to calculate it. And tb_offset is already in ppc_tb_t. It looked

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Alexander Graf
On 05.09.2013, at 13:44, Benjamin Herrenschmidt wrote: On Thu, 2013-09-05 at 11:58 +0200, Alexander Graf wrote: Yes. I do not really understand the problem here (and I am not playing dump). Do you suggest sending just the guest timebase and do not send the host timebase and the offset

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Benjamin Herrenschmidt
On Thu, 2013-09-05 at 11:58 +0200, Alexander Graf wrote: Yes. I do not really understand the problem here (and I am not playing dump). Do you suggest sending just the guest timebase and do not send the host timebase and the offset (one number instead of two)? I can do that, makes

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Benjamin Herrenschmidt
On Thu, 2013-09-05 at 14:37 +0200, Alexander Graf wrote: Hrm, I think I'm starting to understand what this is about. So what we want is - timebase in guest - timebase frequency in guest - wall clock time in host That way the receiving end can then take the timebase and add

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Alexander Graf
On 05.09.2013, at 15:36, Benjamin Herrenschmidt wrote: On Thu, 2013-09-05 at 14:37 +0200, Alexander Graf wrote: Hrm, I think I'm starting to understand what this is about. So what we want is - timebase in guest - timebase frequency in guest - wall clock time in host That way the

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Benjamin Herrenschmidt
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

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Andreas Färber
Am 05.09.2013 15:39, schrieb Alexander Graf: On 05.09.2013, at 15:36, Benjamin Herrenschmidt wrote: On Thu, 2013-09-05 at 14:37 +0200, Alexander Graf wrote: Hrm, I think I'm starting to understand what this is about. So what we want is - timebase in guest - timebase frequency in

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread Alexander Graf
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

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-05 Thread David Gibson
On Thu, Sep 05, 2013 at 02:54:46PM +1000, Alexey Kardashevskiy wrote: On 09/05/2013 02:30 PM, David Gibson wrote: On Tue, Sep 03, 2013 at 05:31:42PM +1000, Alexey Kardashevskiy wrote: This allows guests to have a different timebase origin from the host. This is needed for migration, where

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-04 Thread David Gibson
On Tue, Sep 03, 2013 at 05:31:42PM +1000, Alexey Kardashevskiy wrote: This allows guests to have a different timebase origin from the host. This is needed for migration, where a guest can migrate from one host to another and the two hosts might have a different timebase origin. However, the

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-04 Thread Alexey Kardashevskiy
On 09/05/2013 02:30 PM, David Gibson wrote: On Tue, Sep 03, 2013 at 05:31:42PM +1000, Alexey Kardashevskiy wrote: This allows guests to have a different timebase origin from the host. This is needed for migration, where a guest can migrate from one host to another and the two hosts might have

[Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-03 Thread Alexey Kardashevskiy
This allows guests to have a different timebase origin from the host. This is needed for migration, where a guest can migrate from one host to another and the two hosts might have a different timebase origin. However, the timebase seen by the guest must not go backwards, and should go forwards

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-03 Thread Andreas Färber
Am 03.09.2013 09:31, schrieb Alexey Kardashevskiy: This allows guests to have a different timebase origin from the host. This is needed for migration, where a guest can migrate from one host to another and the two hosts might have a different timebase origin. However, the timebase seen by

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-03 Thread Alexey Kardashevskiy
On 09/03/2013 06:42 PM, Andreas Färber wrote: Am 03.09.2013 09:31, schrieb Alexey Kardashevskiy: This allows guests to have a different timebase origin from the host. This is needed for migration, where a guest can migrate from one host to another and the two hosts might have a different

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-03 Thread Andreas Färber
Am 03.09.2013 11:07, schrieb Alexey Kardashevskiy: On 09/03/2013 06:42 PM, Andreas Färber wrote: Am 03.09.2013 09:31, schrieb Alexey Kardashevskiy: diff --git a/target-ppc/machine.c b/target-ppc/machine.c index 12e1512..d1ffc7f 100644 --- a/target-ppc/machine.c +++ b/target-ppc/machine.c

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-03 Thread Alexey Kardashevskiy
On 09/03/2013 07:22 PM, Andreas Färber wrote: Am 03.09.2013 11:07, schrieb Alexey Kardashevskiy: On 09/03/2013 06:42 PM, Andreas Färber wrote: Am 03.09.2013 09:31, schrieb Alexey Kardashevskiy: diff --git a/target-ppc/machine.c b/target-ppc/machine.c index 12e1512..d1ffc7f 100644 ---

Re: [Qemu-devel] [RFC PATCH] spapr: support time base offset migration

2013-09-03 Thread Alexander Graf
On 04.09.2013, at 03:13, Alexey Kardashevskiy wrote: On 09/03/2013 07:22 PM, Andreas Färber wrote: Am 03.09.2013 11:07, schrieb Alexey Kardashevskiy: On 09/03/2013 06:42 PM, Andreas Färber wrote: Am 03.09.2013 09:31, schrieb Alexey Kardashevskiy: diff --git a/target-ppc/machine.c