public inbox for iommu@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: "Liu, Yi L" <yi.l.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	kwankhede-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
Cc: kevin.tian-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org,
	yi.y.sun-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: [RFC v3 0/3] vfio_pci: wrap pci device as a mediated device
Date: Tue, 23 Apr 2019 20:14:37 +0800	[thread overview]
Message-ID: <1556021680-2911-1-git-send-email-yi.l.liu@intel.com> (raw)

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-mdev-pci. It is a sample driver, but
loactes in drivers/vfio/pci due to code sharing consideration.
The corresponding Kconfig definition is in samples/Kconfig.

https://lkml.org/lkml/2019/3/4/529

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"


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:
  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

  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 (3):
  vfio_pci: split vfio_pci.c into two source files
  vfio/pci: protect cap/ecap_perm bits alloc/free with atomic op
  smaples: add vfio-mdev-pci driver

 drivers/vfio/pci/Makefile           |    7 +-
 drivers/vfio/pci/common.c           | 1511 +++++++++++++++++++++++++++++++++++
 drivers/vfio/pci/vfio_mdev_pci.c    |  386 +++++++++
 drivers/vfio/pci/vfio_pci.c         | 1476 +---------------------------------
 drivers/vfio/pci/vfio_pci_config.c  |    9 +
 drivers/vfio/pci/vfio_pci_private.h |   27 +
 samples/Kconfig                     |   11 +
 7 files changed, 1962 insertions(+), 1465 deletions(-)
 create mode 100644 drivers/vfio/pci/common.c
 create mode 100644 drivers/vfio/pci/vfio_mdev_pci.c

-- 
2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: "Liu, Yi L" <yi.l.liu@intel.com>
To: alex.williamson@redhat.com, kwankhede@nvidia.com
Cc: kevin.tian@intel.com, kvm@vger.kernel.org,
	jean-philippe.brucker@arm.com, linux-kernel@vger.kernel.org,
	yamada.masahiro@socionext.com, yi.y.sun@intel.com,
	iommu@lists.linux-foundation.org
Subject: [RFC v3 0/3] vfio_pci: wrap pci device as a mediated device
Date: Tue, 23 Apr 2019 20:14:37 +0800	[thread overview]
Message-ID: <1556021680-2911-1-git-send-email-yi.l.liu@intel.com> (raw)
Message-ID: <20190423121437.r-UGYJwKKySUO7QLRSyrYMRO1syMG8c5RZPpqN1vFYU@z> (raw)

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-mdev-pci. It is a sample driver, but
loactes in drivers/vfio/pci due to code sharing consideration.
The corresponding Kconfig definition is in samples/Kconfig.

https://lkml.org/lkml/2019/3/4/529

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"


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:
  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

  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 (3):
  vfio_pci: split vfio_pci.c into two source files
  vfio/pci: protect cap/ecap_perm bits alloc/free with atomic op
  smaples: add vfio-mdev-pci driver

 drivers/vfio/pci/Makefile           |    7 +-
 drivers/vfio/pci/common.c           | 1511 +++++++++++++++++++++++++++++++++++
 drivers/vfio/pci/vfio_mdev_pci.c    |  386 +++++++++
 drivers/vfio/pci/vfio_pci.c         | 1476 +---------------------------------
 drivers/vfio/pci/vfio_pci_config.c  |    9 +
 drivers/vfio/pci/vfio_pci_private.h |   27 +
 samples/Kconfig                     |   11 +
 7 files changed, 1962 insertions(+), 1465 deletions(-)
 create mode 100644 drivers/vfio/pci/common.c
 create mode 100644 drivers/vfio/pci/vfio_mdev_pci.c

-- 
2.7.4

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

             reply	other threads:[~2019-04-23 12:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 12:14 Liu, Yi L [this message]
2019-04-23 12:14 ` [RFC v3 0/3] vfio_pci: wrap pci device as a mediated device Liu, Yi L
     [not found] ` <1556021680-2911-1-git-send-email-yi.l.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2019-04-23 12:14   ` [RFC v3 1/3] vfio_pci: split vfio_pci.c into two source files Liu, Yi L
2019-04-23 12:14     ` Liu, Yi L
2019-05-14 16:21     ` Alex Williamson
2019-04-23 12:14   ` [RFC v3 2/3] vfio/pci: protect cap/ecap_perm bits alloc/free with atomic op Liu, Yi L
2019-04-23 12:14     ` Liu, Yi L
2019-04-23 12:14 ` [RFC v3 3/3] smaples: add vfio-mdev-pci driver Liu, Yi L
2019-04-23 12:14   ` Liu, Yi L
2019-05-23  8:44 ` [RFC v3 0/3] vfio_pci: wrap pci device as a mediated device Liu, Yi L
2019-05-23 13:03   ` Alex Williamson
2019-06-09 13:40     ` Liu, Yi L

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1556021680-2911-1-git-send-email-yi.l.liu@intel.com \
    --to=yi.l.liu-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org \
    --cc=kevin.tian-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kwankhede-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org \
    --cc=yi.y.sun-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox