Commit e85126a8 authored by Keqian Zhu's avatar Keqian Zhu Committed by Zheng Zengkai
Browse files

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: default avatarKeqian Zhu <zhukeqian1@huawei.com>
Tested-by: default avatarKunkun Jiang <jiangkunkun@huawei.com>
Reviewed-by: default avatarKunkun Jiang <jiangkunkun@huawei.com>
Reviewed-by: default avatarZenghui Yu <yuzenghui@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 60527666
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3533,7 +3533,7 @@ static int arm_smmu_switch_dirty_log(struct iommu_domain *domain, bool enable,

	if (!(smmu->features & ARM_SMMU_FEAT_HD))
		return -ENODEV;
	if (smmu_domain->stage != ARM_SMMU_DOMAIN_S1)
	if (smmu_domain->stage == ARM_SMMU_DOMAIN_BYPASS)
		return -EINVAL;

	if (enable) {
@@ -3574,7 +3574,7 @@ static int arm_smmu_sync_dirty_log(struct iommu_domain *domain,

	if (!(smmu->features & ARM_SMMU_FEAT_HD))
		return -ENODEV;
	if (smmu_domain->stage != ARM_SMMU_DOMAIN_S1)
	if (smmu_domain->stage == ARM_SMMU_DOMAIN_BYPASS)
		return -EINVAL;

	if (!ops || !ops->sync_dirty_log) {
@@ -3603,7 +3603,7 @@ static int arm_smmu_clear_dirty_log(struct iommu_domain *domain,

	if (!(smmu->features & ARM_SMMU_FEAT_HD))
		return -ENODEV;
	if (smmu_domain->stage != ARM_SMMU_DOMAIN_S1)
	if (smmu_domain->stage == ARM_SMMU_DOMAIN_BYPASS)
		return -EINVAL;

	if (!ops || !ops->clear_dirty_log) {