From: Kunkun Jiang jiangkunkun@huawei.com
virt inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I61SPO CVE: NA
--------------------------------
This reverts commit b22a06ea6ff96075d4a443fb4f318f41a9823e08.
Signed-off-by: Kunkun Jiang jiangkunkun@huawei.com Reviewed-by: Keqian Zhu zhukeqian1@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 53602868a90e..e02bf2578a64 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -3534,7 +3534,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_BYPASS) + if (smmu_domain->stage != ARM_SMMU_DOMAIN_S1) return -EINVAL;
if (enable) { @@ -3575,7 +3575,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_BYPASS) + if (smmu_domain->stage != ARM_SMMU_DOMAIN_S1) return -EINVAL;
if (!ops || !ops->sync_dirty_log) { @@ -3604,7 +3604,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_BYPASS) + if (smmu_domain->stage != ARM_SMMU_DOMAIN_S1) return -EINVAL;
if (!ops || !ops->clear_dirty_log) {