Re: [PATCH 6/5] KVM: x86: fix periodic lapic timer with hrtimers

From: Wanpeng Li
Date: Wed Oct 26 2016 - 07:26:26 EST


2016-10-26 19:15 GMT+08:00 Paolo Bonzini <pbonzini@xxxxxxxxxx>:
>
>
> On 26/10/2016 12:23, Wanpeng Li wrote:
>>> >
>>> > if (apic_lvtt_oneshot(apic) &&
>>> > - ktime_after(apic->lapic_timer.target_expiration,
>>> > - apic->lapic_timer.timer.base->get_time())) {
>>> > + !ktime_after(apic->lapic_timer.target_expiration,
>>> > + apic->lapic_timer.timer.base->get_time())) {
>>> > apic_timer_expired(apic);
>>> > return;
>>> > }
>>> >
>>> > Paolo, can you squash that?
>> It seems that squash is impossible since the dependency of current
>> kvm/queue(KVM: x86: use ktime_get instead of seeking the
>> hrtimer_clock_base), I will send out a separate patch to fix this.
>
> It is squashed in:
>
> + if (apic_lvtt_oneshot(apic) &&
> + ktime_after(apic->lapic_timer.timer.base->get_time(),
> + apic->lapic_timer.target_expiration)) {
> + apic_timer_expired(apic);
> + return;
> + }
>
> Notice that the order of the arguments is inverted (alternatively I
> could have used ktime_before).

Indeed.

Regards,
Wanpeng Li