On 16/04/19 22:32, Sean Christopherson wrote: > + /* ndelay uses delay_tsc whenever the hardware has TSC, thus always. */ > + if (guest_tsc < tsc_deadline) { > + ns = (tsc_deadline - guest_tsc) * 1000000ULL; > + do_div(ns, vcpu->arch.virtual_tsc_khz); > + ndelay(min_t(u32, ns, lapic_timer_advance_ns)); > + } > This min_t would allow the timer to expire in advance of the indicated deadline. If this happens, wouldn't it be a bug elsewhere? Paolo