All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFT][PATCH v2 0/9] Update vfio_pin/unpin_pages API
@ 2022-07-06  6:27 ` Nicolin Chen
  0 siblings, 0 replies; 120+ messages in thread
From: Nicolin Chen @ 2022-07-06  6:27 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, hch
  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!

Changelog
v2:
 * Added a patch to make vfio_unpin_pages return void
 * Added two patches to remove PFN list from two s390 callers
 * Renamed "phys_page" parameter to "pages" for vfio_pin_pages
 * Updated commit log of kmap_local_page() patch
 * Added Harald's "Reviewed-by" to pa_ind patch
 * Rebased on top of Alex's extern removal path
v1: https://lore.kernel.org/kvm/20220616235212.15185-1-nicolinc@nvidia.com/

Nicolin Chen (9):
  vfio: Make vfio_unpin_pages() return void
  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/ap: Remove redundant pfn
  vfio/ccw: Change pa_pfn list to pa_iova list
  vfio: Rename user_iova of vfio_dma_rw()
  vfio/ccw: Add kmap_local_page() for memcpy
  vfio: Replace phys_pfn with pages 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              |  46 ++---
 drivers/s390/cio/vfio_ccw_cp.c                | 195 +++++++++++-------
 drivers/s390/crypto/ap_queue.c                |   2 +-
 drivers/s390/crypto/vfio_ap_ops.c             |  54 +++--
 drivers/s390/crypto/vfio_ap_private.h         |   4 +-
 drivers/vfio/vfio.c                           |  55 +++--
 drivers/vfio/vfio.h                           |   8 +-
 drivers/vfio/vfio_iommu_type1.c               |  46 +++--
 include/linux/vfio.h                          |   9 +-
 11 files changed, 218 insertions(+), 213 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2022-07-08 20:32 UTC | newest]

Thread overview: 120+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06  6:27 [RFT][PATCH v2 0/9] Update vfio_pin/unpin_pages API Nicolin Chen
2022-07-06  6:27 ` Nicolin Chen
2022-07-06  6:27 ` [RFT][PATCH v2 1/9] vfio: Make vfio_unpin_pages() return void Nicolin Chen
2022-07-06  6:27   ` Nicolin Chen
2022-07-06  6:54   ` Christoph Hellwig
2022-07-06  6:54     ` [Intel-gfx] " Christoph Hellwig
2022-07-06 15:52     ` Nicolin Chen
2022-07-06 15:52       ` Nicolin Chen
2022-07-06 16:45   ` Jason Gunthorpe
2022-07-06 16:45     ` [Intel-gfx] " Jason Gunthorpe
2022-07-06 16:45     ` Jason Gunthorpe
2022-07-06 17:38   ` Kirti Wankhede
2022-07-06 17:38     ` [Intel-gfx] " Kirti Wankhede
2022-07-06 17:38     ` Kirti Wankhede
2022-07-07  8:42   ` Tian, Kevin
2022-07-07  8:42     ` [Intel-gfx] " Tian, Kevin
2022-07-07  8:42     ` Tian, Kevin
2022-07-07 17:12     ` Nicolin Chen
2022-07-07 17:12       ` Nicolin Chen
2022-07-07 19:22       ` Jason Gunthorpe
2022-07-07 19:22         ` [Intel-gfx] " Jason Gunthorpe
2022-07-07 19:22         ` Jason Gunthorpe
2022-07-07 19:38         ` Nicolin Chen
2022-07-07 19:38           ` Nicolin Chen
2022-07-06  6:27 ` [RFT][PATCH v2 2/9] vfio/ap: Pass in physical address of ind to ap_aqic() Nicolin Chen
2022-07-06  6:27   ` Nicolin Chen
2022-07-06 16:48   ` [Intel-gfx] " Jason Gunthorpe
2022-07-06 16:48     ` Jason Gunthorpe
2022-07-06 16:48     ` Jason Gunthorpe
2022-07-06  6:27 ` [RFT][PATCH v2 3/9] vfio/ccw: Only pass in contiguous pages Nicolin Chen
2022-07-06  6:27   ` Nicolin Chen
2022-07-06 17:05   ` Jason Gunthorpe
2022-07-06 17:05     ` [Intel-gfx] " Jason Gunthorpe
2022-07-06 17:05     ` Jason Gunthorpe
2022-07-08 20:25     ` Eric Farman
2022-07-08 20:25       ` Eric Farman
2022-07-08 20:25   ` Eric Farman
2022-07-08 20:25     ` Eric Farman
2022-07-06  6:27 ` [RFT][PATCH v2 4/9] vfio: Pass in starting IOVA to vfio_pin/unpin_pages API Nicolin Chen
2022-07-06  6:27   ` Nicolin Chen
2022-07-06  6:56   ` Christoph Hellwig
2022-07-06  6:56     ` [Intel-gfx] " Christoph Hellwig
2022-07-06 15:54     ` Nicolin Chen
2022-07-06 15:54       ` Nicolin Chen
2022-07-06 17:38   ` Kirti Wankhede
2022-07-06 17:38     ` [Intel-gfx] " Kirti Wankhede
2022-07-06 17:38     ` Kirti Wankhede
2022-07-06 17:49   ` Jason Gunthorpe
2022-07-06 17:49     ` [Intel-gfx] " Jason Gunthorpe
2022-07-06 17:49     ` Jason Gunthorpe
2022-07-06 17:58     ` Nicolin Chen
2022-07-06 17:58       ` Nicolin Chen
2022-07-06 19:21     ` Nicolin Chen
2022-07-06 19:21       ` Nicolin Chen
2022-07-07  8:46   ` Tian, Kevin
2022-07-07  8:46     ` [Intel-gfx] " Tian, Kevin
2022-07-07 17:04     ` Nicolin Chen
2022-07-07 17:04       ` Nicolin Chen
2022-07-08 20:27   ` Eric Farman
2022-07-08 20:27     ` Eric Farman
2022-07-06  6:27 ` [RFT][PATCH v2 5/9] vfio/ap: Remove redundant pfn Nicolin Chen
2022-07-06  6:27   ` Nicolin Chen
2022-07-06 17:55   ` Jason Gunthorpe
2022-07-06 17:55     ` [Intel-gfx] " Jason Gunthorpe
2022-07-06 17:55     ` Jason Gunthorpe
2022-07-06  6:27 ` [RFT][PATCH v2 6/9] vfio/ccw: Change pa_pfn list to pa_iova list Nicolin Chen
2022-07-06  6:27   ` Nicolin Chen
2022-07-06 17:59   ` Jason Gunthorpe
2022-07-06 17:59     ` [Intel-gfx] " Jason Gunthorpe
2022-07-06 17:59     ` Jason Gunthorpe
2022-07-08 20:26   ` Eric Farman
2022-07-08 20:26     ` Eric Farman
2022-07-06  6:27 ` [RFT][PATCH v2 7/9] vfio: Rename user_iova of vfio_dma_rw() Nicolin Chen
2022-07-06  6:27   ` Nicolin Chen
2022-07-06  6:57   ` Christoph Hellwig
2022-07-06  6:57     ` [Intel-gfx] " Christoph Hellwig
2022-07-06 18:15   ` Jason Gunthorpe
2022-07-06 18:15     ` [Intel-gfx] " Jason Gunthorpe
2022-07-06 18:15     ` Jason Gunthorpe
2022-07-07  8:47   ` Tian, Kevin
2022-07-07  8:47     ` [Intel-gfx] " Tian, Kevin
2022-07-07  8:47     ` Tian, Kevin
2022-07-06  6:27 ` [RFT][PATCH v2 8/9] vfio/ccw: Add kmap_local_page() for memcpy Nicolin Chen
2022-07-06  6:27   ` Nicolin Chen
2022-07-06 18:17   ` Jason Gunthorpe
2022-07-06 18:17     ` [Intel-gfx] " Jason Gunthorpe
2022-07-06 18:17     ` Jason Gunthorpe
2022-07-08 20:29   ` Eric Farman
2022-07-08 20:29     ` Eric Farman
2022-07-06  6:27 ` [RFT][PATCH v2 9/9] vfio: Replace phys_pfn with pages for vfio_pin_pages() Nicolin Chen
2022-07-06  6:27   ` Nicolin Chen
2022-07-06  6:57   ` Christoph Hellwig
2022-07-06  6:57     ` [Intel-gfx] " Christoph Hellwig
2022-07-06 17:39   ` Kirti Wankhede
2022-07-06 17:39     ` [Intel-gfx] " Kirti Wankhede
2022-07-06 17:39     ` Kirti Wankhede
2022-07-06 18:18   ` Jason Gunthorpe
2022-07-06 18:18     ` [Intel-gfx] " Jason Gunthorpe
2022-07-06 18:18     ` Jason Gunthorpe
2022-07-07  8:49   ` Tian, Kevin
2022-07-07  8:49     ` [Intel-gfx] " Tian, Kevin
2022-07-07  8:49     ` Tian, Kevin
2022-07-07 17:03     ` Nicolin Chen
2022-07-07 17:03       ` Nicolin Chen
2022-07-08 20:29   ` Eric Farman
2022-07-08 20:29     ` Eric Farman
2022-07-07  6:08 ` [RFT][PATCH v2 0/9] Update vfio_pin/unpin_pages API Tian, Kevin
2022-07-07  6:08   ` [Intel-gfx] " Tian, Kevin
2022-07-07  6:08   ` Tian, Kevin
2022-07-07  6:17   ` Nicolin Chen
2022-07-07  6:17     ` Nicolin Chen
2022-07-08  7:24     ` Xu, Terrence
2022-07-08  7:24       ` [Intel-gfx] " Xu, Terrence
2022-07-08  7:24       ` Xu, Terrence
2022-07-08 20:20       ` Nicolin Chen
2022-07-08 20:20         ` Nicolin Chen
2022-07-08 20:30 ` Eric Farman
2022-07-08 20:30   ` Eric Farman
2022-07-08 20:31   ` Nicolin Chen
2022-07-08 20:31     ` 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.