vfio/iommu_type1: Populate full dirty when detach non-pinned group
authorKeqian Zhu <zhukeqian1@huawei.com>
Fri, 22 Jan 2021 09:26:34 +0000 (17:26 +0800)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 1 Feb 2021 20:40:52 +0000 (13:40 -0700)
commitd0a78f91761fcd837da1e7a4b0f8368873adc646
tree028f869b0afbd543e98e0e0a4f7597d712c97e07
parent1048ba83fb1c00cd24172e23e8263972f6b5d9ac
vfio/iommu_type1: Populate full dirty when detach non-pinned group

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: d6a4c185660c ("vfio iommu: Implementation of ioctl for dirty pages tracking")
Suggested-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio_iommu_type1.c