linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC v2 0/2] vfio/pci: wrap pci device as a mediated device
@ 2019-03-12  8:18 Liu, Yi L
  2019-03-12  8:18 ` [RFC v2 1/2] vfio/pci: export common symbols in vfio-pci Liu, Yi L
  2019-03-12  8:18 ` [RFC v2 2/2] vfio/pci: add vfio-pci-mdev driver Liu, Yi L
  0 siblings, 2 replies; 11+ messages in thread
From: Liu, Yi L @ 2019-03-12  8:18 UTC (permalink / raw)
  To: alex.williamson, kwankhede
  Cc: kevin.tian, baolu.lu, yi.l.liu, yi.y.sun, joro,
	jean-philippe.brucker, peterx, linux-kernel

This patchset aims to add a vfio-pci-like meta driver as a demo
user of the vfio changes introduced in "vfio/mdev: IOMMU aware
mediated device" patchset from Baolu Lu.

Previous RFC v1 has given two proposals and the discussion could
be found in following link. Per the comments, this patchset adds
a separate driver named vfio-pci-mdev. It leverages some symbols
from existing vfio-pci. When device is bound to vfio-pci-mdev
driver, it would be wrapped as a mediated device. And user should
create a mdev on this device via the mdev interface exposed to
user.
https://lkml.org/lkml/2019/3/4/529

The new vfio-pci-mdev driver could be used to verify the vfio
changes in "vfio/mdev: IOMMU aware mediated device". Besides,
per Alex's comments, it could also be a good base driver for
experimenting with device specific mdev migration.

Specific interface tested in this proposal:

*) int mdev_set_iommu_device(struct device *dev,
				struct device *iommu_device)
   introduced in the patch as below:
   "[PATCH v5 6/8] vfio/mdev: Add iommu related member in mdev_device"


Links:
*) Link of "vfio/mdev: IOMMU aware mediated device"
	https://lwn.net/Articles/780522/

Please feel free give your comments.

Thanks,
Yi Liu

Change log:
  v1->v2:
  - instead of adding kernel option to existing vfio-pci
    module in v1, v2 follows Alex's suggestion to add a
    separate vfio-pci-mdev module.
  - new patchset subject: "vfio/pci: wrap pci device as a mediated device"

Liu, Yi L (2):
  vfio/pci: export common symbols in vfio-pci
  vfio/pci: add vfio-pci-mdev driver

 drivers/vfio/pci/Kconfig            |  11 ++
 drivers/vfio/pci/Makefile           |   5 +
 drivers/vfio/pci/vfio_pci.c         | 101 ++++++-----
 drivers/vfio/pci/vfio_pci_mdev.c    | 334 ++++++++++++++++++++++++++++++++++++
 drivers/vfio/pci/vfio_pci_private.h |  17 ++
 5 files changed, 428 insertions(+), 40 deletions(-)
 create mode 100644 drivers/vfio/pci/vfio_pci_mdev.c

-- 
2.7.4


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

end of thread, other threads:[~2019-03-27  8:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12  8:18 [RFC v2 0/2] vfio/pci: wrap pci device as a mediated device Liu, Yi L
2019-03-12  8:18 ` [RFC v2 1/2] vfio/pci: export common symbols in vfio-pci Liu, Yi L
2019-03-19 18:14   ` Alex Williamson
2019-03-20 11:49     ` Liu, Yi L
2019-03-20 19:22       ` Alex Williamson
2019-03-23 11:06         ` Liu, Yi L
2019-03-25 18:17           ` Alex Williamson
2019-03-26 12:37             ` Liu, Yi L
2019-03-26 15:35               ` Alex Williamson
2019-03-27  8:42                 ` Liu, Yi L
2019-03-12  8:18 ` [RFC v2 2/2] vfio/pci: add vfio-pci-mdev driver Liu, Yi L

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).