On Wed, Jan 15, 2014 at 05:53:22PM +0100, Paolo Bonzini wrote: > Il 15/01/2014 17:37, Marcelo Tosatti ha scritto: > > > Right. Another question, what about this comment: > > > > > > /* Reset of TSC must disable overshoot protection below */ > > > vcpu->arch.hv_clock.tsc_timestamp = 0; > > > vcpu->arch.last_guest_tsc = data; > > > > > > Should it be instead like this: > > > > > > vcpu->arch.hv_clock.tsc_timestamp += data - vcpu->arch.last_guest_tsc; > > > vcpu->arch.last_guest_tsc = data; > > > > > > ? > > > > Don't see why it should? > > Setting tsc_timestamp to 0 makes no sense with the current code, I'm > trying to understand if the right fix is to delete that line or > something else. What I proposed (plus a version increase) would make a > pvclock read continuous before and after the change. > > But looking more at the surrounding code, the calls to kvm_write_tsc > ultimately result in a master clock update as soon as all TSCs agree and > the master clock is re-enabled. This master clock update rewrites > tsc_timestamp. Then I think that the line that sets tsc_timestamp to 0 > can be deleted. ACK. -- 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