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/20221123134832.429589-1-yi.l.liu@xxxxxxxxx/ Cc: Tony Krowiak <akrowiak@xxxxxxxxxxxxx> Cc: Halil Pasic <pasic@xxxxxxxxxxxxx> Cc: Jason Herne <jjherne@xxxxxxxxxxxxx> Cc: linux-s390@xxxxxxxxxxxxxxx Cc: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx> Cc: Zhi Wang <zhi.a.wang@xxxxxxxxx> Cc: Kevin Tian <kevin.tian@xxxxxxxxx> Cc: intel-gvt-dev@xxxxxxxxxxxxxxxxxxxxx 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(-) -- 2.34.1