From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v4] kvm: Use a bitmap for tracking used GSIs Date: Mon, 18 May 2009 15:33:20 +0300 Message-ID: <4A115590.6030500@redhat.com> References: <1242219343.4786.66.camel@2710p.home> <4A0AC453.2000907@redhat.com> <1242220276.4786.67.camel@2710p.home> <20090513135502.GA1405@redhat.com> <1242224129.9456.6.camel@lappy> <1242225238.9456.9.camel@lappy> <1242256055.9456.326.camel@lappy> <4A1077F9.8040604@redhat.com> <20090518111246.GB3037@redhat.com> <4A114849.604@redhat.com> <20090518121952.GA14327@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alex Williamson , kvm@vger.kernel.org, sheng.yang@intel.com To: "Michael S. Tsirkin" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:32894 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751191AbZERMdX (ORCPT ); Mon, 18 May 2009 08:33:23 -0400 In-Reply-To: <20090518121952.GA14327@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Michael S. Tsirkin wrote: >> >>> On the other hand, in MSI-X mask bit is mandatory, not optional >>> so we'll have to support it for assigned devices at some point. >>> >>> If we are worried about speed of masking/unmasking MSI-X interrupts for >>> assigned devices (older kernels used to mask them, recent kernels leave >>> this to drivers) we will probably need to have MSI-X support in the >>> kernel, and have kernel examine the mask bit before injecting the >>> interrupt, just like real devices do. >>> >>> >> Yes. >> > > Actually, if we do that, we'll need to address a race where a driver > has updated the mask bit in the window after we tested it > and before we inject the interrupt. Not sure how to do this. > The driver can't tell if the interrupt came first, so it's a valid race (real hardware has the same race). -- error compiling committee.c: too many arguments to function