linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/10] vfio_pci: wrap pci device as a mediated device
@ 2019-11-21 11:23 Liu Yi L
  2019-11-21 11:23 ` [PATCH v3 01/10] vfio_pci: move vfio_pci_is_vga/vfio_vga_disabled to header Liu Yi L
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Liu Yi L @ 2019-11-21 11:23 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, kvm

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. Besides the test purpose,
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"

Patch Overview:
 *) patch 1 ~ 7: code refactor for existing vfio-pci module
                 move the common codes from vfio_pci.c to
                 vfio_pci_common.c
 *) patch 8: add protection to perm_bits alloc/free
 *) patch 9: add vfio-mdev-pci sample driver
 *) patch 10: refine the sample driver

Links:
 *) Link of "vfio/mdev: IOMMU aware mediated device"
         https://lwn.net/Articles/780522/
 *) Previous versions:
         Patch v2: https://lkml.org/lkml/2019/9/6/115
         Patch v1: https://www.spinics.net/lists/kvm/msg188952.html
         RFC v3: https://lkml.org/lkml/2019/4/24/495
         RFC v2: https://lkml.org/lkml/2019/3/13/113
         RFC v1: https://lkml.org/lkml/2019/3/4/529
 *) may try it with the codes in below repo
    https://github.com/luxis1999/vfio-mdev-pci-sample-driver.git : v5.4-rc7-pci-mdev

Please feel free give your comments.

Thanks,
Yi Liu

Change log:
  patch v2 -> patch v3:
  - refresh the disable_idle_d3, disable_vga and nointxmask config
    according to user config in device open.
  - add a semaphore around the vfio-pci cap/ecap perm bits allocation/free
  - drop the non-singleton iommu group support to keep it simple as it's
    a sample driver for now.

  patch v1 -> patch v2:
  - the sample driver implementation refined
  - the sample driver can work on non-singleton iommu groups
  - the sample driver can work with vfio-pci, devices from a non-singleton
    group can either be bound to vfio-mdev-pci or vfio-pci, and the
    assignment of this group still follows current vfio assignment rule.

  RFC v3 -> patch v1:
  - split the patchset from 3 patches to 9 patches to better demonstrate
    the changes step by step

  rfc v2->v3:
  - use vfio-mdev-pci instead of vfio-pci-mdev
  - place the new driver under drivers/vfio/pci while define
    Kconfig in samples/Kconfig to clarify it is a sample driver

  rfc 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"


Alex Williamson (1):
  samples: refine vfio-mdev-pci driver

Liu Yi L (9):
  vfio_pci: move vfio_pci_is_vga/vfio_vga_disabled to header
  vfio_pci: refine user config reference in vfio-pci module
  vfio_pci: refine vfio_pci_driver reference in vfio_pci.c
  vfio_pci: make common functions be extern
  vfio_pci: duplicate vfio_pci.c
  vfio_pci: shrink vfio_pci_common.c
  vfio_pci: shrink vfio_pci.c
  vfio/pci: protect cap/ecap_perm bits alloc/free
  samples: add vfio-mdev-pci driver

 drivers/vfio/pci/Makefile           |    9 +-
 drivers/vfio/pci/vfio_mdev_pci.c    |  430 ++++++++++
 drivers/vfio/pci/vfio_pci.c         | 1460 +---------------------------------
 drivers/vfio/pci/vfio_pci_common.c  | 1471 +++++++++++++++++++++++++++++++++++
 drivers/vfio/pci/vfio_pci_config.c  |   33 +-
 drivers/vfio/pci/vfio_pci_private.h |   39 +
 samples/Kconfig                     |   11 +
 7 files changed, 2000 insertions(+), 1453 deletions(-)
 create mode 100644 drivers/vfio/pci/vfio_mdev_pci.c
 create mode 100644 drivers/vfio/pci/vfio_pci_common.c

-- 
2.7.4


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

end of thread, other threads:[~2020-01-06  5:29 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21 11:23 [PATCH v3 00/10] vfio_pci: wrap pci device as a mediated device Liu Yi L
2019-11-21 11:23 ` [PATCH v3 01/10] vfio_pci: move vfio_pci_is_vga/vfio_vga_disabled to header Liu Yi L
2019-11-21 11:23 ` [PATCH v3 02/10] vfio_pci: refine user config reference in vfio-pci module Liu Yi L
2019-11-21 11:23 ` [PATCH v3 03/10] vfio_pci: refine vfio_pci_driver reference in vfio_pci.c Liu Yi L
2019-12-15 22:46   ` Alex Williamson
2019-12-16 11:59     ` Liu, Yi L
2019-11-21 11:23 ` [PATCH v3 04/10] vfio_pci: make common functions be extern Liu Yi L
2019-11-21 11:23 ` [PATCH v3 05/10] vfio_pci: duplicate vfio_pci.c Liu Yi L
2019-11-21 11:23 ` [PATCH v3 06/10] vfio_pci: shrink vfio_pci_common.c Liu Yi L
2019-11-21 11:23 ` [PATCH v3 07/10] vfio_pci: shrink vfio_pci.c Liu Yi L
2019-11-21 11:23 ` [PATCH v3 08/10] vfio/pci: protect cap/ecap_perm bits alloc/free Liu Yi L
2019-12-15 22:46   ` Alex Williamson
2019-12-16 11:57     ` Liu, Yi L
2019-12-16 17:42       ` Alex Williamson
2020-01-06  5:29         ` Liu, Yi L
2019-11-21 11:23 ` [PATCH v3 09/10] samples: add vfio-mdev-pci driver Liu Yi L
2019-11-21 11:23 ` [PATCH v3 10/10] samples: refine " Liu Yi L
2019-12-09 11:49 ` [PATCH v3 00/10] vfio_pci: wrap pci device as a mediated device 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).