Linux IOMMU Development
 help / color / mirror / Atom feed
* [PATCH V7 0/9] iommu_ioas_map_file
@ 2024-10-25 13:11 Steve Sistare
  2024-10-25 13:11 ` [PATCH V7 1/9] mm/gup: folio_add_pins Steve Sistare
                   ` (9 more replies)
  0 siblings, 10 replies; 35+ messages in thread
From: Steve Sistare @ 2024-10-25 13:11 UTC (permalink / raw)
  To: iommu; +Cc: Jason Gunthorpe, Kevin Tian, Nicolin Chen, Steve Sistare

Provide the IOMMU_IOAS_MAP_FILE ioctl, which allows a user to register
memory by passing a memfd plus offset and length.  Implement it using
the memfd_map_folios KAPI, and the proposed folio_add_pins KAPI.
See the individual patches for details.

Changes in V2:
 * changed names and commit message in "rename uptr in iopt_alloc_iova"
 * normalized comments describing the iopt_map_user_pages interface
 * submitted folio_split_user_page_pin (fka folio_repin_unhugely) separately
 * replaced nupages[] optimization with folio-to-batch optimization
 * added selftests for map file

Changes in V3:
  * fixed bug setting user->locked
  * fixed bug in pages->file refs
  * replaced lockdep_off with down_write_nest_lock
  * added ufolios_next to track folio consumption in reader
  * combined IOMMU_IOAS_MAP_FILE interface and implementation
  * added patch folio_add_pins (fka folio_split_user_page_pin )
  * reformatted patches using clang-format
  * misc cosmetic changes in response to review comments

Changes in V4:
  * deleted ufolios_huge optimization
  * optimized batch_from_folios
  * squashed "optimize file mapping" into "pfn reader for file mappings"
  * moved length overflow check to iopt_alloc_file_pages
  * one declaration per line, and use local scope declarations
  * rebased to iommufd git tree

Changes in V5:
  * hoisted folio_add_pins call and deleted folios_unpin_partial
  * simplified batch_add_pfn_num and its caller
  * added cmd_length selftest for iommu_ioas_map_file
  * added map_file case for iommufd_fail_nth selftest
  * fixed an unreported mmput bug in pfn_reader_user_destroy that broke mdev

Changes in V6:
  * added argument checks in iommufd_ioas_map_file
  * misc minor and cosmetic changes

Changes in V7:
  * fixed compilation of selftest

Steve Sistare (9):
  mm/gup: folio_add_pins
  iommufd: rename uptr in iopt_alloc_iova
  iommufd: generalize iopt_pages address
  iommufd: pfn reader local variables
  iommufd: folio subroutines
  iommufd: pfn reader for file mappings
  iommufd: IOMMU_IOAS_MAP_FILE
  iommufd: file mappings for mdev
  iommufd: map file selftest

 drivers/iommu/iommufd/io_pagetable.c             | 117 ++++++---
 drivers/iommu/iommufd/io_pagetable.h             |  20 +-
 drivers/iommu/iommufd/ioas.c                     |  47 ++++
 drivers/iommu/iommufd/iommufd_private.h          |   5 +
 drivers/iommu/iommufd/main.c                     |   2 +
 drivers/iommu/iommufd/pages.c                    | 307 +++++++++++++++++++----
 include/linux/mm.h                               |   1 +
 include/uapi/linux/iommufd.h                     |  25 ++
 mm/gup.c                                         |  24 ++
 tools/testing/selftests/iommu/iommufd.c          | 124 +++++++--
 tools/testing/selftests/iommu/iommufd_fail_nth.c |  39 +++
 tools/testing/selftests/iommu/iommufd_utils.h    |  57 +++++
 12 files changed, 660 insertions(+), 108 deletions(-)

base-commit: e2d8fe9148b79ed1cbf0663edc988db7769173dc

-- 
1.8.3.1


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

end of thread, other threads:[~2024-11-18  1:24 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-25 13:11 [PATCH V7 0/9] iommu_ioas_map_file Steve Sistare
2024-10-25 13:11 ` [PATCH V7 1/9] mm/gup: folio_add_pins Steve Sistare
2024-10-25 13:11 ` [PATCH V7 2/9] iommufd: rename uptr in iopt_alloc_iova Steve Sistare
2024-10-25 13:11 ` [PATCH V7 3/9] iommufd: generalize iopt_pages address Steve Sistare
2024-10-25 13:11 ` [PATCH V7 4/9] iommufd: pfn reader local variables Steve Sistare
2024-10-25 13:11 ` [PATCH V7 5/9] iommufd: folio subroutines Steve Sistare
2024-10-25 13:11 ` [PATCH V7 6/9] iommufd: pfn reader for file mappings Steve Sistare
2024-10-31  3:34   ` Alexey Kardashevskiy
2024-11-06  3:18     ` Alexey Kardashevskiy
2024-11-06 13:19       ` Steven Sistare
2024-11-07 10:00         ` Alexey Kardashevskiy
2024-11-07 13:21           ` Steven Sistare
2024-11-07 14:08           ` Jason Gunthorpe
2024-11-08  0:01             ` Alexey Kardashevskiy
2024-11-14  4:03               ` Alexey Kardashevskiy
2024-11-14 16:17                 ` Jason Gunthorpe
2024-11-18  1:24                   ` Alexey Kardashevskiy
2024-10-25 13:11 ` [PATCH V7 7/9] iommufd: IOMMU_IOAS_MAP_FILE Steve Sistare
2024-10-25 13:11 ` [PATCH V7 8/9] iommufd: file mappings for mdev Steve Sistare
2024-10-25 13:11 ` [PATCH V7 9/9] iommufd: map file selftest Steve Sistare
2024-10-25 13:14   ` Steven Sistare
2024-10-25 17:00     ` Nicolin Chen
2024-10-25 17:04   ` Nicolin Chen
2024-10-25 17:58     ` Steven Sistare
2024-10-25 18:39       ` Nicolin Chen
2024-10-25 23:58         ` Jason Gunthorpe
2024-10-26 19:13           ` Steven Sistare
2024-10-26 19:16             ` Steven Sistare
2024-10-26 23:09               ` Nicolin Chen
2024-10-27 14:38                 ` Steven Sistare
2024-10-30  0:11 ` [PATCH V7 0/9] iommu_ioas_map_file Jason Gunthorpe
2024-10-30 12:43   ` Steven Sistare
2024-11-04 13:58     ` Steven Sistare
2024-11-04 14:18       ` Jason Gunthorpe
2024-11-04 14:24         ` Steven Sistare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox