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

Revert "iommu/io-pgtable-arm: Remove the limitation on the page table format...

Revert "iommu/io-pgtable-arm: Remove the limitation on the page table format of sync/clear_dirty_log()"

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

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

This reverts commit 21d56f9c.
Signed-off-by: NKunkun Jiang <jiangkunkun@huawei.com>
Reviewed-by: NKeqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 45e641f9
...@@ -980,6 +980,10 @@ static int arm_lpae_sync_dirty_log(struct io_pgtable_ops *ops, ...@@ -980,6 +980,10 @@ static int arm_lpae_sync_dirty_log(struct io_pgtable_ops *ops,
if (WARN_ON(iaext)) if (WARN_ON(iaext))
return -EINVAL; return -EINVAL;
if (data->iop.fmt != ARM_64_LPAE_S1 &&
data->iop.fmt != ARM_32_LPAE_S1)
return -EINVAL;
return __arm_lpae_sync_dirty_log(data, iova, size, lvl, ptep, return __arm_lpae_sync_dirty_log(data, iova, size, lvl, ptep,
bitmap, base_iova, bitmap_pgshift); bitmap, base_iova, bitmap_pgshift);
} }
...@@ -1072,6 +1076,10 @@ static int arm_lpae_clear_dirty_log(struct io_pgtable_ops *ops, ...@@ -1072,6 +1076,10 @@ static int arm_lpae_clear_dirty_log(struct io_pgtable_ops *ops,
if (WARN_ON(iaext)) if (WARN_ON(iaext))
return -EINVAL; return -EINVAL;
if (data->iop.fmt != ARM_64_LPAE_S1 &&
data->iop.fmt != ARM_32_LPAE_S1)
return -EINVAL;
return __arm_lpae_clear_dirty_log(data, iova, size, lvl, ptep, return __arm_lpae_clear_dirty_log(data, iova, size, lvl, ptep,
bitmap, base_iova, bitmap_pgshift); bitmap, base_iova, bitmap_pgshift);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册