Pull iommufd updates from Jason Gunthorpe:
"Two series:
- Reorganize how the hardware page table objects are managed,
particularly their destruction flow. Increase the selftest test
coverage in this area by creating a more complete mock iommu
driver.
This is preparation to add a replace operation for HWPT binding,
which is done but waiting for the VFIO parts to complete so there
is a user.
- Split the iommufd support for "access" to make it two step -
allocate an access then link it to an IOAS. Update VFIO and have
VFIO always create an access even for the VFIO mdevs that never do
DMA.
This is also preperation for the replace VFIO series that will
allow replace to work on access types as well.
Three minor fixes:
- Sykzaller found the selftest code didn't check for overflow when
processing user VAs
- smatch noted a .data item should have been static
- Add a selftest that reproduces a syzkaller bug for batch carry
already fixed in rc"
* tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: (21 commits)
iommufd/selftest: Cover domain unmap with huge pages and access
iommufd/selftest: Set varaiable mock_iommu_device storage-class-specifier to static
vfio: Check the presence for iommufd callbacks in __vfio_register_dev()
vfio/mdev: Uses the vfio emulated iommufd ops set in the mdev sample drivers
vfio-iommufd: Make vfio_iommufd_emulated_bind() return iommufd_access ID
vfio-iommufd: No need to record iommufd_ctx in vfio_device
iommufd: Create access in vfio_iommufd_emulated_bind()
iommu/iommufd: Pass iommufd_ctx pointer in iommufd_get_ioas()
iommufd/selftest: Catch overflow of uptr and length
iommufd/selftest: Add a selftest for iommufd_device_attach() with a hwpt argument
iommufd/selftest: Make selftest create a more complete mock device
iommufd/selftest: Rename the remaining mock device_id's to stdev_id
iommufd/selftest: Rename domain_id to hwpt_id for FIXTURE iommufd_mock_domain
iommufd/selftest: Rename domain_id to stdev_id for FIXTURE iommufd_ioas
iommufd/selftest: Rename the sefltest 'device_id' to 'stdev_id'
iommufd: Make iommufd_hw_pagetable_alloc() do iopt_table_add_domain()
iommufd: Move iommufd_device to iommufd_private.h
iommufd: Move ioas related HWPT destruction into iommufd_hw_pagetable_destroy()
iommufd: Consistently manage hwpt_item
iommufd: Add iommufd_lock_obj() around the auto-domains hwpts
...