vfio/common: Add device dirty page tracking start/stop

Add device dirty page tracking start/stop functionality. This uses the
device DMA logging uAPI to start and stop dirty page tracking by device.

Device dirty page tracking is used only if all devices within a
container support device dirty page tracking.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Link: https://lore.kernel.org/r/20230307125450.62409-11-joao.m.martins@oracle.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
Joao Martins 2023-03-07 12:54:45 +00:00 committed by Alex Williamson
parent 62c1b0024b
commit 5255bbf4ec
3 changed files with 171 additions and 5 deletions

View file

@ -143,6 +143,8 @@ typedef struct VFIODevice {
VFIOMigration *migration;
Error *migration_blocker;
OnOffAuto pre_copy_dirty_page_tracking;
bool dirty_pages_supported;
bool dirty_tracking;
} VFIODevice;
struct VFIODeviceOps {