On 18/12/2014 13:24, Marcelo Tosatti wrote:
> True. I can change to a direct wait if that is preferred.
What about this:
guest_tsc = kvm_x86_ops->read_l1_tsc(vcpu, native_read_tsc());
trace_kvm_wait_lapic_expire(vcpu->vcpu_id, guest_tsc - tsc_deadline);
/* We know that __delay is delay_tsc, see kvm_timer_init. */
if (guest_tsc < tsc_deadline)
__delay(tsc_deadline - guest_tsc);
and a check in kvm_timer_init:
if (check_tsc_unstable() && lapic_timer_advance_ns) {
pr_info("kvm: unstable TSC, disabling
lapic_timer_advance_ns\n");
lapic_timer_advance_ns = 0;
}
Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html