<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/iov.c, branch linux-4.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-11-02T21:57:03Z</updated>
<entry>
<title>Merge branches 'pci/aer', 'pci/hotplug', 'pci/misc', 'pci/msi', 'pci/resource' and 'pci/virtualization' into next</title>
<updated>2015-11-02T21:57:03Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2015-11-02T21:57:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f9a30ec2a4acee9a4d664e7405c7eb26a7c4b5e'/>
<id>urn:sha1:1f9a30ec2a4acee9a4d664e7405c7eb26a7c4b5e</id>
<content type='text'>
* pci/aer:
  PCI/AER: Clear error status registers during enumeration and restore

* pci/hotplug:
  PCI: pciehp: Queue power work requests in dedicated function

* pci/misc:
  PCI: Turn off Request Attributes to avoid Chelsio T5 Completion erratum
  x86/PCI: Make pci_subsys_init() static
  PCI: Add builtin_pci_driver() to avoid registration boilerplate
  PCI: Remove unnecessary "if" statement

* pci/msi:
  x86/PCI: Don't alloc pcibios-irq when MSI is enabled
  PCI/MSI: Export all remapped MSIs to sysfs attributes
  PCI: Disable MSI on SiS 761

* pci/resource:
  sparc/PCI: Add mem64 resource parsing for root bus
  PCI: Expand Enhanced Allocation BAR output
  PCI: Make Enhanced Allocation bitmasks more obvious
  PCI: Handle Enhanced Allocation capability for SR-IOV devices
  PCI: Add support for Enhanced Allocation devices
  PCI: Add Enhanced Allocation register entries
  PCI: Handle IORESOURCE_PCI_FIXED when assigning resources
  PCI: Handle IORESOURCE_PCI_FIXED when sizing resources
  PCI: Clear IORESOURCE_UNSET when reverting to firmware-assigned address

* pci/virtualization:
  PCI: Fix sriov_enable() error path for pcibios_enable_sriov() failures
  PCI: Wait 1 second between disabling VFs and clearing NumVFs
  PCI: Reorder pcibios_sriov_disable()
  PCI: Remove VFs in reverse order if virtfn_add() fails
  PCI: Remove redundant validation of SR-IOV offset/stride registers
  PCI: Set SR-IOV NumVFs to zero after enumeration
  PCI: Enable SR-IOV ARI Capable Hierarchy before reading TotalVFs
  PCI: Don't try to restore VF BARs
</content>
</entry>
<entry>
<title>PCI: Fix sriov_enable() error path for pcibios_enable_sriov() failures</title>
<updated>2015-10-30T20:15:02Z</updated>
<author>
<name>Alexander Duyck</name>
</author>
<published>2015-10-29T21:21:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c23b613507b8fa10e1839fb5a42e1b0318bf1d27'/>
<id>urn:sha1:c23b613507b8fa10e1839fb5a42e1b0318bf1d27</id>
<content type='text'>
Disable VFs if pcibios_enable_sriov() fails, just like we do for other
errors in sriov_enable().  Call pcibios_sriov_disable() if virtfn_add()
fails.

[bhelgaas: changelog, split to separate patch for reviewability]
Fixes: 995df527f399 ("PCI: Add pcibios_sriov_enable() and pcibios_sriov_disable()")
Signed-off-by: Alexander Duyck &lt;aduyck@mirantis.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Wei Yang &lt;weiyang@linux.vnet.ibm.com&gt;</content>
</entry>
<entry>
<title>PCI: Wait 1 second between disabling VFs and clearing NumVFs</title>
<updated>2015-10-30T20:14:56Z</updated>
<author>
<name>Alexander Duyck</name>
</author>
<published>2015-10-29T21:21:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b390864482924a21f8d7e25636d0140de93fba7e'/>
<id>urn:sha1:b390864482924a21f8d7e25636d0140de93fba7e</id>
<content type='text'>
Per sec 3.3.3.1 of the SR-IOV spec, r1.1, we must allow 1.0s after clearing
VF Enable before reading any field in the SR-IOV Extended Capability.

Wait 1 second before calling pci_iov_set_numvfs(), which reads
PCI_SRIOV_VF_OFFSET and PCI_SRIOV_VF_STRIDE after it sets PCI_SRIOV_NUM_VF.

[bhelgaas: split to separate patch for reviewability, add spec reference]
Signed-off-by: Alexander Duyck &lt;aduyck@mirantis.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Reorder pcibios_sriov_disable()</title>
<updated>2015-10-30T20:14:33Z</updated>
<author>
<name>Alexander Duyck</name>
</author>
<published>2015-10-29T21:21:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a39e3fcd72356e2bcb46fd99ec4e98064bd806b2'/>
<id>urn:sha1:a39e3fcd72356e2bcb46fd99ec4e98064bd806b2</id>
<content type='text'>
Move pcibios_sriov_disable() up so it's defined before a future use.

[bhelgaas: split to separate patch for reviewability]
Signed-off-by: Alexander Duyck &lt;aduyck@mirantis.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Wei Yang &lt;weiyang@linux.vnet.ibm.com&gt;</content>
</entry>
<entry>
<title>PCI: Remove VFs in reverse order if virtfn_add() fails</title>
<updated>2015-10-30T20:14:00Z</updated>
<author>
<name>Alexander Duyck</name>
</author>
<published>2015-10-29T21:21:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3443c38205330bc5783a516ef1d0b6f182ee9a85'/>
<id>urn:sha1:3443c38205330bc5783a516ef1d0b6f182ee9a85</id>
<content type='text'>
If virtfn_add() fails, we call virtfn_remove() for any previously added
devices.  Remove the devices in reverse order (first-added is
last-removed), which is more natural and doesn't require an additional
variable.

[bhelgaas: changelog, split to separate patch for reviewability]
Signed-off-by: Alexander Duyck &lt;aduyck@mirantis.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Wei Yang &lt;weiyang@linux.vnet.ibm.com&gt;</content>
</entry>
<entry>
<title>PCI: Handle Enhanced Allocation capability for SR-IOV devices</title>
<updated>2015-10-29T22:35:40Z</updated>
<author>
<name>David Daney</name>
</author>
<published>2015-10-29T22:35:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=111839917fccf4f74d50ad937321acc6a07eb9c3'/>
<id>urn:sha1:111839917fccf4f74d50ad937321acc6a07eb9c3</id>
<content type='text'>
SR-IOV BARs can be specified via EA entries.  Extend the EA parser to
extract the SRIOV BAR resources, and modify sriov_init() to use resources
previously obtained via EA.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Sean O. Stalley &lt;sean.stalley@intel.com&gt;
</content>
</entry>
<entry>
<title>PCI: Remove redundant validation of SR-IOV offset/stride registers</title>
<updated>2015-10-29T21:20:57Z</updated>
<author>
<name>Alexander Duyck</name>
</author>
<published>2015-10-29T21:20:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ce288ec380380f3ab0e3c631b9c2f598835a3f38'/>
<id>urn:sha1:ce288ec380380f3ab0e3c631b9c2f598835a3f38</id>
<content type='text'>
Previously, we read, validated, and cached PCI_SRIOV_VF_OFFSET and
PCI_SRIOV_VF_STRIDE in sriov_enable().  But sriov_init() now does
that via compute_max_vf_buses(), so we don't need to do it again.

Remove the PCI_SRIOV_VF_OFFSET and PCI_SRIOV_VF_STRIDE config reads from
sriov_enable().  The pci_sriov structure already contains the offset and
stride corresponding to the current NumVFs.

[bhelgaas: split to separate patch for reviewability]
Signed-off-by: Alexander Duyck &lt;aduyck@mirantis.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Wei Yang &lt;weiyang@linux.vnet.ibm.com&gt;</content>
</entry>
<entry>
<title>PCI: Set SR-IOV NumVFs to zero after enumeration</title>
<updated>2015-10-29T21:20:50Z</updated>
<author>
<name>Alexander Duyck</name>
</author>
<published>2015-10-29T21:20:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea9a8854161d9580cfabe011c0ae296ecc0e1d4f'/>
<id>urn:sha1:ea9a8854161d9580cfabe011c0ae296ecc0e1d4f</id>
<content type='text'>
The enumeration path should leave NumVFs set to zero.  But after
4449f079722c ("PCI: Calculate maximum number of buses required for VFs"),
we call virtfn_max_buses() in the enumeration path, which changes NumVFs.
This NumVFs change is visible via lspci and sysfs until a driver enables
SR-IOV.

Iterate from TotalVFs down to zero so NumVFs is zero when we're finished
computing the maximum number of buses.  Validate offset and stride in
the loop, so we can test it at every possible NumVFs setting.  Rename
virtfn_max_buses() to compute_max_vf_buses() to hint that it does have a
side effect of updating iov-&gt;max_VF_buses.

[bhelgaas: changelog, rename, allow numVF==1 &amp;&amp; stride==0, rework loop,
reverse sense of error path]
Fixes: 4449f079722c ("PCI: Calculate maximum number of buses required for VFs")
Based-on-patch-by: Ethan Zhao &lt;ethan.zhao@oracle.com&gt;
Signed-off-by: Alexander Duyck &lt;aduyck@mirantis.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Enable SR-IOV ARI Capable Hierarchy before reading TotalVFs</title>
<updated>2015-10-29T21:20:31Z</updated>
<author>
<name>Ben Shelton</name>
</author>
<published>2015-10-29T21:20:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff45f9ddbcf5418ff6402432d14ad91a40d9bea9'/>
<id>urn:sha1:ff45f9ddbcf5418ff6402432d14ad91a40d9bea9</id>
<content type='text'>
For some SR-IOV devices, the number of available virtual functions, i.e.,
TotalVFs, increases after setting the ARI Capable Hierarchy bit in the
SR-IOV Control register.  This violates the SR-IOV spec, r1.1, sec 3.3.6,
which says TotalVFs is HwInit, but we don't need TotalVFs before setting
the ARI Capable bit anyway.

Set the ARI Capable Hierarchy bit (if ARI is enabled in the upstream
bridge) before reading TotalVFs.

[bhelgaas: changelog]
Signed-off-by: Ben Shelton &lt;benjamin.h.shelton@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Add pcibios_iov_resource_alignment() interface</title>
<updated>2015-03-31T02:02:36Z</updated>
<author>
<name>Wei Yang</name>
</author>
<published>2015-03-25T08:23:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=978d2d68312326b715a5913aaab1eaf24fe99108'/>
<id>urn:sha1:978d2d68312326b715a5913aaab1eaf24fe99108</id>
<content type='text'>
Per the SR-IOV spec r1.1, sec 3.3.14, the required alignment of a PF's IOV
BAR is the size of an individual VF BAR, and the size consumed is the
individual VF BAR size times NumVFs.

The PowerNV platform has additional alignment requirements to help support
its Partitionable Endpoint device isolation feature (see
Documentation/powerpc/pci_iov_resource_on_powernv.txt).

Add a pcibios_iov_resource_alignment() interface to allow platforms to
request additional alignment.

[bhelgaas: changelog, adapt to reworked pci_sriov_resource_alignment(),
drop "align" parameter]
Signed-off-by: Wei Yang &lt;weiyang@linux.vnet.ibm.com&gt;
Acked-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
</feed>
