<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/vfio/pci/vfio_pci_config.c, branch v5.2-rc1</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v5.2-rc1</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v5.2-rc1'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2019-04-22T17:45:42Z</updated>
<entry>
<title>vfio: Use dev_printk() when possible</title>
<updated>2019-04-22T17:45:42Z</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2019-03-30T14:41:35Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=a88a7b3eb076ade6205176915fd2ee73a60f4a32'/>
<id>urn:sha1:a88a7b3eb076ade6205176915fd2ee73a60f4a32</id>
<content type='text'>
Use dev_printk() when possible to make messages consistent with other
device-related messages.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/pci: Restore device state on PM transition</title>
<updated>2019-02-18T21:55:53Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2019-02-09T20:43:30Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=51ef3a004b1eb6241e56b3aa8495769a092a4dc2'/>
<id>urn:sha1:51ef3a004b1eb6241e56b3aa8495769a092a4dc2</id>
<content type='text'>
PCI core handles save and restore of device state around reset, but
when using pci_set_power_state() we can unintentionally trigger a soft
reset of the device, where PCI core only restores the BAR state.  If
we're using vfio-pci's idle D3 support to try to put devices into low
power when unused, this might trigger a reset when the device is woken
for use.  Also power state management by the user, or within a guest,
can put the device into D3 power state with potentially limited
ability to restore the device if it should undergo a reset.  The PCI
spec does not define the extent of a soft reset and many devices
reporting soft reset on D3-&gt;D0 transition do not undergo a PCI config
space reset.  It's therefore assumed safe to unconditionally restore
the remainder of the state if the device indicates soft reset
support, even on a user initiated wakeup.

Implement a wrapper in vfio-pci to tag devices reporting PM reset
support, save their state on transitions into D3 and restore on
transitions back to D0.

Reported-by: Alexander Duyck &lt;alexander.h.duyck@linux.intel.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/pci: Mask buggy SR-IOV VF INTx support</title>
<updated>2018-09-25T19:01:27Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2018-09-25T19:01:27Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=db04264fe9bc0f2b62e036629f9afb530324b693'/>
<id>urn:sha1:db04264fe9bc0f2b62e036629f9afb530324b693</id>
<content type='text'>
The SR-IOV spec requires that VFs must report zero for the INTx pin
register as VFs are precluded from INTx support.  It's much easier for
the host kernel to understand whether a device is a VF and therefore
whether a non-zero pin register value is bogus than it is to do the
same in userspace.  Override the INTx count for such devices and
virtualize the pin register to provide a consistent view of the device
to the user.

As this is clearly a spec violation, warn about it to support hardware
validation, but also provide a known whitelist as it doesn't do much
good to continue complaining if the hardware vendor doesn't plan to
fix it.

Known devices with this issue: 8086:270c

Tested-by: Gage Eads &lt;gage.eads@intel.com&gt;
Reviewed-by: Ashok Raj &lt;ashok.raj@intel.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/pci: Fix potential memory leak in vfio_msi_cap_len</title>
<updated>2018-09-25T19:01:27Z</updated>
<author>
<name>Li Qiang</name>
<email>liq3ea@gmail.com</email>
</author>
<published>2018-09-25T19:01:27Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=30ea32ab1951c80c6113f300fce2c70cd12659e4'/>
<id>urn:sha1:30ea32ab1951c80c6113f300fce2c70cd12659e4</id>
<content type='text'>
Free allocated vdev-&gt;msi_perm in error path.

Signed-off-by: Li Qiang &lt;liq3ea@gmail.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/pci: Virtualize Maximum Read Request Size</title>
<updated>2017-10-02T18:39:10Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2017-10-02T18:39:10Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=cf0d53ba4947aad6e471491d5b20a567cbe92e56'/>
<id>urn:sha1:cf0d53ba4947aad6e471491d5b20a567cbe92e56</id>
<content type='text'>
MRRS defines the maximum read request size a device is allowed to
make.  Drivers will often increase this to allow more data transfer
with a single request.  Completions to this request are bound by the
MPS setting for the bus.  Aside from device quirks (none known), it
doesn't seem to make sense to set an MRRS value less than MPS, yet
this is a likely scenario given that user drivers do not have a
system-wide view of the PCI topology.  Virtualize MRRS such that the
user can set MRRS &gt;= MPS, but use MPS as the floor value that we'll
write to hardware.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/pci: Virtualize Maximum Payload Size</title>
<updated>2017-10-02T18:39:09Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2017-10-02T18:39:09Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=523184972b282cd9ca17a76f6ca4742394856818'/>
<id>urn:sha1:523184972b282cd9ca17a76f6ca4742394856818</id>
<content type='text'>
With virtual PCI-Express chipsets, we now see userspace/guest drivers
trying to match the physical MPS setting to a virtual downstream port.
Of course a lone physical device surrounded by virtual interconnects
cannot make a correct decision for a proper MPS setting.  Instead,
let's virtualize the MPS control register so that writes through to
hardware are disallowed.  Userspace drivers like QEMU assume they can
write anything to the device and we'll filter out anything dangerous.
Since mismatched MPS can lead to AER and other faults, let's add it
to the kernel side rather than relying on userspace virtualization to
handle it.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/pci: Fix handling of RC integrated endpoint PCIe capability size</title>
<updated>2017-07-27T16:39:33Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@redhat.com</email>
</author>
<published>2017-07-27T16:39:33Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=796b755066dd6254bfb6388fec901631e868d1c7'/>
<id>urn:sha1:796b755066dd6254bfb6388fec901631e868d1c7</id>
<content type='text'>
Root complex integrated endpoints do not have a link and therefore may
use a smaller PCIe capability in config space than we expect when
building our config map.  Add a case for these to avoid reporting an
erroneous overlap.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'pci-v4.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci</title>
<updated>2016-12-15T20:46:48Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-15T20:46:48Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=0ab7b12c49b6fbf2d4d0381374b82935f949be5f'/>
<id>urn:sha1:0ab7b12c49b6fbf2d4d0381374b82935f949be5f</id>
<content type='text'>
Pull PCI updates from Bjorn Helgaas:
 "PCI changes:

   - add support for PCI on ARM64 boxes with ACPI. We already had this
     for theoretical spec-compliant hardware; now we're adding quirks
     for the actual hardware (Cavium, HiSilicon, Qualcomm, X-Gene)

   - add runtime PM support for hotplug ports

   - enable runtime suspend for Intel UHCI that uses platform-specific
     wakeup signaling

   - add yet another host bridge registration interface. We hope this is
     extensible enough to subsume the others

   - expose device revision in sysfs for DRM

   - to avoid device conflicts, make sure any VF BAR updates are done
     before enabling the VF

   - avoid unnecessary link retrains for ASPM

   - allow INTx masking on Mellanox devices that support it

   - allow access to non-standard VPD for Chelsio devices

   - update Broadcom iProc support for PAXB v2, PAXC v2, inbound DMA,
     etc

   - update Rockchip support for max-link-speed

   - add NVIDIA Tegra210 support

   - add Layerscape LS1046a support

   - update R-Car compatibility strings

   - add Qualcomm MSM8996 support

   - remove some uninformative bootup messages"

* tag 'pci-v4.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (115 commits)
  PCI: Enable access to non-standard VPD for Chelsio devices (cxgb3)
  PCI: Expand "VPD access disabled" quirk message
  PCI: pciehp: Remove loading message
  PCI: hotplug: Remove hotplug core message
  PCI: Remove service driver load/unload messages
  PCI/AER: Log AER IRQ when claiming Root Port
  PCI/AER: Log errors with PCI device, not PCIe service device
  PCI/AER: Remove unused version macros
  PCI/PME: Log PME IRQ when claiming Root Port
  PCI/PME: Drop unused support for PMEs from Root Complex Event Collectors
  PCI: Move config space size macros to pci_regs.h
  x86/platform/intel-mid: Constify mid_pci_platform_pm
  PCI/ASPM: Don't retrain link if ASPM not possible
  PCI: iproc: Skip check for legacy IRQ on PAXC buses
  PCI: pciehp: Leave power indicator on when enabling already-enabled slot
  PCI: pciehp: Prioritize data-link event over presence detect
  PCI: rcar: Add gen3 fallback compatibility string for pcie-rcar
  PCI: rcar: Use gen2 fallback compatibility last
  PCI: rcar-gen2: Use gen2 fallback compatibility last
  PCI: rockchip: Move the deassert of pm/aclk/pclk after phy_init()
  ..
</content>
</entry>
<entry>
<title>PCI: Move config space size macros to pci_regs.h</title>
<updated>2016-12-12T16:05:22Z</updated>
<author>
<name>Wang Sheng-Hui</name>
<email>shhuiw@foxmail.com</email>
</author>
<published>2016-09-22T01:05:46Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=cc10385b6fde3e5d3a3edaabf10a4e211ee8fe72'/>
<id>urn:sha1:cc10385b6fde3e5d3a3edaabf10a4e211ee8fe72</id>
<content type='text'>
Move PCI configuration space size macros (PCI_CFG_SPACE_SIZE and
PCI_CFG_SPACE_EXP_SIZE) from drivers/pci/pci.h to
include/uapi/linux/pci_regs.h so they can be used by more drivers and
eliminate duplicate definitions.

[bhelgaas: Expand comment to include PCI-X details]
Signed-off-by: Wang Sheng-Hui &lt;shhuiw@foxmail.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>vfio/pci: Drop unnecessary pcibios_err_to_errno()</title>
<updated>2016-11-18T18:06:42Z</updated>
<author>
<name>Cao jin</name>
<email>caoj.fnst@cn.fujitsu.com</email>
</author>
<published>2016-11-18T11:47:38Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=f4cb410019388e450388ab001bb639b018558b71'/>
<id>urn:sha1:f4cb410019388e450388ab001bb639b018558b71</id>
<content type='text'>
As of commit d97ffe236894 ("PCI: Fix return value from
pci_user_{read,write}_config_*()") it's unnecessary to call
pcibios_err_to_errno() to fixup the return value from these functions.

pcibios_err_to_errno() already does simple passthrough of -errno values,
therefore no functional change is expected.

[aw: changelog]
Signed-off-by: Cao jin &lt;caoj.fnst@cn.fujitsu.com&gt;
Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
</content>
</entry>
</feed>
