Re: [Qemu-devel] [PATCH uq/master] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 23:05, Andrey Korolyov ha scritto: On Wed, Jul 16, 2014 at 12:43 AM, Paolo Bonzini wrote: Il 15/07/2014 22:34, Marcelo Tosatti ha scritto: The backtrace in the following message is for a different problem, correct? http://www.mail-archive.com/qemu-devel@nongnu.org/msg246161.htm

Re: [Qemu-devel] [PATCH uq/master] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation

2014-07-15 Thread Andrey Korolyov
On Wed, Jul 16, 2014 at 12:43 AM, Paolo Bonzini wrote: > Il 15/07/2014 22:34, Marcelo Tosatti ha scritto: > >> The backtrace in the following message is for a different problem, >> correct? >> >> http://www.mail-archive.com/qemu-devel@nongnu.org/msg246161.html >> >> >> > > Correct. > > Paolo Sorr

Re: [Qemu-devel] [PATCH uq/master] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 22:34, Marcelo Tosatti ha scritto: The backtrace in the following message is for a different problem, correct? http://www.mail-archive.com/qemu-devel@nongnu.org/msg246161.html Correct. Paolo

Re: [Qemu-devel] [PATCH uq/master] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 22:31, Marcelo Tosatti ha scritto: > This patch (or some form of updating env->tsc, see changelog) > is necessary. Yes, I was going to revert Alex's too. > I was just about to reproduce it. > > Andrey, can you please provide the qemu command line ? > > Can you attempt to start VM

Re: [Qemu-devel] [PATCH uq/master] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation

2014-07-15 Thread Marcelo Tosatti
On Tue, Jul 15, 2014 at 05:31:22PM -0300, Marcelo Tosatti wrote: > On Tue, Jul 15, 2014 at 10:15:14PM +0200, Paolo Bonzini wrote: > > Il 15/07/2014 22:03, Marcin Gibuła ha scritto: > > >>This causes a hang during migration, so I'll revert the patch from 2.1. > > > > > >For me this patch series fixe

Re: [Qemu-devel] [PATCH uq/master] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation

2014-07-15 Thread Marcelo Tosatti
On Tue, Jul 15, 2014 at 10:15:14PM +0200, Paolo Bonzini wrote: > Il 15/07/2014 22:03, Marcin Gibuła ha scritto: > >>This causes a hang during migration, so I'll revert the patch from 2.1. > > > >For me this patch series fixed all hangs I had with migration (at least > >with qemu 2.0). > > Unfortun

Re: [Qemu-devel] [PATCH uq/master] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation

2014-07-15 Thread Paolo Bonzini
Il 15/07/2014 22:03, Marcin Gibuła ha scritto: This causes a hang during migration, so I'll revert the patch from 2.1. For me this patch series fixed all hangs I had with migration (at least with qemu 2.0). Unfortunately, someone else bisected their hangs exactly to this patch: http://permal

Re: [Qemu-devel] [PATCH uq/master] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation

2014-07-15 Thread Marcin Gibuła
@@ -65,6 +66,7 @@ static uint64_t kvmclock_current_nsec(KVMClockState *s) cpu_physical_memory_read(kvmclock_struct_pa, &time, sizeof(time)); +assert(time.tsc_timestamp <= migration_tsc); delta = migration_tsc - time.tsc_timestamp; if (time.tsc_shift < 0) { delta >>= -

Re: [Qemu-devel] [PATCH uq/master] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation

2014-07-15 Thread Paolo Bonzini
Il 03/06/2014 18:34, Marcelo Tosatti ha scritto: Ensure proper env->tsc value for kvmclock_current_nsec calculation. Reported-by: Marcin Gibuła Signed-off-by: Marcelo Tosatti diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index 6f4ed28a..bef2504 100644 --- a/hw/i386/kvm/clock.c +++ b

[Qemu-devel] [PATCH uq/master] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation

2014-06-03 Thread Marcelo Tosatti
Ensure proper env->tsc value for kvmclock_current_nsec calculation. Reported-by: Marcin Gibuła Signed-off-by: Marcelo Tosatti diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index 6f4ed28a..bef2504 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -17,6 +17,7 @@ #include "q