vfio: Add vfio_listener_log_sync to mark dirty pages
commitb6dd6504e303d4339df2db765433bffa36dfbf8b
authorKirti Wankhede <kwankhede@nvidia.com>
Mon, 26 Oct 2020 09:36:23 +0000 (26 15:06 +0530)
committerAlex Williamson <alex.williamson@redhat.com>
Sun, 1 Nov 2020 19:30:51 +0000 (1 12:30 -0700)
tree7f8ea9a0997009d52824ba2e0bf506b358d5e12d
parente663f516830c61f1dcafd2dda810126c14327b15
vfio: Add vfio_listener_log_sync to mark dirty pages

vfio_listener_log_sync gets list of dirty pages from container using
VFIO_IOMMU_GET_DIRTY_BITMAP ioctl and mark those pages dirty when all
devices are stopped and saving state.
Return early for the RAM block section of mapped MMIO region.

Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
Reviewed-by: Neo Jia <cjia@nvidia.com>
[aw: fix error_report types, fix cpu_physical_memory_set_dirty_lebitmap() cast]
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/common.c
hw/vfio/trace-events