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 <mtosa...@redhat.com>

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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to