All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] VFIO SR-IOV support
@ 2016-06-09 12:09 Ilya Lesokhin
  2016-06-09 12:09 ` [PATCH 1/4] VFIO: Probe new devices in a live VFIO group with the VFIO driver Ilya Lesokhin
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Ilya Lesokhin @ 2016-06-09 12:09 UTC (permalink / raw)
  To: kvm, linux-pci
  Cc: bhelgaas, alex.williamson, noaos, haggaie, ogerlitz, liranl, ilyal

Changes from RFC V2:
        1. pci_disable_sriov() is now called from a workqueue
        To avoid the situation where a process is blocked
        in pci_disable_sriov() wating for itself to relase the VFs.
        2. a mutex was added to synchronize calls to
        pci_enable_sriov() and pci_disable_sriov()

Changes from RFC V1:
        Due to the security concern raised in RFC V1, we add two patches
        to make sure the VFs belong to the same IOMMU group as
        the PF and are probed by VFIO.

Today the QEMU hypervisor allows assigning a physical device to a VM,
facilitating driver development. However, it does not support enabling
SR-IOV by the VM kernel driver. Our goal is to implement such support,
allowing developers working on SR-IOV physical function drivers to work
inside VMs as well.

This patch series implements the kernel side of our solution.  It extends
the VFIO driver to support the PCIE SRIOV extended capability with
following features:
1. The ability to probe SR-IOV BAR sizes.
2. The ability to enable and disable SR-IOV.

This patch series is going to be used by QEMU to expose SR-IOV capabilities
to VM. We already have an early prototype based on Knut Omang's patches for
SR-IOV[1].

Limitations:
1. Per SR-IOV spec section 3.3.12, PFs are required to support
4-KB, 8-KB, 64-KB, 256-KB, 1-MB, and 4-MB page sizes.
Unfourtently the kernel currently initializes the System Page Size register once
and assumes it doesn't change therefore we cannot allow guests to change this
register at will. We currently map both the Supported Page sizes and
System Page Size as virtualized and read only in violation of the spec.
In practice this is not an issue since both the hypervisor and the
guest typically select the same System Page Size.

[1] https://github.com/knuto/qemu/tree/sriov_patches_v6

Ilya Lesokhin (4):
  VFIO: Probe new devices in a live VFIO group with the VFIO driver
  IOMMU: Force the VFs of an untrusted PF device to be in the PFs IOMMU
    group
  PCI: Expose iov_set_numvfs and iov_resource_size for modules.
  VFIO: Add support for SR-IOV extended capablity

 drivers/iommu/iommu.c               |   4 +
 drivers/pci/iov.c                   |   4 +-
 drivers/vfio/pci/vfio_pci.c         |   4 +
 drivers/vfio/pci/vfio_pci_config.c  | 208 +++++++++++++++++++++++++++++++++---
 drivers/vfio/pci/vfio_pci_private.h |   1 +
 drivers/vfio/vfio.c                 |  18 +++-
 include/linux/pci.h                 |   7 ++
 7 files changed, 224 insertions(+), 22 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-06-16 12:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-09 12:09 [PATCH 0/4] VFIO SR-IOV support Ilya Lesokhin
2016-06-09 12:09 ` [PATCH 1/4] VFIO: Probe new devices in a live VFIO group with the VFIO driver Ilya Lesokhin
2016-06-09 22:21   ` Alex Williamson
2016-06-13  6:33     ` Ilya Lesokhin
2016-06-13 16:02       ` Alex Williamson
2016-06-09 12:09 ` [PATCH 2/4] IOMMU: Force the VFs of an untrusted PF device to be in the PFs IOMMU group Ilya Lesokhin
2016-06-09 12:56   ` kbuild test robot
2016-06-09 15:21   ` kbuild test robot
2016-06-09 22:21   ` Alex Williamson
2016-06-13  7:08     ` Ilya Lesokhin
2016-06-13 16:00       ` Alex Williamson
2016-06-16 12:46         ` Ilya Lesokhin
2016-06-09 12:09 ` [PATCH 3/4] PCI: Expose iov_set_numvfs and iov_resource_size for modules Ilya Lesokhin
2016-06-09 12:27   ` kbuild test robot
2016-06-09 12:09 ` [PATCH 4/4] VFIO: Add support for SR-IOV extended capablity Ilya Lesokhin
2016-06-09 12:09 ` [PATCH 4/4] VFIO: Add support for SRIOV " Ilya Lesokhin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.