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

vfio/iommu_type1: Populate full dirty when detach non-pinned group



stable inclusion
from stable-5.10.20
commit a8fe0b750a9456b6318625d6d27d26c89a62efe1
bugzilla: 50608

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

[ Upstream commit d0a78f91 ]

If a group with non-pinned-page dirty scope is detached with dirty
logging enabled, we should fully populate the dirty bitmaps at the
time it's removed since we don't know the extent of its previous DMA,
nor will the group be present to trigger the full bitmap when the user
retrieves the dirty bitmap.

Fixes: d6a4c185 ("vfio iommu: Implementation of ioctl for dirty pages tracking")
Suggested-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarKeqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 959f93f4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment