On 23/05/2016 16:30, Alan Jenkins wrote: > https://github.com/torvalds/linux/compare/master...sourcejedi:kvm_lockup_fix?expand=1 Here the comparison (and the expired_advance_ns field) is only used to issue the warning. Could you change the patch to use __delay instead of ndelay and omit the warning? + if (guest_tsc < tsc_deadline) { + unsigned long this_tsc_khz = vcpu->arch.virtual_tsc_khz; + u64 delay_ns; + + delay_ns = (tsc_deadline - guest_tsc) * 1000000ULL; + do_div(delay_ns, this_tsc_khz); + + if (delay_ns > apic->lapic_timer.expired_advance_ns) { + vcpu_err(vcpu, + "timer for tsc_deadline fired too far in advance: %lluns\n", + delay_ns); + WARN_ON(1); + + /* avoid lockup. emulated timer will fire early */ + delay_ns = apic->lapic_timer.expired_advance_ns; + } + + ndelay(delay_ns); + } Thanks, Paolo -- 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