summaryrefslogtreecommitdiff
path: root/drivers/iommu/iommufd/selftest.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2023-07-17 21:12:14 +0300
committerJason Gunthorpe <jgg@nvidia.com>2023-07-26 16:20:36 +0300
commit7a467e02b339a50ed2762edd72e763925ac2b0a3 (patch)
treec3722e12003b75e6f38d2116324075931e285ab8 /drivers/iommu/iommufd/selftest.c
parent7074d7bd67d495cb3f6fe7c7c96b357a3b9d4ec2 (diff)
downloadlinux-7a467e02b339a50ed2762edd72e763925ac2b0a3.tar.xz
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>
Diffstat (limited to 'drivers/iommu/iommufd/selftest.c')
-rw-r--r--drivers/iommu/iommufd/selftest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/iommufd/selftest.c b/drivers/iommu/iommufd/selftest.c
index eb33dffb955d..9d43334e4faf 100644
--- a/drivers/iommu/iommufd/selftest.c
+++ b/drivers/iommu/iommufd/selftest.c
@@ -443,6 +443,7 @@ static int iommufd_test_mock_domain(struct iommufd_ucmd *ucmd,
/* Userspace must destroy the device_id to destroy the object */
cmd->mock_domain.out_hwpt_id = pt_id;
cmd->mock_domain.out_stdev_id = sobj->obj.id;
+ cmd->mock_domain.out_idev_id = idev_id;
iommufd_object_finalize(ucmd->ictx, &sobj->obj);
return iommufd_ucmd_respond(ucmd, sizeof(*cmd));