From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 9/9] pci-assign: Update MSI-X config based on table writes Date: Tue, 31 Jan 2012 14:50:32 +0200 Message-ID: <4F27E398.2050202@redhat.com> References: <20120128142104.25681.93072.stgit@bling.home> <20120128142227.25681.78115.stgit@bling.home> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, jan.kiszka@siemens.com, shashidhar.patil@gmail.com To: Alex Williamson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:25070 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753881Ab2AaMui (ORCPT ); Tue, 31 Jan 2012 07:50:38 -0500 In-Reply-To: <20120128142227.25681.78115.stgit@bling.home> Sender: kvm-owner@vger.kernel.org List-ID: On 01/28/2012 04:22 PM, Alex Williamson wrote: > We currently only update MSI-X configuration with the enable bit > in PCI config space is toggled. This is pretty sketchy and part > of the reason for the odd checks for vector data is to guess > whether the guest is going to use the vector so we can pre-enable > it. > > Two key things missed by doing this is that we don't catch vector > changes after enabling (ex. setting smp_affinity on an irq) and > we don't support guests that don't touch the vector table prior > to enabling the MSI-X capability (ex. freebsd). This patch > fixes both of these problems. > > I'm not able to get good behavior attempting to disable masked > vectors, so we don't actually do anything on mask yet. > > > +static inline bool msix_masked(MSIXTableEntry *entry) > +{ > + return !!(entry->ctrl & 0x1); > +} !! !needed (nor 'inline'). -- error compiling committee.c: too many arguments to function