[PATCH v6 0/4] Add Mediated device support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series adds Mediated device support to Linux host kernel. Purpose
of this series is to provide a common interface for mediated device
management that can be used by different devices. This series introduces
Mdev core module that create and manage mediated devices, VFIO based driver
for mediated PCI devices that are created by Mdev core module and update
VFIO type1 IOMMU module to support mediated devices.

What's new in v6?
- Removed per mdev_device lock for registration callbacks. Vendor driver should
  implement locking if they need to serialize registration callbacks.
- Added mapped region tracking logic and invalidation function to be used by
  vendor driver.
- Moved vfio_pin_pages and vfio_unpin_pages API from IOMMU type1 driver to vfio
  driver. Added callbacks to vfio ops structure to support pin and unpin APIs in
  backend iommu module.
- Used uuid_le_to_bin() to parse UUID string and convert to bin. This requires
  following commits from linux master branch:
* commit bc9dc9d5eec908806f1b15c9ec2253d44dcf7835 :
	lib/uuid.c: use correct offset in uuid parser
* commit 2b1b0d66704a8cafe83be7114ec4c15ab3a314ad :
	lib/uuid.c: introduce a few more generic helpers
- Requires below commits from linux master branch for mmap region fault handler
  that uses remap_pfn_range() to setup EPT properly.
* commit add6a0cd1c5ba51b201e1361b05a5df817083618
	KVM: MMU: try to fix up page faults before giving up
* commit 92176a8ede577d0ff78ab3298e06701f67ad5f51 :
	KVM: MMU: prepare to support mapping of VM_IO and VM_PFNMAP frames

Tested:
- Single vGPU VM
- Multiple vGPU VMs on same GPU


Thanks,
Kirti


Kirti Wankhede (4):
  vfio: Mediated device Core driver
  vfio: VFIO driver for mediated PCI device
  vfio iommu: Add support for mediated devices
  docs: Add Documentation for Mediated devices

 Documentation/vfio-mediated-device.txt | 235 ++++++++++++
 drivers/vfio/Kconfig                   |   1 +
 drivers/vfio/Makefile                  |   1 +
 drivers/vfio/mdev/Kconfig              |  18 +
 drivers/vfio/mdev/Makefile             |   6 +
 drivers/vfio/mdev/mdev_core.c          | 676 +++++++++++++++++++++++++++++++++
 drivers/vfio/mdev/mdev_driver.c        | 142 +++++++
 drivers/vfio/mdev/mdev_private.h       |  33 ++
 drivers/vfio/mdev/mdev_sysfs.c         | 269 +++++++++++++
 drivers/vfio/mdev/vfio_mpci.c          | 536 ++++++++++++++++++++++++++
 drivers/vfio/pci/vfio_pci_private.h    |   6 -
 drivers/vfio/pci/vfio_pci_rdwr.c       |   1 +
 drivers/vfio/vfio.c                    |  82 ++++
 drivers/vfio/vfio_iommu_type1.c        | 499 +++++++++++++++++++++---
 include/linux/mdev.h                   | 236 ++++++++++++
 include/linux/vfio.h                   |  20 +-
 16 files changed, 2707 insertions(+), 54 deletions(-)
 create mode 100644 Documentation/vfio-mediated-device.txt
 create mode 100644 drivers/vfio/mdev/Kconfig
 create mode 100644 drivers/vfio/mdev/Makefile
 create mode 100644 drivers/vfio/mdev/mdev_core.c
 create mode 100644 drivers/vfio/mdev/mdev_driver.c
 create mode 100644 drivers/vfio/mdev/mdev_private.h
 create mode 100644 drivers/vfio/mdev/mdev_sysfs.c
 create mode 100644 drivers/vfio/mdev/vfio_mpci.c
 create mode 100644 include/linux/mdev.h

-- 
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux