From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH][RFC] Use return value from kvm_set_irq() to re-inject PIT interrupts. Date: Wed, 26 Aug 2009 09:45:46 -0300 Message-ID: <20090826124546.GB32235@amt.cnet> References: <20090824120623.GC30093@redhat.com> <20090824163256.GA8653@amt.cnet> <20090824171646.GA11762@redhat.com> <20090824174427.GA10311@amt.cnet> <20090824181905.GB11762@redhat.com> <20090824190150.GC11762@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, avi@redhat.com To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:2012 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932896AbZHZM5t (ORCPT ); Wed, 26 Aug 2009 08:57:49 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7QCvoer015947 for ; Wed, 26 Aug 2009 08:57:51 -0400 Content-Disposition: inline In-Reply-To: <20090824190150.GC11762@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Aug 24, 2009 at 10:01:50PM +0300, Gleb Natapov wrote: > On Mon, Aug 24, 2009 at 09:19:05PM +0300, Gleb Natapov wrote: > > > > It is obviously wrong thing to do from assigned devices POV. > > > > > > Thats not entirely clear to me. So what happens if a guest with PIC > > > assigned device resets with a pending IRR? The host interrupt line will > > > be kept disabled, even though the guest is able to process further > > > interrupts? > > The host interrupt line will be enabled (assigned device ack notifier > > does this) without clearing interrupt condition in assigned device > > (guest hasn't acked irq so how can we be sure it ran device's irq > > handler?). Host will hang. > > > Actually, on the second thought, it will not hang. Next time host > interrupt handler runs it will disable interrupt once again. Right. And if you don't signal ack notification on reset with pending IRR the host line will be kept disabled. As said on other email, its not specific to PIT reinjection logic.