mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC v1 0/2] vfio/pci: wrap pci device as mdev with vfio-pci driver
@ 2019-03-03 12:57 Liu, Yi L
  2019-03-03 12:58 ` [RFC v1 1/2] vfio/pci: register vfio-pci driver to mdev framework Liu, Yi L
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Liu, Yi L @ 2019-03-03 12:57 UTC (permalink / raw)
  To: alex.williamson, kwankhede
  Cc: kevin.tian, baolu.lu, joro, jean-philippe.brucker, peterx,
	linux-kernel, yi.l.liu, yi.y.sun

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

To build such a meta driver. We have two choices.
a) add a vfio-pci alike sample driver under samples directory
b) add some extensions in vfio-pci driver to make it wrap pci
   device as mdev

For choice a), the new sample driver will have quite a few
duplicated code with vfio-pci driver since the new sample
driver also wants to virtualize the PCI config space. So
this choice may bring in extra maintain effort in kernel
and also looks strange since there will be a bunch of
duplicated code with vfio-pci driver.

For choice b), it may reuse the existing vfio-pci driver
by adding a new working mode. With this mode, user can wrap
a pci device as a mediated device by binding it with the
vfio-pci driver which works in the new mode. Thus can be used
to verify the ""vfio/mdev: IOMMU aware mediated device"
patchset.

This patchset is following choice b). However, we are open on
the direction of the implementation of this vfio-pci-like meta
driver. Pls feel free give your suggestions.

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/

Liu, Yi L (2):
  vfio/pci: register vfio-pci driver to mdev framework
  vfio/pci: expose only mdev interface if in pci-mdev mode

 drivers/vfio/pci/vfio_pci.c | 199 ++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 193 insertions(+), 6 deletions(-)

-- 
2.7.4


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

end of thread, other threads:[~2019-03-08 11:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-03 12:57 [RFC v1 0/2] vfio/pci: wrap pci device as mdev with vfio-pci driver Liu, Yi L
2019-03-03 12:58 ` [RFC v1 1/2] vfio/pci: register vfio-pci driver to mdev framework Liu, Yi L
2019-03-03 12:58 ` [RFC v1 2/2] vfio/pci: expose only mdev interface if in pci-mdev mode Liu, Yi L
2019-03-07 20:39 ` [RFC v1 0/2] vfio/pci: wrap pci device as mdev with vfio-pci driver Alex Williamson
2019-03-08 11:33   ` 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

all inboxes | Powered by JetHome®