Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758903AbcJZL0Y (ORCPT ); Wed, 26 Oct 2016 07:26:24 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34715 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758727AbcJZL0U (ORCPT ); Wed, 26 Oct 2016 07:26:20 -0400 MIME-Version: 1.0 In-Reply-To: <13aa20e8-2931-8817-1d07-7bda8f28fb19@redhat.com> References: <1477304593-3453-1-git-send-email-wanpeng.li@hotmail.com> <20161024150323.GB2247@potion> <20161024152737.GB3197@potion> <20161025114334.GD3197@potion> <13aa20e8-2931-8817-1d07-7bda8f28fb19@redhat.com> From: Wanpeng Li Date: Wed, 26 Oct 2016 19:26:18 +0800 Message-ID: Subject: Re: [PATCH 6/5] KVM: x86: fix periodic lapic timer with hrtimers To: Paolo Bonzini Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , "linux-kernel@vger.kernel.org" , kvm , Yunhong Jiang , Wanpeng Li Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1197 Lines: 35 2016-10-26 19:15 GMT+08:00 Paolo Bonzini : > > > 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