From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752588AbXA2Ud0 (ORCPT ); Mon, 29 Jan 2007 15:33:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752595AbXA2Ud0 (ORCPT ); Mon, 29 Jan 2007 15:33:26 -0500 Received: from gate.crashing.org ([63.228.1.57]:42805 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752588AbXA2UdZ (ORCPT ); Mon, 29 Jan 2007 15:33:25 -0500 Subject: Re: [PATCH 0/6] MSI portability cleanups From: Benjamin Herrenschmidt To: michael@ellerman.id.au Cc: "Eric W. Biederman" , David Miller , jeff@garzik.org, greg@kroah.com, tony.luck@intel.com, grundler@parisc-linux.org, mingo@elte.hu, linux-kernel@vger.kernel.org, kyle@parisc-linux.org, linuxppc-dev@ozlabs.org, brice@myri.com, shaohua.li@intel.com, linux-pci@atrey.karlin.mff.cuni.cz In-Reply-To: <1170065487.19887.91.camel@concordia.ozlabs.ibm.com> References: <20070128.153707.30184351.davem@davemloft.net> <20070128.212554.23015561.davem@davemloft.net> <1170050737.26655.233.camel@localhost.localdomain> <1170065487.19887.91.camel@concordia.ozlabs.ibm.com> Content-Type: text/plain Date: Tue, 30 Jan 2007 07:32:10 +1100 Message-Id: <1170102731.26655.277.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > You can read config space, but it's not clear to me if the HV is allowed > to filter it and hide things. I've seen it do it for example with EADS bridges. I haven't seen doing it with devices (other than hiding entire functions) but I wouldn't exclude it... > It's also possible that the device > supports MSI, but for some reason the HV doesn't allow it on that device > etc. so you really have to ask the HV if it's enabled. So pci_find_cap() > shouldn't crash or anything, but it may lie to you. Yup. > One thing I did like about my code, is that pci_enable_msi() and > pci_enable_msix() are just small wrappers around generic_enable_msi() - > which does all the work, and is the same regardless of whether it's an > MSI or MSI-X. Although that's facilitated by the type arg which you > don't like. Part of the reason is you make MSI look like MSI-X (a vector of 1 entry) while Eric does the opposite. Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id E5F6DDE07E for ; Tue, 30 Jan 2007 07:33:00 +1100 (EST) Subject: Re: [PATCH 0/6] MSI portability cleanups From: Benjamin Herrenschmidt To: michael@ellerman.id.au In-Reply-To: <1170065487.19887.91.camel@concordia.ozlabs.ibm.com> References: <20070128.153707.30184351.davem@davemloft.net> <20070128.212554.23015561.davem@davemloft.net> <1170050737.26655.233.camel@localhost.localdomain> <1170065487.19887.91.camel@concordia.ozlabs.ibm.com> Content-Type: text/plain Date: Tue, 30 Jan 2007 07:32:10 +1100 Message-Id: <1170102731.26655.277.camel@localhost.localdomain> Mime-Version: 1.0 Cc: tony.luck@intel.com, grundler@parisc-linux.org, jeff@garzik.org, greg@kroah.com, linux-kernel@vger.kernel.org, kyle@parisc-linux.org, linuxppc-dev@ozlabs.org, linux-pci@atrey.karlin.mff.cuni.cz, "Eric W. Biederman" , shaohua.li@intel.com, mingo@elte.hu, David Miller , brice@myri.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > You can read config space, but it's not clear to me if the HV is allowed > to filter it and hide things. I've seen it do it for example with EADS bridges. I haven't seen doing it with devices (other than hiding entire functions) but I wouldn't exclude it... > It's also possible that the device > supports MSI, but for some reason the HV doesn't allow it on that device > etc. so you really have to ask the HV if it's enabled. So pci_find_cap() > shouldn't crash or anything, but it may lie to you. Yup. > One thing I did like about my code, is that pci_enable_msi() and > pci_enable_msix() are just small wrappers around generic_enable_msi() - > which does all the work, and is the same regardless of whether it's an > MSI or MSI-X. Although that's facilitated by the type arg which you > don't like. Part of the reason is you make MSI look like MSI-X (a vector of 1 entry) while Eric does the opposite. Ben.