From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC PATCH] kvm: Extend irqfd to support level interrupts Date: Mon, 18 Jun 2012 17:35:59 +0300 Message-ID: <4FDF3CCF.5030307@redhat.com> References: <20120616163230.15204.61075.stgit@bling.home> <4FDEE0A3.80900@redhat.com> <1340029103.24037.209.camel@bling.home> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org, mst@redhat.com, jan.kiszka@siemens.com To: Alex Williamson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:4252 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751555Ab2FROgE (ORCPT ); Mon, 18 Jun 2012 10:36:04 -0400 In-Reply-To: <1340029103.24037.209.camel@bling.home> Sender: kvm-owner@vger.kernel.org List-ID: On 06/18/2012 05:18 PM, Alex Williamson wrote: >> >> I don't understand how this works. A level IRQ isn't de-asserted by the >> EOI, it's de-asserted by its source. >> >> Consider the following sequence: >> >> device guest >> >> event >> assert >> interrupt >> interrupt handler >> handle event >> clear ISR bit >> deassert >> event >> assert >> EOI >> >> What should happen is that the interrupt will be redelivered >> immmediately after the EOI, but that won't happen with your API since >> the EOI ack notifier will deassert the interrupt and nothing will >> re-assert it. > > A device that can de-assert it's own interrupt based on register/config > access probably isn't going to subscribe to this interface. Such a > device already has much greater visibility of it's service needs. In > the case where we have external devices, they'll reassert the interrupt, > which is part of this api that will need to be documented. > > Comparing this to real hardware, an eoi causes the ioapic to reassert > the interrupt if any of it's inputs are still active. Here we > preemptively de-assert our interrupt and require the user of the > interface to re-assert. Thanks, Okay. I guess this limits it assigned devices (which is fine, it just needs to be documented clearly). -- error compiling committee.c: too many arguments to function