[PATCH v6 17/25] iommufd: Allow an input data_type via iommu_hw_info
Baolu Lu
baolu.lu at linux.intel.com
Mon Jun 16 04:54:26 PDT 2025
On 6/14/2025 3:14 PM, Nicolin Chen wrote:
> The iommu_hw_info can output via the out_data_type field the vendor data
> type from a driver, but this only allows driver to report one data type.
>
> Now, with SMMUv3 having a Tegra241 CMDQV implementation, it has two sets
> of types and data structs to report.
>
> One way to support that is to use the same type field bidirectionally.
>
> Reuse the same field by adding an "in_data_type", allowing user space to
> request for a specific type and to get the corresponding data.
>
> For backward compatibility, since the ioctl handler has never checked an
> input value, add an IOMMU_HW_INFO_FLAG_INPUT_TYPE to switch between the
> old output-only field and the new bidirectional field.
>
> Reviewed-by: Kevin Tian<kevin.tian at intel.com>
> Signed-off-by: Nicolin Chen<nicolinc at nvidia.com>
Reviewed-by: Lu Baolu <baolu.lu at linux.intel.com>
More information about the linux-arm-kernel
mailing list