iommufd/selftest: Return the real idev id from selftest mock_domain
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 17 Jul 2023 18:12:14 +0000 (15:12 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 26 Jul 2023 13:20:36 +0000 (10:20 -0300)
commit7a467e02b339a50ed2762edd72e763925ac2b0a3
treec3722e12003b75e6f38d2116324075931e285ab8
parent7074d7bd67d495cb3f6fe7c7c96b357a3b9d4ec2
iommufd/selftest: Return the real idev id from selftest mock_domain

Now that we actually call iommufd_device_bind() we can return the
idev_id from that function to userspace for use in other APIs.

Link: https://lore.kernel.org/r/18-v8-6659224517ea+532-iommufd_alloc_jgg@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/iommufd_test.h
drivers/iommu/iommufd/selftest.c
tools/testing/selftests/iommu/iommufd.c
tools/testing/selftests/iommu/iommufd_fail_nth.c
tools/testing/selftests/iommu/iommufd_utils.h