1. 25 4月, 2018 2 次提交
    • A
      PCI/IOV: Add pci-pf-stub driver for PFs that only enable VFs · a8ccf8a6
      Alexander Duyck 提交于
      Some SR-IOV PF devices provide no functionality other than acting as a
      means of enabling VFs.  For these devices, we want to enable the VFs and
      assign them to guest virtual machines, but there's no need to have a driver
      for the PF itself.
      
      Add a new pci-pf-stub driver to claim those PF devices and provide the
      generic VF enable functionality.  An administrator can use the sysfs
      "sriov_numvfs" file to enable VFs, then assign them to guests.
      
      For now I only have one example ID provided by Amazon in terms of devices
      that require this functionality.  The general idea is that in the future we
      will see other devices added as vendors come up with devices where the PF
      is more or less just a lightweight shim used to allocate VFs.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      [bhelgaas: changelog]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NGreg Rose <gvrose8192@gmail.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      a8ccf8a6
    • A
      PCI/IOV: Add pci_sriov_configure_simple() · 8effc395
      Alexander Duyck 提交于
      SR-IOV (Single Root I/O Virtualization) is an optional PCIe capability (see
      PCIe r4.0, sec 9).  A PCIe Function with the SR-IOV capability is referred
      to as a PF (Physical Function).  If SR-IOV is enabled on the PF, several
      VFs (Virtual Functions) may be created.  The VFs can be individually
      assigned to virtual machines, which allows them to share a single hardware
      device while being isolated from each other.
      
      Some SR-IOV devices have resources such as queues and interrupts that must
      be set up in the PF before enabling the VFs, so they require a PF driver to
      do that.
      
      Other SR-IOV devices don't require any PF setup before enabling VFs.  Add a
      pci_sriov_configure_simple() interface so PF drivers for such devices can
      use it without repeating the VF-enabling code.
      Tested-by: NMark Rustad <mark.d.rustad@intel.com>
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      [bhelgaas: changelog, comment]
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NGreg Rose <gvrose8192@gmail.com>
      Reviewed-by: Christoph Hellwig <hch@lst.de>:wq
      8effc395
  2. 14 4月, 2018 7 次提交
  3. 13 4月, 2018 2 次提交
  4. 12 4月, 2018 29 次提交