return true;
}
-static bool vfio_devices_all_stopped_and_saving(VFIOContainer *container)
+static bool vfio_devices_all_saving(VFIOContainer *container)
{
VFIOGroup *group;
VFIODevice *vbasedev;
return false;
}
- if ((migration->device_state & VFIO_DEVICE_STATE_SAVING) &&
- !(migration->device_state & VFIO_DEVICE_STATE_RUNNING)) {
+ if (migration->device_state & VFIO_DEVICE_STATE_SAVING) {
+ if ((vbasedev->pre_copy_dirty_page_tracking == ON_OFF_AUTO_OFF)
+ && (migration->device_state & VFIO_DEVICE_STATE_RUNNING)) {
+ return false;
+ }
continue;
} else {
return false;
return;
}
- if (vfio_devices_all_stopped_and_saving(container)) {
+ if (vfio_devices_all_saving(container)) {
vfio_sync_dirty_bitmap(container, section);
}
}
static Property vfio_pci_dev_properties[] = {
DEFINE_PROP_PCI_HOST_DEVADDR("host", VFIOPCIDevice, host),
DEFINE_PROP_STRING("sysfsdev", VFIOPCIDevice, vbasedev.sysfsdev),
+ DEFINE_PROP_ON_OFF_AUTO("x-pre-copy-dirty-page-tracking", VFIOPCIDevice,
+ vbasedev.pre_copy_dirty_page_tracking,
+ ON_OFF_AUTO_ON),
DEFINE_PROP_ON_OFF_AUTO("display", VFIOPCIDevice,
display, ON_OFF_AUTO_OFF),
DEFINE_PROP_UINT32("xres", VFIOPCIDevice, display_xres, 0),