From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] Move irq sharing information to irqchip level. Date: Sun, 23 Aug 2009 14:46:38 +0300 Message-ID: <4A912C1E.5090004@redhat.com> References: <20090813171910.GA4636@redhat.com> <4A892473.9010000@redhat.com> <20090821181638.GA30248@redhat.com> <4A9127D8.7060709@redhat.com> <20090823113657.GA30093@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:8762 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933466AbZHWLqj (ORCPT ); Sun, 23 Aug 2009 07:46:39 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7NBkeQu027851 for ; Sun, 23 Aug 2009 07:46:41 -0400 In-Reply-To: <20090823113657.GA30093@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/23/2009 02:36 PM, Gleb Natapov wrote: >>> >>> The problem is that at this level it is not known if GSI is MSI or not. >>> Current code dials with this by arbitrary assuming that GSI is MSI if it >>> is greater then KVM_IOAPIC_NUM_PINS, but this is not enforced when >>> routing table is installed and userspace is free to use any GSI as MSI. >>> Of cause this problem would not exist if MSIs were not linked to GSIs >>> in the first place. >>> >> Does msi actually care about the states? I don't think it does. >> >> > That is the point. MSI doesn't care, but we don't know if GSI is MSI or > not. > So we toggle the bits needlessly. Just like with edge-triggered interrupts. >> No, it's more correct at the GSI level, since all interrupt lines >> connected to one GSI are shared. >> >> > Why? All interrupts connected to the same irqchip pin (through pci irq > router or other onboard logic) are shared. GSI is pure logical > abstraction. > All interrupts connected through one GSI are shared, so why not keep the level information shared as well? -- error compiling committee.c: too many arguments to function