cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 51db6795c68e1d00373d373c043543bbc6fb8f08 Mon Sep 17 00:00:00 2001
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
Date: Wed, 22 Oct 2014 09:46:33 +0200
Subject: [PATCH 2/6] Revert "kvmclock: Ensure proper env->tsc value for
 kvmclock_current_nsec calculation"

Message-id: <1413971197-4624-2-git-send-email-dgilbert@redhat.com>
Patchwork-id: 61789
O-Subject: [RHEL-7.1 qemu-kvm PATCH 1/5] Revert "kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation"
Bugzilla: 1098602 1130428
RH-Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

This reverts commit da4fe791cecafbec05395041c52cb545308b1b61.

The equivalent upstream revert is Paolo's 108e4c3871e0d0cd185c

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/i386/kvm/clock.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c
index d52c2ea..1f2a26e 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"
 
@@ -61,7 +60,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;
@@ -120,8 +118,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));
-- 
1.8.3.1