From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [regression] KVM: hangs and "irq timeout" booting HURD unless -no-kvm-irqchip passed Date: Tue, 08 Feb 2011 16:57:16 +0200 Message-ID: <4D5159CC.4050009@redhat.com> References: <1283171743-10766-1-git-send-email-avi@redhat.com> <1283171743-10766-2-git-send-email-avi@redhat.com> <20110207060030.GA1896@elie> <4D4FE7E5.2040308@redhat.com> <20110207124513.GB14984@redhat.com> <20110207132729.GC14984@redhat.com> <20110208014032.GB1858@elie> <20110208120037.GJ14984@redhat.com> <20110208142253.GA8243@amt.cnet> <4D515695.5080600@redhat.com> <20110208144725.GN14984@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , Jonathan Nieder , kvm@vger.kernel.org, Michael Tokarev , Guillem Jover To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:64094 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754709Ab1BHO5a (ORCPT ); Tue, 8 Feb 2011 09:57:30 -0500 In-Reply-To: <20110208144725.GN14984@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/08/2011 04:47 PM, Gleb Natapov wrote: > On Tue, Feb 08, 2011 at 04:43:33PM +0200, Avi Kivity wrote: > > On 02/08/2011 04:22 PM, Marcelo Tosatti wrote: > > >I don't think the isr_ack logic is overly complex that it should be > > >removed. For some cases it is still beneficial, see example case on > > >commit e48258009d941, which is not handled by kick coalescing of > > >kvm_vcpu_kick. > > > > On the other hand, I think it can be done differently. For example > > LVT0 is probably programmed to mask interrupts; we can simply look > > at it and not kick if that's the case. We can use notifiers from > > the lapic to the pic to avoid looking at lapic data. > > > I believe this is what my patch is doing. Look at pic_unlock(). The code > search for vcpu to kick by calling kvm_apic_accept_pic_intr() function > (which checks that LVT is masked). It does indeed. > If no vcpu is found we kicks bsp. > Why? I removed that. The code that looks for a vcpu that has LVT0 unmasked is newer than the isr_ack code (see cfe149e91b82). So it looks like the isr_ack code is indeed unnecessary now. -- error compiling committee.c: too many arguments to function