iommu: Add iommu_copy_struct_to_user helper
authorNicolin Chen <nicolinc@nvidia.com>
Thu, 10 Jul 2025 05:58:57 +0000 (22:58 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 10 Jul 2025 15:38:50 +0000 (12:38 -0300)
commit3fcf56a2393b399f289a473181ce6b19f716b59d
tree9fe0537b1ec110846eca5097beab48d4eeff8194
parent4b57c057f9e6668ae442b19902dab8a73fe7b209
iommu: Add iommu_copy_struct_to_user helper

Similar to the iommu_copy_struct_from_user helper receiving data from the
user space, add an iommu_copy_struct_to_user helper to report output data
back to the user space data pointer.

Link: https://patch.msgid.link/r/fa292c2a730aadd77085ec3a8272360c96eabb9c.1752126748.git.nicolinc@nvidia.com
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
include/linux/iommu.h