KVM: x86: update masterclock on TSC writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When the guest writes to the TSC, the masterclock TSC copy must be updated
as well along with the TSC_OFFSET update, otherwise a 
negative tsc_timestamp is calculated at kvm_guest_time_update.

Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 0033df3..f52a887 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1248,7 +1248,7 @@ void kvm_track_tsc_matching(struct kvm_vcpu *vcpu)
 		if (!ka->use_master_clock)
 			do_request = 1;
 
-	if (!vcpus_matched && ka->use_master_clock)
+	if (ka->use_master_clock)
 			do_request = 1;
 
 	if (do_request)
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux