From patchwork Sun Jun 21 17:04:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 31671 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5LH7L38025712 for ; Sun, 21 Jun 2009 17:07:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752041AbZFURHB (ORCPT ); Sun, 21 Jun 2009 13:07:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751969AbZFURHA (ORCPT ); Sun, 21 Jun 2009 13:07:00 -0400 Received: from mx2.redhat.com ([66.187.237.31]:45899 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751959AbZFURHA (ORCPT ); Sun, 21 Jun 2009 13:07:00 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5LH4nei014955; Sun, 21 Jun 2009 13:04:49 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5LH4mol022217; Sun, 21 Jun 2009 13:04:48 -0400 Received: from redhat.com (vpn-6-84.tlv.redhat.com [10.35.6.84]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5LH4iLU022838; Sun, 21 Jun 2009 13:04:45 -0400 Date: Sun, 21 Jun 2009 20:04:22 +0300 From: "Michael S. Tsirkin" To: Paul Brook , Avi Kivity , qemu-devel@nongnu.org, Carsten Otte , kvm@vger.kernel.org, Rusty Russell , virtualization@lists.linux-foundation.org, Christian Borntraeger , Blue Swirl , Anthony Liguori , Glauber Costa Subject: [PATCHv2 RFC] qemu/msix: remove msix_supported safety flag Message-ID: <20090621170422.GA10263@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Don't add an option for platforms to disable MSI-X in all devices. Paul Brook will find and fix all platforms that have broken MSI-X emulation. Signed-off-by: Michael S. Tsirkin --- This patch on top of my msix series v6 is a bit tongue in cheek: it shows what can be done and Paul seems to think it's a good idea. So even though I don't necessarily agree, I'll let others decide on it. Changes since v1: rebased on top of MSIXv6. hw/apic.c | 1 - hw/msix.c | 7 ------- hw/msix.h | 2 -- 3 files changed, 0 insertions(+), 10 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 3bcab46..2ac87d1 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -965,7 +965,6 @@ int apic_init(CPUState *env) s->cpu_env = env; apic_reset(s); - msix_supported = 1; /* XXX: mapping more APICs at the same memory location */ if (apic_io_memory == 0) { diff --git a/hw/msix.c b/hw/msix.c index 773581f..6eb51c3 100644 --- a/hw/msix.c +++ b/hw/msix.c @@ -59,9 +59,6 @@ #define DEBUG(fmt, ...) do { } while(0) #endif -/* Flag for interrupt controller to declare MSI-X support */ -int msix_supported; - /* Add MSI-X capability to the config space for the device. */ /* Given a bar and its size, add MSI-X table on top of it * and fill MSI-X capability in the config space. @@ -227,10 +224,6 @@ int msix_init(struct PCIDevice *dev, unsigned short nentries, unsigned bar_nr, unsigned bar_size) { int ret; - /* Nothing to do if MSI is not supported by interrupt controller */ - if (!msix_supported) - return -ENOTSUP; - if (nentries > MSIX_MAX_ENTRIES) return -EINVAL; diff --git a/hw/msix.h b/hw/msix.h index 3427778..27f2dad 100644 --- a/hw/msix.h +++ b/hw/msix.h @@ -29,6 +29,4 @@ void msix_notify(PCIDevice *dev, unsigned vector); void msix_reset(PCIDevice *dev); -extern int msix_supported; - #endif