intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH v3 0/6] vfio: Make emulated devices prepared for vfio device cdev
@ 2023-03-27  9:33 Yi Liu
  2023-03-27  9:33 ` [Intel-gfx] [PATCH v3 1/6] iommu/iommufd: Pass iommufd_ctx pointer in iommufd_get_ioas() Yi Liu
                   ` (13 more replies)
  0 siblings, 14 replies; 21+ messages in thread
From: Yi Liu @ 2023-03-27  9:33 UTC (permalink / raw)
  To: alex.williamson, jgg, kevin.tian
  Cc: mjrosato, jasowang, xudong.hao, peterx, terrence.xu, chao.p.peng,
	linux-s390, yi.l.liu, kvm, lulu, yanting.jiang, joro, nicolinc,
	yan.y.zhao, intel-gfx, eric.auger, intel-gvt-dev, yi.y.sun,
	cohuck, shameerali.kolothum.thodi, suravee.suthikulpanit,
	robin.murphy

The .bind_iommufd op of vfio emulated devices are either empty or does
nothing. This is different with the vfio physical devices, to add vfio
device cdev, need to make them act the same.

This series first makes the .bind_iommufd op of vfio emulated devices
to create iommufd_access, this introduces a new iommufd API. Then let
the driver that does not provide .bind_iommufd op to use the vfio emulated
iommufd op set. This makes all vfio device drivers have consistent iommufd
operations, which is good for adding new device uAPIs in the device cdev
series.

Change log:

v3:
 - Use iommufd_get_ioas() for ioas get, hence patch 01 is added to modify
   the input parameter of iommufd_get_ioas(). (Jason)
 - Add r-b from Jason and Kevin
 - Add t-b from Terrence Xu

v2: https://lore.kernel.org/kvm/20230316121526.5644-1-yi.l.liu@intel.com/
 - Add r-b from Kevin and Jason
 - Refine patch 01 per comments from Jason and Kevin

v1: https://lore.kernel.org/kvm/20230308131340.459224-1-yi.l.liu@intel.com/

Thanks,
        Yi Liu
    
Nicolin Chen (1):
  iommufd: Create access in vfio_iommufd_emulated_bind()

Yi Liu (5):
  iommu/iommufd: Pass iommufd_ctx pointer in iommufd_get_ioas()
  vfio-iommufd: No need to record iommufd_ctx in vfio_device
  vfio-iommufd: Make vfio_iommufd_emulated_bind() return iommufd_access
    ID
  vfio/mdev: Uses the vfio emulated iommufd ops set in the mdev sample
    drivers
  vfio: Check the presence for iommufd callbacks in
    __vfio_register_dev()

 drivers/iommu/iommufd/device.c          | 55 +++++++++++++++----------
 drivers/iommu/iommufd/ioas.c            | 14 +++----
 drivers/iommu/iommufd/iommufd_private.h |  4 +-
 drivers/iommu/iommufd/selftest.c        | 14 ++++---
 drivers/iommu/iommufd/vfio_compat.c     |  2 +-
 drivers/vfio/iommufd.c                  | 37 ++++++++---------
 drivers/vfio/vfio_main.c                |  5 ++-
 include/linux/iommufd.h                 |  5 ++-
 include/linux/vfio.h                    |  1 -
 samples/vfio-mdev/mbochs.c              |  3 ++
 samples/vfio-mdev/mdpy.c                |  3 ++
 samples/vfio-mdev/mtty.c                |  3 ++
 12 files changed, 85 insertions(+), 61 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2023-03-31 16:55 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27  9:33 [Intel-gfx] [PATCH v3 0/6] vfio: Make emulated devices prepared for vfio device cdev Yi Liu
2023-03-27  9:33 ` [Intel-gfx] [PATCH v3 1/6] iommu/iommufd: Pass iommufd_ctx pointer in iommufd_get_ioas() Yi Liu
2023-03-27 16:35   ` Jason Gunthorpe
2023-03-28  5:23   ` Tian, Kevin
2023-03-27  9:33 ` [Intel-gfx] [PATCH v3 2/6] iommufd: Create access in vfio_iommufd_emulated_bind() Yi Liu
2023-03-29 19:59   ` Jason Gunthorpe
2023-03-31  8:16     ` Tian, Kevin
2023-03-31 16:55       ` Jason Gunthorpe
2023-03-27  9:33 ` [Intel-gfx] [PATCH v3 3/6] vfio-iommufd: No need to record iommufd_ctx in vfio_device Yi Liu
2023-03-27  9:33 ` [Intel-gfx] [PATCH v3 4/6] vfio-iommufd: Make vfio_iommufd_emulated_bind() return iommufd_access ID Yi Liu
2023-03-27  9:33 ` [Intel-gfx] [PATCH v3 5/6] vfio/mdev: Uses the vfio emulated iommufd ops set in the mdev sample drivers Yi Liu
2023-03-27  9:33 ` [Intel-gfx] [PATCH v3 6/6] vfio: Check the presence for iommufd callbacks in __vfio_register_dev() Yi Liu
2023-03-27 11:23 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for vfio: Make emulated devices prepared for vfio device cdev (rev4) Patchwork
2023-03-27 11:23 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-03-27 11:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-03-27 15:25 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-03-27 17:47 ` [Intel-gfx] [PATCH v3 0/6] vfio: Make emulated devices prepared for vfio device cdev Nicolin Chen
2023-03-29 19:47 ` Jason Gunthorpe
2023-03-30 19:21   ` Alex Williamson
2023-03-31  3:13 ` Jiang, Yanting
2023-03-31  4:57 ` Jiang, Yanting

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