From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758767AbcJYL4F (ORCPT ); Tue, 25 Oct 2016 07:56:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40464 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753454AbcJYL4C (ORCPT ); Tue, 25 Oct 2016 07:56:02 -0400 Subject: Re: [PATCH 6/5] KVM: x86: fix periodic lapic timer with hrtimers To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Wanpeng Li References: <1477304593-3453-1-git-send-email-wanpeng.li@hotmail.com> <20161024150323.GB2247@potion> <20161024152737.GB3197@potion> <20161025114334.GD3197@potion> Cc: "linux-kernel@vger.kernel.org" , kvm , Yunhong Jiang , Wanpeng Li From: Paolo Bonzini Message-ID: <1eef63b9-6afe-4d3a-f51e-61283045cb3f@redhat.com> Date: Tue, 25 Oct 2016 13:55:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161025114334.GD3197@potion> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 25 Oct 2016 11:56:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/10/2016 13:43, Radim Krčmář wrote: > Oops, silly mistake -- apic_timer_expired() was in the 'else' branch in > [5/5] and I didn't invert the condition after moving it. > > diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c > index 6244988418be..d7e74c8ec8ca 100644 > --- a/arch/x86/kvm/lapic.c > +++ b/arch/x86/kvm/lapic.c > @@ -1354,8 +1354,8 @@ static void start_sw_period(struct kvm_lapic *apic) > return; > > 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? Yes, will do. Paolo