On Fri, Apr 21, 2023 at 10:37:22AM -0700, Nicolin Chen wrote: > How about the following piece? Needs a test with QEMU though.. > > static const size_t iommufd_device_data_size[] = { > [IOMMU_HW_INFO_TYPE_NONE] = 0, > [IOMMU_HW_INFO_TYPE_INTEL_VTD] = 0, > [IOMMU_HW_INFO_TYPE_ARM_SMMUV3] = > sizeof(struct iommu_device_data_arm_smmuv3), > }; If we need more than one of these things we'll need a better solution.. > rc = ops->set_dev_data_user(idev->dev, data); Where will the iommu driver store the vsid to sid xarray from these arguments? Jason