diff mbox series

[2/2] KVM: x86: revert "update master clock before computing kvmclock_offset"

Message ID 20180809144322.323704269@amt.cnet (mailing list archive)
State New, archived
Headers show
Series switch kvmclock base to CLOCK_MONOTONIC_RAW | expand

Commit Message

Marcelo Tosatti Aug. 9, 2018, 2:43 p.m. UTC
Revert 0bc48bea36d178aea9d7f83f66a1b397cec9db5c,
now that using CLOCK_MONOTONIC_RAW as the clock base 
does not require the guest to be stopped.

This is good for testing CLOCK_MONOTONIC_RAW updates 
for the other cases. 

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

---
 arch/x86/kvm/x86.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
diff mbox series

Patch

Index: linux-2.6.git/arch/x86/kvm/x86.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kvm/x86.c	2018-08-09 10:33:27.323993052 -0300
+++ linux-2.6.git/arch/x86/kvm/x86.c	2018-08-09 11:34:59.030627158 -0300
@@ -4538,15 +4538,9 @@ 
 			goto out;
 
 		r = 0;
-		/*
-		 * TODO: userspace has to take care of races with VCPU_RUN, so
-		 * kvm_gen_update_masterclock() can be cut down to locked
-		 * pvclock_update_vm_gtod_copy().
-		 */
-		kvm_gen_update_masterclock(kvm);
 		now_ns = get_kvmclock_ns(kvm);
 		kvm->arch.kvmclock_offset += user_ns.clock - now_ns;
-		kvm_make_all_cpus_request(kvm, KVM_REQ_CLOCK_UPDATE);
+		kvm_gen_update_masterclock(kvm);
 		break;
 	}
 	case KVM_GET_CLOCK: {