Re: [Qemu-devel] [PATCH v2] kvmclock: Ensure time in migration never goes backward

2014-07-15 Thread Paolo Bonzini
Il 16/05/2014 17:15, Alexander Graf ha scritto: When we migrate we ask the kernel about its current belief on what the guest time would be. However, I've seen cases where the kvmclock guest structure indicates a time more recent than the kvm returned time. To make sure we never go backwards, cal

Re: [Qemu-devel] [PATCH v2] kvmclock: Ensure time in migration never goes backward

2014-06-03 Thread Paolo Bonzini
Il 03/06/2014 07:16, Marcelo Tosatti ha scritto: On Mon, Jun 02, 2014 at 10:31:44PM +0200, Marcin Gibuła wrote: +cpu_physical_memory_read(kvmclock_struct_pa, &time, sizeof(time)); + +delta = migration_tsc - time.tsc_timestamp; Hi, when I was testing live storage migration with libvirt

Re: [Qemu-devel] [PATCH v2] kvmclock: Ensure time in migration never goes backward

2014-06-03 Thread Marcin Gibuła
Can you give this patch a try? Should read the guest TSC values after stopping the VM. Yes, this patch fixes that. Thanks, -- mg

Re: [Qemu-devel] [PATCH v2] kvmclock: Ensure time in migration never goes backward

2014-06-02 Thread Marcelo Tosatti
On Mon, Jun 02, 2014 at 10:31:44PM +0200, Marcin Gibuła wrote: > >+cpu_physical_memory_read(kvmclock_struct_pa, &time, sizeof(time)); > >+ > >+delta = migration_tsc - time.tsc_timestamp; > > Hi, > > when I was testing live storage migration with libvirt I found out > that this patch can c

Re: [Qemu-devel] [PATCH v2] kvmclock: Ensure time in migration never goes backward

2014-06-02 Thread Marcin Gibuła
+cpu_physical_memory_read(kvmclock_struct_pa, &time, sizeof(time)); + +delta = migration_tsc - time.tsc_timestamp; Hi, when I was testing live storage migration with libvirt I found out that this patch can cause virtual machine to hang when completing mirror job. This is (probably) b

Re: [Qemu-devel] [PATCH v2] kvmclock: Ensure time in migration never goes backward

2014-05-21 Thread Alexander Graf
On 19.05.14 13:31, Paolo Bonzini wrote: Il 18/05/2014 15:20, Marcelo Tosatti ha scritto: Reviewed-by: Marcelo Tosatti Thanks Marcelo, applying to uq/master. Same here, please also CC to stable :). Alex

Re: [Qemu-devel] [PATCH v2] kvmclock: Ensure time in migration never goes backward

2014-05-19 Thread Paolo Bonzini
Il 18/05/2014 15:20, Marcelo Tosatti ha scritto: Reviewed-by: Marcelo Tosatti Thanks Marcelo, applying to uq/master. Paolo

Re: [Qemu-devel] [PATCH v2] kvmclock: Ensure time in migration never goes backward

2014-05-18 Thread Marcelo Tosatti
On Fri, May 16, 2014 at 05:15:21PM +0200, Alexander Graf wrote: > When we migrate we ask the kernel about its current belief on what the guest > time would be. However, I've seen cases where the kvmclock guest structure > indicates a time more recent than the kvm returned time. > > To make sure we

[Qemu-devel] [PATCH v2] kvmclock: Ensure time in migration never goes backward

2014-05-16 Thread Alexander Graf
When we migrate we ask the kernel about its current belief on what the guest time would be. However, I've seen cases where the kvmclock guest structure indicates a time more recent than the kvm returned time. To make sure we never go backwards, calculate what the guest would have seen as time at t