lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250730184734.GA179487@nvidia.com>
Date: Wed, 30 Jul 2025 15:47:34 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: iommu@...ts.linux.dev, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org, Kevin Tian <kevin.tian@...el.com>
Subject: [GIT PULL] Please pull IOMMUFD subsystem changes

Hi Linus,

This PR broadly brings the assigned HW command queue support to
iommufd. This feature is used to improve SVA performance in VMs by
avoiding paravirtualization traps during SVA invalidations.

Along the way I think some of the core logic is in a much better state
to support future driver backed features.

Thanks,
Jason

The following changes since commit 19272b37aa4f83ca52bdf9c16d5d81bdd1354494:

  Linux 6.16-rc1 (2025-06-08 13:44:43 -0700)

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 2c78e74493d33b002312296fbab1d688bfd0f76f:

  iommu/arm-smmu-v3: Replace vsmmu_size/type with get_viommu_size (2025-07-28 12:07:50 -0300)

----------------------------------------------------------------
iommufd 6.17 merge window pull

- IOMMU HW now has features to directly assign HW command queues to a
  guest VM. In this mode the command queue operates on a limited set of
  invalidation commands that are suitable for improving guest invalidation
  performance and easy for the HW to virtualize.

  This PR brings the generic infrastructure to allow IOMMU drivers to
  expose such command queues through the iommufd uAPI, mmap the doorbell
  pages, and get the guest physical range for the command queue ring
  itself.

- An implementation for the NVIDIA SMMUv3 extension "cmdqv" is built on
  the new iommufd command queue features. It works with the existing SMMU
  driver support for cmdqv in guest VMs.

- Many precursor cleanups and improvements to support the above cleanly,
  changes to the general ioctl and object helpers, driver support for
  VDEVICE, and mmap pgoff cookie infrastructure.

- Sequence VDEVICE destruction to always happen before VFIO device
  destruction. When using the above type features, and also in future
  confidential compute, the internal virtual device representation becomes
  linked to HW or CC TSM configuration and objects. If a VFIO device is
  removed from iommufd those HW objects should also be cleaned up to
  prevent a sort of UAF. This became important now that we have HW backing
  the VDEVICE.

- Fix one syzkaller found error related to math overflows during iova
  allocation

----------------------------------------------------------------
Arnd Bergmann (1):
      iommu/tegra241-cmdqv: import IOMMUFD module namespace

Jason Gunthorpe (2):
      iommufd: Prevent ALIGN() overflow
      iommufd/selftest: Test reserved regions near ULONG_MAX

Nicolin Chen (46):
      iommufd: Apply obvious cosmetic fixes
      iommufd: Drop unused ictx in struct iommufd_vdevice
      iommufd: Use enum iommu_viommu_type for type in struct iommufd_viommu
      iommufd: Use enum iommu_veventq_type for type in struct iommufd_veventq
      iommufd: Return EOPNOTSUPP for failures due to driver bugs
      iommu: Introduce get_viommu_size and viommu_init ops
      iommufd/viommu: Support get_viommu_size and viommu_init ops
      iommufd/selftest: Drop parent domain from mock_iommu_domain_nested
      iommufd/selftest: Replace mock_viommu_alloc with mock_viommu_init
      iommu/arm-smmu-v3: Replace arm_vsmmu_alloc with arm_vsmmu_init
      iommu: Deprecate viommu_alloc op
      iommufd: Move _iommufd_object_alloc out of driver.c
      iommufd: Introduce iommufd_object_alloc_ucmd helper
      iommufd: Apply the new iommufd_object_alloc_ucmd helper
      iommufd: Report unmapped bytes in the error path of iopt_unmap_iova_range
      iommufd: Correct virt_id kdoc at struct iommu_vdevice_alloc
      iommufd/viommu: Explicitly define vdev->virt_id
      iommu: Use enum iommu_hw_info_type for type in hw_info op
      iommu: Add iommu_copy_struct_to_user helper
      iommu: Pass in a driver-level user data structure to viommu_init op
      iommufd/viommu: Allow driver-specific user data for a vIOMMU object
      iommufd/selftest: Support user_data in mock_viommu_alloc
      iommufd/selftest: Add coverage for viommu data
      iommufd/access: Add internal APIs for HW queue to use
      iommufd/access: Bypass access->ops->unmap for internal use
      iommufd/viommu: Add driver-defined vDEVICE support
      iommufd/viommu: Introduce IOMMUFD_OBJ_HW_QUEUE and its related struct
      iommufd/viommu: Add IOMMUFD_CMD_HW_QUEUE_ALLOC ioctl
      iommufd/driver: Add iommufd_hw_queue_depend/undepend() helpers
      iommufd/selftest: Add coverage for IOMMUFD_CMD_HW_QUEUE_ALLOC
      iommufd: Add mmap interface
      iommufd/selftest: Add coverage for the new mmap interface
      Documentation: userspace-api: iommufd: Update HW QUEUE
      iommu: Allow an input type in hw_info op
      iommufd: Allow an input data_type via iommu_hw_info
      iommufd/selftest: Update hw_info coverage for an input data_type
      iommu/arm-smmu-v3-iommufd: Add vsmmu_size/type and vsmmu_init impl ops
      iommu/arm-smmu-v3-iommufd: Add hw_info to impl_ops
      iommu/tegra241-cmdqv: Use request_threaded_irq
      iommu/tegra241-cmdqv: Simplify deinit flow in tegra241_cmdqv_remove_vintf()
      iommu/tegra241-cmdqv: Do not statically map LVCMDQs
      iommu/tegra241-cmdqv: Add user-space use support
      iommu/tegra241-cmdqv: Add IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV support
      iommufd: Do not allow _iommufd_object_alloc_ucmd if abort op is set
      iommu/arm-smmu-v3: Do not bother impl_ops if IOMMU_VIOMMU_TYPE_ARM_SMMUV3
      iommu/arm-smmu-v3: Replace vsmmu_size/type with get_viommu_size

Xu Yilun (8):
      iommufd/viommu: Roll back to use iommufd_object_alloc() for vdevice
      iommufd: Add iommufd_object_tombstone_user() helper
      iommufd: Add a pre_destroy() op for objects
      iommufd: Destroy vdevice on idevice destroy
      iommufd/vdevice: Remove struct device reference from struct vdevice
      iommufd/selftest: Explicitly skip tests for inapplicable variant
      iommufd/selftest: Add coverage for vdevice tombstone
      iommufd: Rename some shortterm-related identifiers

 Documentation/userspace-api/iommufd.rst            |  12 +
 .../iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c    |  70 ++-
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c        |  17 +-
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h        |  33 +-
 drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c     | 493 ++++++++++++++++++-
 drivers/iommu/intel/iommu.c                        |   7 +-
 drivers/iommu/iommufd/device.c                     | 143 +++++-
 drivers/iommu/iommufd/driver.c                     | 113 +++--
 drivers/iommu/iommufd/eventq.c                     |  14 +-
 drivers/iommu/iommufd/hw_pagetable.c               |  10 +-
 drivers/iommu/iommufd/io_pagetable.c               |  57 ++-
 drivers/iommu/iommufd/io_pagetable.h               |   5 +-
 drivers/iommu/iommufd/iommufd_private.h            | 135 ++++-
 drivers/iommu/iommufd/iommufd_test.h               |  20 +
 drivers/iommu/iommufd/iova_bitmap.c                |   1 -
 drivers/iommu/iommufd/main.c                       | 206 +++++++-
 drivers/iommu/iommufd/pages.c                      |  21 +-
 drivers/iommu/iommufd/selftest.c                   | 207 ++++++--
 drivers/iommu/iommufd/viommu.c                     | 309 +++++++++++-
 include/linux/iommu.h                              |  74 ++-
 include/linux/iommufd.h                            | 196 +++++++-
 include/uapi/linux/iommufd.h                       | 154 +++++-
 tools/testing/selftests/iommu/iommufd.c            | 541 +++++++++++++--------
 tools/testing/selftests/iommu/iommufd_fail_nth.c   |  15 +-
 tools/testing/selftests/iommu/iommufd_utils.h      |  89 +++-
 25 files changed, 2436 insertions(+), 506 deletions(-)

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ