On 17/04/19 16:34, Sean Christopherson wrote: >>> @@ -1522,6 +1523,10 @@ void wait_lapic_expire(struct kvm_vcpu *vcpu) >>> } >>> if (abs(guest_tsc - tsc_deadline) < LAPIC_TIMER_ADVANCE_ADJUST_DONE) >>> lapic_timer_advance_adjust_done = true; >>> + if (unlikely(lapic_timer_advance_ns > LAPIC_TIMER_ADVANCE_MAX_NS)) { >>> + lapic_timer_advance_ns = LAPIC_TIMER_ADVANCE_MAX_NS; >>> + lapic_timer_advance_adjust_done = true; >>> + } >> I would treat this case as "advancing the timer has failed miserably" >> and reset lapic_timer_advance_ns to 0. > As in, disable the feature, correct? That works for me. Yes. Paolo