Skip to content
Commit 331e33d2 authored by Kirti Wankhede's avatar Kirti Wankhede Committed by Alex Williamson
Browse files

vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap



DMA mapped pages, including those pinned by mdev vendor drivers, might
get unpinned and unmapped while migration is active and device is still
running. For example, in pre-copy phase while guest driver could access
those pages, host device or vendor driver can dirty these mapped pages.
Such pages should be marked dirty so as to maintain memory consistency
for a user making use of dirty page tracking.

To get bitmap during unmap, user should allocate memory for bitmap, set
it all zeros, set size of allocated memory, set page size to be
considered for bitmap and set flag VFIO_DMA_UNMAP_FLAG_GET_DIRTY_BITMAP.

Signed-off-by: default avatarKirti Wankhede <kwankhede@nvidia.com>
Reviewed-by: default avatarNeo Jia <cjia@nvidia.com>
Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
Reviewed-by: default avatarYan Zhao <yan.y.zhao@intel.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent d6a4c185
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment