提交 b22a06ea 编写于 作者: K Keqian Zhu 提交者: Zheng Zengkai

iommu/smmuv3: Remove the S1 mapping restriction of dirty log

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

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

The previous patch extended dirty log feature for SMMUv3 nested mode,
but forget to remove the S1 mapping restriction.

Fixes: 97e11307 (iommu/arm-smmu-v3: Using HTTU with SMMU STE and stage 2 TTD)
Signed-off-by: NKeqian Zhu <zhukeqian1@huawei.com>
Tested-by: NKunkun Jiang <jiangkunkun@huawei.com>
Reviewed-by: NKunkun Jiang <jiangkunkun@huawei.com>
Reviewed-by: NZenghui Yu <yuzenghui@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 ee0afb75
...@@ -3533,7 +3533,7 @@ static int arm_smmu_switch_dirty_log(struct iommu_domain *domain, bool enable, ...@@ -3533,7 +3533,7 @@ static int arm_smmu_switch_dirty_log(struct iommu_domain *domain, bool enable,
if (!(smmu->features & ARM_SMMU_FEAT_HD)) if (!(smmu->features & ARM_SMMU_FEAT_HD))
return -ENODEV; return -ENODEV;
if (smmu_domain->stage != ARM_SMMU_DOMAIN_S1) if (smmu_domain->stage == ARM_SMMU_DOMAIN_BYPASS)
return -EINVAL; return -EINVAL;
if (enable) { if (enable) {
...@@ -3574,7 +3574,7 @@ static int arm_smmu_sync_dirty_log(struct iommu_domain *domain, ...@@ -3574,7 +3574,7 @@ static int arm_smmu_sync_dirty_log(struct iommu_domain *domain,
if (!(smmu->features & ARM_SMMU_FEAT_HD)) if (!(smmu->features & ARM_SMMU_FEAT_HD))
return -ENODEV; return -ENODEV;
if (smmu_domain->stage != ARM_SMMU_DOMAIN_S1) if (smmu_domain->stage == ARM_SMMU_DOMAIN_BYPASS)
return -EINVAL; return -EINVAL;
if (!ops || !ops->sync_dirty_log) { if (!ops || !ops->sync_dirty_log) {
...@@ -3603,7 +3603,7 @@ static int arm_smmu_clear_dirty_log(struct iommu_domain *domain, ...@@ -3603,7 +3603,7 @@ static int arm_smmu_clear_dirty_log(struct iommu_domain *domain,
if (!(smmu->features & ARM_SMMU_FEAT_HD)) if (!(smmu->features & ARM_SMMU_FEAT_HD))
return -ENODEV; return -ENODEV;
if (smmu_domain->stage != ARM_SMMU_DOMAIN_S1) if (smmu_domain->stage == ARM_SMMU_DOMAIN_BYPASS)
return -EINVAL; return -EINVAL;
if (!ops || !ops->clear_dirty_log) { if (!ops || !ops->clear_dirty_log) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册