kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: iommu@lists.linux.dev, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kevin Tian <kevin.tian@intel.com>
Subject: [GIT PULL] Please pull IOMMUFD subsystem changes
Date: Wed, 17 Jul 2024 15:46:03 -0300	[thread overview]
Message-ID: <20240717184603.GA4188230@nvidia.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5688 bytes --]

Hi Linus,

This PR includes IO fault reporting for iommufd, along with some improvements
to the dirty bitmap reporting library. Details in the tag.

For those following, these series are still progressing:

- User page table invalidation (non-Intel) has a roadmap:
 https://lore.kernel.org/linux-iommu/20231209014726.GA2945299@nvidia.com/

 There will be at least two more invalidation IOCTLs - IOMMU_DEVICE_INVALIDATE
 and IOMMU_VIOMMU_INVALIDATE in future.

- ARM SMMUv3 nested translation:
 https://github.com/jgunthorpe/linux/commits/smmuv3_nesting

- Draft AMD IOMMU nested translation:
 https://lore.kernel.org/linux-iommu/20240112000646.98001-1-suravee.suthikulpanit@amd.com

- Draft vBTM support for SMMUv3:
 https://lore.kernel.org/linux-iommu/20240208151837.35068-1-shameerali.kolothum.thodi@huawei.com/

- Draft RISCV nesting support:
 https://lore.kernel.org/all/20240507142600.23844-1-zong.li@sifive.com/

- Grace command queue passthrough iommufd support:
 https://lore.kernel.org/all/cover.1712978212.git.nicolinc@nvidia.com/

RFC patches for PASID support in iommufd & vfio:
  https://lore.kernel.org/r/20240628090557.50898-1-yi.l.liu@intel.com
  https://lore.kernel.org/r/20240412082121.33382-1-yi.l.liu@intel.com/

RFC patches exploring support for the first Intel Scalable IO Virtualization
(SIOV r1) device are posted:
 https://lore.kernel.org/all/20231009085123.463179-1-yi.l.liu@intel.com/

A lot of the iommufd support has now been merged to qemu, with more
progressing.

Thanks,
Jason

The following changes since commit f2661062f16b2de5d7b6a5c42a9a5c96326b8454:

  Linux 6.10-rc5 (2024-06-23 17:08:54 -0400)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git tags/for-linus-iommufd

for you to fetch changes up to 136a8066676e593cd29627219467fc222c8f3b04:

  iommufd: Put constants for all the uAPI enums (2024-07-15 09:44:54 -0300)

----------------------------------------------------------------
iommufd for 6.11 merge window

Major changes:

- The iova_bitmap logic for efficiently reporting dirty pages back to
  userspace has a few more tricky corner case bugs that have been resolved
  and backed with new tests. The revised version has simpler logic.

- Shared branch with iommu for handle support when doing domain
  attach. Handles allow the domain owner to include additional private data
  on a per-device basis.

- IO Page Fault Reporting to userspace via iommufd. Page faults can be
  generated on fault capable HWPTs when a translation is not present.
  Routing them to userspace would allow a VMM to be able to virtualize them
  into an emulated vIOMMU. This is the next step to fully enabling vSVA
  support.

----------------------------------------------------------------
Jason Gunthorpe (3):
      Merge branch 'iommufd_pri' into iommufd for-next
      iommufd: Require drivers to supply the cache_invalidate_user ops
      iommufd: Put constants for all the uAPI enums

Joao Martins (11):
      iommufd/selftest: Fix dirty bitmap tests with u8 bitmaps
      iommufd/selftest: Fix iommufd_test_dirty() to handle <u8 bitmaps
      iommufd/selftest: Add tests for <= u8 bitmap sizes
      iommufd/selftest: Fix tests to use MOCK_PAGE_SIZE based buffer sizes
      iommufd/selftest: Do not record head iova to better match iommu drivers
      iommufd/iova_bitmap: Check iova_bitmap_done() after set ahead
      iommufd/iova_bitmap: Cache mapped length in iova_bitmap_map struct
      iommufd/iova_bitmap: Move initial pinning to iova_bitmap_for_each()
      iommufd/iova_bitmap: Consolidate iova_bitmap_set exit conditionals
      iommufd/iova_bitmap: Dynamic pinning on iova_bitmap_set()
      iommufd/iova_bitmap: Remove iterator logic

Lu Baolu (13):
      iommu: Introduce domain attachment handle
      iommu: Remove sva handle list
      iommu: Add attach handle to struct iopf_group
      iommu: Extend domain attach group with handle support
      iommufd: Add fault and response message definitions
      iommufd: Add iommufd fault object
      iommufd: Fault-capable hwpt attach/detach/replace
      iommufd: Associate fault object with iommufd_hw_pgtable
      iommufd/selftest: Add IOPF support for mock device
      iommufd/selftest: Add coverage for IOPF test
      iommufd: Remove IOMMUFD_PAGE_RESP_FAILURE
      iommufd: Add check on user response code
      iommufd: Fix error pointer checking

 drivers/dma/idxd/init.c                          |   2 +-
 drivers/iommu/io-pgfault.c                       |  63 ++--
 drivers/iommu/iommu-priv.h                       |  11 +
 drivers/iommu/iommu-sva.c                        |  42 ++-
 drivers/iommu/iommu.c                            | 185 +++++++---
 drivers/iommu/iommufd/Makefile                   |   1 +
 drivers/iommu/iommufd/device.c                   |   7 +-
 drivers/iommu/iommufd/fault.c                    | 443 +++++++++++++++++++++++
 drivers/iommu/iommufd/hw_pagetable.c             |  41 ++-
 drivers/iommu/iommufd/iommufd_private.h          |  80 ++++
 drivers/iommu/iommufd/iommufd_test.h             |   8 +
 drivers/iommu/iommufd/iova_bitmap.c              | 124 +++----
 drivers/iommu/iommufd/main.c                     |   6 +
 drivers/iommu/iommufd/selftest.c                 |  70 +++-
 include/linux/iommu.h                            |  41 ++-
 include/uapi/linux/iommufd.h                     | 141 +++++++-
 tools/testing/selftests/iommu/iommufd.c          |  86 +++--
 tools/testing/selftests/iommu/iommufd_fail_nth.c |   2 +-
 tools/testing/selftests/iommu/iommufd_utils.h    |  92 ++++-
 19 files changed, 1206 insertions(+), 239 deletions(-)
 create mode 100644 drivers/iommu/iommufd/fault.c

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

             reply	other threads:[~2024-07-17 18:46 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-17 18:46 Jason Gunthorpe [this message]
2024-07-19 18:09 ` [GIT PULL] Please pull IOMMUFD subsystem changes pr-tracker-bot
  -- strict thread matches above, loose matches on Subject: below --
2025-08-22 14:21 Jason Gunthorpe
2025-08-22 21:28 ` pr-tracker-bot
2025-07-30 18:47 Jason Gunthorpe
2025-07-31 20:01 ` pr-tracker-bot
2025-07-02 14:14 Jason Gunthorpe
2025-07-02 17:06 ` pr-tracker-bot
2025-03-31 16:12 Jason Gunthorpe
2025-04-02  1:50 ` pr-tracker-bot
2025-01-23 16:59 Jason Gunthorpe
2025-01-24 21:45 ` pr-tracker-bot
2024-12-05 18:44 Jason Gunthorpe
2024-12-05 23:08 ` pr-tracker-bot
2024-11-20 14:53 Jason Gunthorpe
2024-11-21 21:20 ` pr-tracker-bot
2024-09-23 17:45 Jason Gunthorpe
2024-09-24 19:36 ` pr-tracker-bot
2024-08-20 22:48 Jason Gunthorpe
2024-08-20 23:52 ` pr-tracker-bot
2024-04-19 17:29 Jason Gunthorpe
2024-04-19 21:07 ` pr-tracker-bot
2024-03-02  0:08 Jason Gunthorpe
2024-03-02  1:31 ` pr-tracker-bot
2024-02-22 13:23 Jason Gunthorpe
2024-02-22 20:03 ` pr-tracker-bot
2024-01-12 17:49 Jason Gunthorpe
2024-01-18 23:35 ` pr-tracker-bot
2023-12-04 19:35 Jason Gunthorpe
2023-12-04 21:59 ` pr-tracker-bot
2023-10-31 13:14 Jason Gunthorpe
2023-11-02  2:51 ` pr-tracker-bot
2023-08-30 23:40 Jason Gunthorpe
2023-08-31  3:50 ` pr-tracker-bot
2023-08-31  3:59 ` Linus Torvalds
2023-08-31 16:43   ` Jason Gunthorpe
2023-07-28 13:48 Jason Gunthorpe
2023-07-28 18:39 ` pr-tracker-bot
2023-06-28 14:04 Jason Gunthorpe
2023-06-30  4:16 ` pr-tracker-bot
2023-04-25 14:46 Jason Gunthorpe
2023-04-27 17:15 ` pr-tracker-bot
2023-04-06 13:34 Jason Gunthorpe
2023-04-06 18:46 ` pr-tracker-bot
2023-02-21 15:39 Jason Gunthorpe
2023-02-24 22:50 ` Linus Torvalds
2023-02-25  0:02   ` Jason Gunthorpe
2023-02-25  0:50     ` Linus Torvalds
2023-02-24 23:27 ` pr-tracker-bot
2022-12-12 18:30 Jason Gunthorpe
2022-12-14 18:04 ` pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240717184603.GA4188230@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=iommu@lists.linux.dev \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).