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 15:02:18 +0300 Message-ID: <4A912FCA.4060800@redhat.com> References: <20090813171910.GA4636@redhat.com> <4A892473.9010000@redhat.com> <20090821181638.GA30248@redhat.com> <4A9127D8.7060709@redhat.com> <20090823113657.GA30093@redhat.com> <4A912C1E.5090004@redhat.com> <20090823115658.GB30093@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]:57863 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933688AbZHWMCT (ORCPT ); Sun, 23 Aug 2009 08:02:19 -0400 Received: from int-mx07.intmail.prod.int.phx2.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7NC2Lhx032761 for ; Sun, 23 Aug 2009 08:02:21 -0400 In-Reply-To: <20090823115658.GB30093@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/23/2009 02:56 PM, Gleb Natapov wrote: >>>> 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. >> > If we can avoid it why not? > It simplifies the code. You do it at the kvm_set_irq() entry point regardless of whether the interrupt is level-triggered, edge-triggered, or msi. As a bonus, you only do it once (not twice for pic/ioapic interrupts). >> All interrupts connected through one GSI are shared, so why not keep >> the level information shared as well? >> >> > If we will keep sharing info at irq routing table level how will we recalculate > sharing state when irq routing table changes? > Good question. Move from old table to new table? but that interferes with rcu. Okay, at irqchip level is better after all. -- error compiling committee.c: too many arguments to function