Skip to content

Make mdev driver dma_unmap callback tolerant to unmaps come before device open

Yi Liu kvm linux-s390 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 posting 2/21 patch 0 repliesNew
  2. v2 Latest2 patches 1 replyIn review
  3. v1 posting 1/22 patches 19 repliesSuperseded

Changes in v2 from the cover letter

- Refine the cover letter and commit message of patch 0001 (Kevin)
- Rename patch 0001 to better fit the commit message
- Add r-b from Zhi for patch 0001
- tweak iova range test to assume page-aligned for patch 0002 (Jason)
- Remove break so all queues within range are removed for patch 0002 (Kevin)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2i915/gvt: Move gvt mapping cache initialization to vGPU creationdrivers/gpu/drm/i915/gvt/gvt.h drivers/gpu/drm/i915/gvt/kvmgt.c drivers/gpu/drm/i915/gvt/vgpu.c+6 -50 replies
2/2vfio/ap: validate iova during dma_unmap and trigger irq disabledrivers/s390/crypto/vfio_ap_ops.c+17 -10 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchZhi Wang
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [iommufd PATCH v2 0/2] Make mdev driver dma_unmap callback tolerant to unmaps come before device open

Jason's "Connect VFIO to IOMMUFD" introduces vfio iommufd compat mode. Under this mode, vfio_iommufd_bind() creates an access which has an unmap callback, which can be called immediately. This means mdev drivers may receive unmap requests before the mdev is opened. For now, there are only three drivers (gvt, vfio-ap and vfio-ccw) providing dma_unmap(). vfio-ccw is fine with such requests. While gvt-g and vfio-ap may have potential problem with such requests due to internal implementation. This series tries to enhance the two drivers.

This series is based on Jason's below branch.

https://github.com/jgunthorpe/linux/tree/iommufd

(commit: 41973418f6c8c241ed5647d1408d5b917f24dfd8)

Change:
v2:
- Refine the cover letter and commit message of patch 0001 (Kevin)
- Rename patch 0001 to better fit the commit message
- Add r-b from Zhi for patch 0001
- tweak iova range test to assume page-aligned for patch 0002 (Jason)
- Remove break so all queues within range are removed for patch 0002 (Kevin)

v1: https://lore.kernel.org/kvm/[email protected]/

Cc Tony Krowiak <[email protected]>
Cc Halil Pasic <[email protected]>
Cc Jason Herne <[email protected]>
Cc Zhenyu Wang <[email protected]>
Cc Zhi Wang <[email protected]>
Cc Kevin Tian <[email protected]>

Regards,
Yi Liu

Matthew Rosato (1):
vfio/ap: validate iova during dma_unmap and trigger irq disable

Yi Liu (1):
i915/gvt: Move gvt mapping cache initialization to vGPU creation

 drivers/gpu/drm/i915/gvt/gvt.h    |  2 ++
 drivers/gpu/drm/i915/gvt/kvmgt.c  |  7 ++-----
 drivers/gpu/drm/i915/gvt/vgpu.c   |  2 ++
 drivers/s390/crypto/vfio_ap_ops.c | 18 +++++++++++++++++-
 4 files changed, 23 insertions(+), 6 deletions(-)
Signature · 1 line
2.34.1