From: Avi Kivity Subject: Re: [PATCH RFC] kvm: enable irq injection from interrupt context Date: Thu, 16 Sep 2010 15:14:11 +0200 Message-ID: <4C921823.5080602@redhat.com> References: <20100916095310.GG20864@redhat.com> <20100916101332.GW3008@redhat.com> <20100916101339.GK20864@redhat.com> <20100916102047.GY3008@redhat.com> <20100916104455.GA22254@redhat.com> <20100916105403.GZ3008@redhat.com> <20100916105352.GB22254@redhat.com> <20100916111752.GA3008@redhat.com> <20100916121338.GA23779@redhat.com> <20100916123301.GE3008@redhat.com> <20100916125717.GA24284@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Marcelo Tosatti , kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:63398 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753571Ab0IPNOP (ORCPT ); Thu, 16 Sep 2010 09:14:15 -0400 In-Reply-To: <20100916125717.GA24284@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/16/2010 02:57 PM, Michael S. Tsirkin wrote: > > > > > > If you want to split parts that asserts irq and de-asserts it then we > > > > should have irqfd that tracks line status and knows interrupt line > > > > polarity. > > > > > > Yes, it can know about polarity even though I think it's cleaner to do this > > > per gsi. But it can not track line status as line is shared with > > > other devices. > > It should track only device's line status. > > There is no such thing as device's line status on real hardware, either. > Devices do not drive INT# high: they drive it low (all the time) > or do not drive it at all. > That's just an implementation detail. Devices either assert INT# or they do not. Tying the wires together constitutes an AND gate. This gate has to be modelled somewhere, currently it's in qemu's pci emulation. -- error compiling committee.c: too many arguments to function