提交 c83eca3e 编写于 作者: K Kunkun Jiang 提交者: Zheng Zengkai

Revert "iommu/smmuv3: Implement bind/unbind_guest_msi"

virt inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I61SPO
CVE: NA

--------------------------------

This reverts commit 74eeb1a9.
Signed-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
Reviewed-by: NKeqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 a492abd7
......@@ -3585,47 +3585,6 @@ static void arm_smmu_get_resv_regions(struct device *dev,
iommu_dma_get_resv_regions(dev, head);
}
static int
arm_smmu_bind_guest_msi(struct iommu_domain *domain,
dma_addr_t giova, phys_addr_t gpa, size_t size)
{
struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
struct arm_smmu_device *smmu;
int ret = -EINVAL;
mutex_lock(&smmu_domain->init_mutex);
smmu = smmu_domain->smmu;
if (!smmu)
goto out;
if (smmu_domain->stage != ARM_SMMU_DOMAIN_NESTED)
goto out;
ret = iommu_dma_bind_guest_msi(domain, giova, gpa, size);
out:
mutex_unlock(&smmu_domain->init_mutex);
return ret;
}
static void
arm_smmu_unbind_guest_msi(struct iommu_domain *domain, dma_addr_t giova)
{
struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain);
struct arm_smmu_device *smmu;
mutex_lock(&smmu_domain->init_mutex);
smmu = smmu_domain->smmu;
if (!smmu)
goto unlock;
if (smmu_domain->stage != ARM_SMMU_DOMAIN_NESTED)
goto unlock;
iommu_dma_unbind_guest_msi(domain, giova);
unlock:
mutex_unlock(&smmu_domain->init_mutex);
}
static int arm_smmu_attach_pasid_table(struct iommu_domain *domain,
struct iommu_pasid_table_config *cfg)
{
......@@ -4309,8 +4268,6 @@ static struct iommu_ops arm_smmu_ops = {
.attach_pasid_table = arm_smmu_attach_pasid_table,
.detach_pasid_table = arm_smmu_detach_pasid_table,
.cache_invalidate = arm_smmu_cache_invalidate,
.bind_guest_msi = arm_smmu_bind_guest_msi,
.unbind_guest_msi = arm_smmu_unbind_guest_msi,
.dev_has_feat = arm_smmu_dev_has_feature,
.dev_feat_enabled = arm_smmu_dev_feature_enabled,
.dev_enable_feat = arm_smmu_dev_enable_feature,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册