qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC v6-based v1 0/5] refine mdev framework
@ 2016-08-16  8:14 Jike Song
  2016-08-16  8:14 ` [Qemu-devel] [RFC v6-based v1 1/5] mdev: create separate device for parent_device Jike Song
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Jike Song @ 2016-08-16  8:14 UTC (permalink / raw)
  To: alex.williamson, kwankhede, cjia
  Cc: qemu-devel, kvm, bjsdjshi, kevin.tian, guangrong.xiao, zhenyuw,
	jike.song, pbonzini, kraxel


This patchset is based on NVidia's "Add Mediated device support" series, version 6:

	http://www.spinics.net/lists/kvm/msg136472.html


Background:

	The patchset from NVidia introduced the Mediated Device support to
	Linux/VFIO. With that series, one can create virtual devices (supporting
	by underlying physical device and vendor driver), and assign them to
	userspace like QEMU/KVM, in the same way as device assignment via VFIO.

	Based on that, NVidia and Intel implemented their vGPU solutions, IBM
	implemented its CCW pass-through.  However, there are limitations
	imposed by current (v6 in particular) mdev framework: the mdev must be
	represented as a PCI device, several vfio capabilities such as
	sparse mmap are not possible, and so forth.

	This series aims to address above limitations and simplify the implementation.


Key Changes:

	- An independent "struct device" was introduced to parent_device, thus
	  a hierarchy in driver core is formed with physical device, parent device
	  and mdev device;

	- Leveraging the mechanism and APIs provided by Linux driver core, it
	  is now safe to remove all refcnts and locks;

	- vfio_mpci (later renamed to vfio_mdev) was made BUS-agnostic: all
	  PCI-specific logic was removed, accesses from userspace are now
	  passed to vendor driver directly, thus guaranteed that full VFIO
	  capabilities provided: e.g. dynamic regions, sparse mmap, etc.;

	  With vfio_mdev being BUS-agnostic, it is enough to have only one
	  driver for all mdev devices;

	- UUID was removed from the interface between mdev and vendor driver;


TODO

	remove mdev stuff from vfio.h
	update doc



Jike Song (3):
  mdev: remove uuid from parent_ops
  vfio_mpci: remove PCI-specific logic
  rename 'vfio_mpci' to 'vfio_mdev' since it is now BUS-agnostic

Xiao Guangrong (2):
  mdev: create separate device for parent_device
  mdev: drop management information and utilize driver-core instead

 drivers/vfio/mdev/Kconfig           |  10 +-
 drivers/vfio/mdev/Makefile          |   5 +-
 drivers/vfio/mdev/mdev_core.c       | 483 +++++---------------------------
 drivers/vfio/mdev/mdev_private.h    |   9 +-
 drivers/vfio/mdev/mdev_sysfs.c      |  82 ++----
 drivers/vfio/mdev/vfio_mdev.c       | 168 +++++++++++
 drivers/vfio/mdev/vfio_mpci.c       | 536 ------------------------------------
 drivers/vfio/pci/vfio_pci_private.h |   6 +
 include/linux/mdev.h                |  87 ++----
 include/linux/vfio.h                |   7 -
 10 files changed, 302 insertions(+), 1091 deletions(-)
 create mode 100644 drivers/vfio/mdev/vfio_mdev.c
 delete mode 100644 drivers/vfio/mdev/vfio_mpci.c

-- 
1.9.1

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

end of thread, other threads:[~2016-08-19 17:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-16  8:14 [Qemu-devel] [RFC v6-based v1 0/5] refine mdev framework Jike Song
2016-08-16  8:14 ` [Qemu-devel] [RFC v6-based v1 1/5] mdev: create separate device for parent_device Jike Song
2016-08-16  8:14 ` [Qemu-devel] [RFC v6-based v1 2/5] mdev: drop management information and utilize driver-core instead Jike Song
2016-08-16  8:14 ` [Qemu-devel] [RFC v6-based v1 3/5] mdev: remove uuid from parent_ops Jike Song
2016-08-16  8:14 ` [Qemu-devel] [RFC v6-based v1 4/5] vfio_mpci: remove PCI-specific logic Jike Song
2016-08-16  8:14 ` [Qemu-devel] [RFC v6-based v1 5/5] rename 'vfio_mpci' to 'vfio_mdev' since it is now BUS-agnostic Jike Song
2016-08-17  8:58 ` [Qemu-devel] [RFC v6-based v1 0/5] refine mdev framework Dong Jia
2016-08-17 10:09   ` Neo Jia
2016-08-18  8:42     ` Dong Jia
2016-08-18 18:25       ` Alex Williamson
2016-08-19 17:29         ` Kirti Wankhede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).