From patchwork Sat Jul 11 00:55:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wright X-Patchwork-Id: 35129 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 n6B0tckw025105 for ; Sat, 11 Jul 2009 00:55:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757429AbZGKAzg (ORCPT ); Fri, 10 Jul 2009 20:55:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757469AbZGKAzg (ORCPT ); Fri, 10 Jul 2009 20:55:36 -0400 Received: from sous-sol.org ([216.99.217.87]:37830 "EHLO sequoia.sous-sol.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757429AbZGKAzf (ORCPT ); Fri, 10 Jul 2009 20:55:35 -0400 Received: from sequoia.sous-sol.org (sequoia.sous-sol.org [127.0.0.1]) by sequoia.sous-sol.org (8.14.3/8.14.3) with ESMTP id n6B0tRS7014606; Fri, 10 Jul 2009 17:55:27 -0700 Received: (from chrisw@localhost) by sequoia.sous-sol.org (8.14.3/8.14.3/Submit) id n6B0tQD5014605; Fri, 10 Jul 2009 17:55:26 -0700 Date: Fri, 10 Jul 2009 17:55:26 -0700 From: Chris Wright To: linux-pci@vger.kernel.org Cc: Yu Zhao , Martin Mares Subject: [PATCH] pciutils: show SR-IOV VF BARs Message-ID: <20090711005526.GH30379@sequoia.sous-sol.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: clamav-milter 0.95.1 at sequoia.sous-sol.org X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sequoia.sous-sol.org Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org When decoding the PCIe SR-IOV capability, cap_sriov() doesn't show the VF BARs. This patch shows basic information about the VF BARs (doesn't include size, for example). For example: ... Capabilities: [160] Single Root I/O Virtualization (SR-IOV) IOVCap: Migration-, Interrupt Message Number: 000 IOVCtl: Enable- Migration- Interrupt- MSE- ARIHierarchy+ IOVSta: Migration- Initial VFs: 8, Total VFs: 8, Number of VFs: 8, Function Depende ncy Link: 00 VF offset: 128, stride: 2, Device ID: 10ca Supported Page Size: 00000553, System Page Size: 00000001 Region 0: Memory at fbb20000 (64-bit, non-prefetchable) Region 3: Memory at fbb00000 (64-bit, non-prefetchable) VF Migration: offset: 00000000, BIR: 0 ... Capabilities: [170] Single Root I/O Virtualization (SR-IOV) IOVCap: Migration-, Interrupt Message Number: 000 IOVCtl: Enable- Migration- Interrupt- MSE- ARIHierarchy+ IOVSta: Migration- Initial VFs: 16, Total VFs: 16, Number of VFs: 16, Function Depe ndency Link: 00 VF offset: 1, stride: 1, Device ID: 5833 Supported Page Size: 000007ff, System Page Size: 00000001 Region 0: Memory at f0000000 (64-bit, prefetchable) Region 2: Memory at f8820000 (64-bit, prefetchable) Region 4: Memory at f8800000 (64-bit, prefetchable) VF Migration: offset: 00000000, BIR: 0 Signed-off-by: Chris Wright --- ls-ecaps.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/ls-ecaps.c b/ls-ecaps.c index 38da824..ff8514f 100644 --- a/ls-ecaps.c +++ b/ls-ecaps.c @@ -145,6 +145,7 @@ cap_sriov(struct device *d, int where) u16 b; u16 w; u32 l; + int i; printf("Single Root I/O Virtualization (SR-IOV)\n"); if (verbose < 2) @@ -181,6 +182,28 @@ cap_sriov(struct device *d, int where) printf("\t\tSupported Page Size: %08x, ", l); l = get_conf_long(d, where + PCI_IOV_SYSPS); printf("System Page Size: %08x\n", l); + for (i=0; i