All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFT][PATCH v1 0/6] Update vfio_pin/unpin_pages API
@ 2022-06-16 23:52 ` Nicolin Chen
  0 siblings, 0 replies; 75+ messages in thread
From: Nicolin Chen @ 2022-06-16 23:52 UTC (permalink / raw)
  To: kwankhede, corbet, hca, gor, agordeev, borntraeger, svens,
	zhenyuw, zhi.a.wang, jani.nikula, joonas.lahtinen, rodrigo.vivi,
	tvrtko.ursulin, airlied, daniel, farman, mjrosato, pasic,
	vneethv, oberpar, freude, akrowiak, jjherne, alex.williamson,
	cohuck, jgg, kevin.tian
  Cc: jchrist, kvm, linux-doc, linux-kernel, linux-s390, intel-gvt-dev,
	intel-gfx, dri-devel

This is a preparatory series for IOMMUFD v2 patches. It prepares for
replacing vfio_iommu_type1 implementations of vfio_pin/unpin_pages()
with IOMMUFD version.

There's a gap between these two versions: the vfio_iommu_type1 version
inputs a non-contiguous PFN list and outputs another PFN list for the
pinned physical page list, while the IOMMUFD version only supports a
contiguous address input by accepting the starting IO virtual address
of a set of pages to pin and by outputting to a physical page list.

The nature of existing callers mostly aligns with the IOMMUFD version,
except s390's vfio_ccw_cp code where some additional change is needed
along with this series. Overall, updating to "iova" and "phys_page"
does improve the caller side to some extent.

Also fix a misuse of physical address and virtual address in the s390's
crypto code. And update the input naming at the adjacent vfio_dma_rw().

This is on github:
https://github.com/nicolinc/iommufd/commits/vfio_pin_pages

Request for testing: I only did build for s390 and i915 code, so it'd
be nice to have people who have environment to run sanity accordingly.

Thanks!

Nicolin Chen (6):
  vfio/ap: Pass in physical address of ind to ap_aqic()
  vfio/ccw: Only pass in contiguous pages
  vfio: Pass in starting IOVA to vfio_pin/unpin_pages API
  vfio: Rename user_iova of vfio_dma_rw()
  vfio/ccw: Add kmap_local_page() for memcpy
  vfio: Replace phys_pfn with phys_page for vfio_pin_pages()

 .../driver-api/vfio-mediated-device.rst       |  6 +-
 arch/s390/include/asm/ap.h                    |  6 +-
 drivers/gpu/drm/i915/gvt/kvmgt.c              | 44 ++++-----
 drivers/s390/cio/vfio_ccw_cp.c                | 90 ++++++++++++++-----
 drivers/s390/crypto/ap_queue.c                |  2 +-
 drivers/s390/crypto/vfio_ap_ops.c             | 21 ++---
 drivers/vfio/vfio.c                           | 38 ++++----
 drivers/vfio/vfio.h                           |  6 +-
 drivers/vfio/vfio_iommu_type1.c               | 34 +++----
 include/linux/vfio.h                          |  8 +-
 10 files changed, 142 insertions(+), 113 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2022-06-24 22:42 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 23:52 [RFT][PATCH v1 0/6] Update vfio_pin/unpin_pages API Nicolin Chen
2022-06-16 23:52 ` Nicolin Chen
2022-06-16 23:52 ` [RFT][PATCH v1 1/6] vfio/ap: Pass in physical address of ind to ap_aqic() Nicolin Chen
2022-06-16 23:52   ` Nicolin Chen
2022-06-20 10:00   ` Harald Freudenberger
2022-06-20 10:00     ` Harald Freudenberger
2022-06-21 21:01     ` Nicolin Chen
2022-06-21 21:01       ` [Intel-gfx] " Nicolin Chen
2022-06-21 21:01       ` Nicolin Chen
2022-06-16 23:52 ` [RFT][PATCH v1 2/6] vfio/ccw: Only pass in contiguous pages Nicolin Chen
2022-06-16 23:52   ` Nicolin Chen
2022-06-16 23:52 ` [RFT][PATCH v1 3/6] vfio: Pass in starting IOVA to vfio_pin/unpin_pages API Nicolin Chen
2022-06-16 23:52   ` Nicolin Chen
2022-06-17  8:42   ` Christoph Hellwig
2022-06-17  8:42     ` [Intel-gfx] " Christoph Hellwig
2022-06-17 21:57     ` Nicolin Chen
2022-06-17 21:57       ` Nicolin Chen
2022-06-22  1:18     ` Nicolin Chen
2022-06-22  1:18       ` [Intel-gfx] " Nicolin Chen
2022-06-22  1:18       ` Nicolin Chen
2022-06-16 23:52 ` [RFT][PATCH v1 4/6] vfio: Rename user_iova of vfio_dma_rw() Nicolin Chen
2022-06-16 23:52   ` Nicolin Chen
2022-06-16 23:52 ` [RFT][PATCH v1 5/6] vfio/ccw: Add kmap_local_page() for memcpy Nicolin Chen
2022-06-16 23:52   ` Nicolin Chen
2022-06-17  8:44   ` Christoph Hellwig
2022-06-17  8:44     ` [Intel-gfx] " Christoph Hellwig
2022-06-17 21:58     ` Nicolin Chen
2022-06-17 21:58       ` Nicolin Chen
2022-06-20  2:57     ` Jason Gunthorpe
2022-06-20  2:57       ` [Intel-gfx] " Jason Gunthorpe
2022-06-20  2:57       ` Jason Gunthorpe
2022-06-20  6:32       ` Christoph Hellwig
2022-06-20  6:32         ` [Intel-gfx] " Christoph Hellwig
2022-06-20 15:39         ` Jason Gunthorpe
2022-06-20 15:39           ` [Intel-gfx] " Jason Gunthorpe
2022-06-20 15:39           ` Jason Gunthorpe
2022-06-21 21:21         ` Nicolin Chen
2022-06-21 21:21           ` [Intel-gfx] " Nicolin Chen
2022-06-21 21:21           ` Nicolin Chen
2022-06-24 13:56           ` Jason Gunthorpe
2022-06-24 13:56             ` [Intel-gfx] " Jason Gunthorpe
2022-06-24 13:56             ` Jason Gunthorpe
2022-06-24 19:22             ` Nicolin Chen
2022-06-24 19:22               ` Nicolin Chen
2022-06-24 19:30               ` Jason Gunthorpe
2022-06-24 19:30                 ` [Intel-gfx] " Jason Gunthorpe
2022-06-24 19:30                 ` Jason Gunthorpe
2022-06-24 20:12                 ` Nicolin Chen
2022-06-24 20:12                   ` Nicolin Chen
2022-06-24 22:42                   ` Jason Gunthorpe
2022-06-24 22:42                     ` [Intel-gfx] " Jason Gunthorpe
2022-06-24 22:42                     ` Jason Gunthorpe
2022-06-16 23:52 ` [RFT][PATCH v1 6/6] vfio: Replace phys_pfn with phys_page for vfio_pin_pages() Nicolin Chen
2022-06-16 23:52   ` Nicolin Chen
2022-06-17  8:54   ` Christoph Hellwig
2022-06-17  8:54     ` [Intel-gfx] " Christoph Hellwig
2022-06-17 22:06     ` Nicolin Chen
2022-06-17 22:06       ` Nicolin Chen
2022-06-19  6:18       ` Christoph Hellwig
2022-06-19  6:18         ` [Intel-gfx] " Christoph Hellwig
2022-06-19  6:41         ` Nicolin Chen
2022-06-19  6:41           ` Nicolin Chen
2022-06-20  3:00     ` Jason Gunthorpe
2022-06-20  3:00       ` [Intel-gfx] " Jason Gunthorpe
2022-06-20  3:00       ` Jason Gunthorpe
2022-06-20  5:51       ` Christoph Hellwig
2022-06-20  5:51         ` [Intel-gfx] " Christoph Hellwig
2022-06-20  6:37         ` Christoph Hellwig
2022-06-20  6:37           ` [Intel-gfx] " Christoph Hellwig
2022-06-20 15:36           ` Jason Gunthorpe
2022-06-20 15:36             ` [Intel-gfx] " Jason Gunthorpe
2022-06-20 15:36             ` Jason Gunthorpe
2022-06-21 21:47             ` Nicolin Chen
2022-06-21 21:47               ` [Intel-gfx] " Nicolin Chen
2022-06-21 21:47               ` Nicolin Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.