@@ -383,6 +383,7 @@ static const struct iommufd_viommu_ops arm_vsmmu_ops = {
};
struct iommufd_viommu *arm_vsmmu_alloc(struct device *dev,
+ struct kvm *kvm,
struct iommu_domain *parent,
struct iommufd_ctx *ictx,
unsigned int viommu_type)
@@ -1060,6 +1060,7 @@ struct arm_vsmmu {
#if IS_ENABLED(CONFIG_ARM_SMMU_V3_IOMMUFD)
void *arm_smmu_hw_info(struct device *dev, u32 *length, u32 *type);
struct iommufd_viommu *arm_vsmmu_alloc(struct device *dev,
+ struct kvm *kvm,
struct iommu_domain *parent,
struct iommufd_ctx *ictx,
unsigned int viommu_type);
@@ -47,7 +47,8 @@ int iommufd_viommu_alloc_ioctl(struct iommufd_ucmd *ucmd)
goto out_put_hwpt;
}
- viommu = ops->viommu_alloc(idev->dev, hwpt_paging->common.domain,
+ viommu = ops->viommu_alloc(idev->dev, idev->kvm,
+ hwpt_paging->common.domain,
ucmd->ictx, cmd->type);
if (IS_ERR(viommu)) {
rc = PTR_ERR(viommu);
@@ -47,6 +47,7 @@ struct iommufd_ctx;
struct iommufd_viommu;
struct msi_desc;
struct msi_msg;
+struct kvm;
#define IOMMU_FAULT_PERM_READ (1 << 0) /* read */
#define IOMMU_FAULT_PERM_WRITE (1 << 1) /* write */
@@ -661,7 +662,8 @@ struct iommu_ops {
int (*def_domain_type)(struct device *dev);
struct iommufd_viommu *(*viommu_alloc)(
- struct device *dev, struct iommu_domain *parent_domain,
+ struct device *dev, struct kvm *kvm,
+ struct iommu_domain *parent_domain,
struct iommufd_ctx *ictx, unsigned int viommu_type);
const struct iommu_domain_ops *default_domain_ops;