diff mbox

[PULL,5/6] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation"

Message ID 1405674265-24058-6-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini July 18, 2014, 9:04 a.m. UTC
This reverts commit 9b1786829aefb83f37a8f3135e3ea91c56001b56.

Cc: agraf@suse.de
Cc: mtosatti@redhat.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/i386/kvm/clock.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Amit Shah July 18, 2014, 11:31 a.m. UTC | #1
On (Fri) 18 Jul 2014 [11:04:24], Paolo Bonzini wrote:
> This reverts commit 9b1786829aefb83f37a8f3135e3ea91c56001b56.
> 
> Cc: agraf@suse.de
> Cc: mtosatti@redhat.com
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Please include some information on why this is being reverted.  Helps
people browsing the tree later.

Thanks,

		Amit
Alexander Graf July 18, 2014, 11:36 a.m. UTC | #2
On 18.07.14 13:31, Amit Shah wrote:
> On (Fri) 18 Jul 2014 [11:04:24], Paolo Bonzini wrote:
>> This reverts commit 9b1786829aefb83f37a8f3135e3ea91c56001b56.
>>
>> Cc: agraf@suse.de
>> Cc: mtosatti@redhat.com
>> Cc: qemu-stable@nongnu.org
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Please include some information on why this is being reverted.  Helps
> people browsing the tree later.

Yeah, I'm also not convinced it's a great idea to trade one known bug 
with another known bug.


Alex
Amit Shah July 18, 2014, 11:45 a.m. UTC | #3
On (Fri) 18 Jul 2014 [13:36:15], Alexander Graf wrote:
> 
> On 18.07.14 13:31, Amit Shah wrote:
> >On (Fri) 18 Jul 2014 [11:04:24], Paolo Bonzini wrote:
> >>This reverts commit 9b1786829aefb83f37a8f3135e3ea91c56001b56.
> >>
> >>Cc: agraf@suse.de
> >>Cc: mtosatti@redhat.com
> >>Cc: qemu-stable@nongnu.org
> >>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> >Please include some information on why this is being reverted.  Helps
> >people browsing the tree later.
> 
> Yeah, I'm also not convinced it's a great idea to trade one known bug with
> another known bug.

I'm not opposed to the revert, though.  We don't yet have a fix for
the issue caused by the original patch, and Paolo is being
conservative in keeping the older bug around for 2.1, rather than
trading it for unknown bugs at this stage.

The investigation for the bug is proceeding, though, and we may get a
fix soon.  If it turns out to be well-contained, we could also look at
backporting all the fixes to -stable, if it helps.

		Amit
diff mbox

Patch

diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index 272a88a..feb5fc5 100644
--- a/hw/i386/kvm/clock.c
+++ b/hw/i386/kvm/clock.c
@@ -17,7 +17,6 @@ 
 #include "qemu/host-utils.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/kvm.h"
-#include "sysemu/cpus.h"
 #include "hw/sysbus.h"
 #include "hw/kvm/clock.h"
 
@@ -66,7 +65,6 @@  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 >>= -time.tsc_shift;
@@ -125,8 +123,6 @@  static void kvmclock_vm_state_change(void *opaque, int running,
         if (s->clock_valid) {
             return;
         }
-
-        cpu_synchronize_all_states();
         ret = kvm_vm_ioctl(kvm_state, KVM_GET_CLOCK, &data);
         if (ret < 0) {
             fprintf(stderr, "KVM_GET_CLOCK failed: %s\n", strerror(ret));