From owner-freebsd-hackers@FreeBSD.ORG Tue May 27 01:41:38 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F72430C for ; Tue, 27 May 2014 01:41:38 +0000 (UTC) Received: from mail-oa0-x22c.google.com (mail-oa0-x22c.google.com [IPv6:2607:f8b0:4003:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 905072F06 for ; Tue, 27 May 2014 01:41:37 +0000 (UTC) Received: by mail-oa0-f44.google.com with SMTP id o6so8910487oag.3 for ; Mon, 26 May 2014 18:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=stckTpre9/rEAuCwTRhIwbPSszChlT7cCgFl9RDtdPs=; b=Pf2jr6f0/MqYyYKAlLrWIQgXEblSqCltez6AmswVSNUiWGgu6UL9Nz6QaFzIsqEjTf +xVySzSHbFa1VOPcOxOlSB0fUi8t3dReOo5jyjRa8E5if/t5aMr3Hwa+nTEXQOpIoEYa jQlr3RzZZxYAq1XKEHSQFCxzTpvERTv4sV/OlHOiBxWIl/FW97iHhnQM5I2HZzAvtZfp nsoiqvwhzaYd9HH/NHfKlLfEJqQD9vC+knRQ3U0YOSxjZ2nhVulQkCYeAf624ALrrh92 qg9qq4InF9XHXHWHDBHtSu96D8Z1tLRIKk7Cq7WuiFWWPtiDymweWLYPZjMUH3TrP0N6 4mDw== MIME-Version: 1.0 X-Received: by 10.60.72.100 with SMTP id c4mr28841005oev.25.1401154896934; Mon, 26 May 2014 18:41:36 -0700 (PDT) Received: by 10.76.23.130 with HTTP; Mon, 26 May 2014 18:41:36 -0700 (PDT) Date: Mon, 26 May 2014 21:41:36 -0400 Message-ID: Subject: SR-IOV Patch Series 1/7: PCI Infrastructure Refactoring From: Ryan Stone To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 01:41:38 -0000 This set of patches refactors the PCI infrastructure a bit to offer some new APIs that the SR-IOV infrastructure will consume. The intention is that these refactorings should be no-ops for the existing APIs. http://people.freebsd.org/~rstone/patches/iov/0001-Refactor-PCI-device-creation.patch [PATCH 01/21] Refactor PCI device creation Refactor creation of PCI devices into helper methods that can be used by the VF creation code. --- sys/dev/pci/pci.c | 153 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 86 insertions(+), 67 deletions(-) http://people.freebsd.org/~rstone/patches/iov/0002-Refactor-PCI-resource-allocation.patch [PATCH 02/21] Refactor PCI resource allocation Refactor PCI resource allocation code to allow a request for a memory-mapped I/O window that is a multiple of a requested size. This is needed by the SR-IOV code because the VF BARs are all allocated contiguously. We can't just allocate a resource that is a multiple of a single VF BAR because the size of an allocation implies its alignment requirement. --- sys/dev/pci/pci.c | 45 +++++++++++++++++++++++++++++---------------- sys/dev/pci/pci_private.h | 10 ++++++++++ 2 files changed, 39 insertions(+), 16 deletions(-) http://people.freebsd.org/~rstone/patches/iov/0003-Add-some-pcib-methods-to-get-ARI-related-information.patch [PATCH 03/21] Add some pcib methods to get ARI-related information --- sys/dev/pci/pci_pci.c | 33 +++++++++++++++++++++++++++++++++ sys/dev/pci/pcib_if.m | 25 +++++++++++++++++++++++++ sys/dev/pci/pcib_private.h | 2 ++ sys/dev/pci/pcib_support.c | 10 ++++++++++ sys/dev/pci/pcireg.h | 4 ++++ 5 files changed, 74 insertions(+)