Re: [RFC PATCH v1 0/4] Add migration support for VFIO device

Tian, Kevin
2018-10-18T02:41:30Z

> From: Kirti Wankhede
> Sent: Wednesday, October 17, 2018 2:13 AM
>
> Add migration support for VFIO device
>
> This Patch set include patches as below:
> - Define KABI for VFIO device for migration support.
> - Generic migration functionality for VFIO device.
> * This patch set adds functionality only for PCI devices, but can be
> extended to other VFIO devices.
> * Added all the basic functions required for pre-copy, stop-and-copy and
> resume phases of migration.
> * Added state change notifier and from that notifier function, VFIO
> device's state changed is conveyed to VFIO vendor driver.
> * During save setup phase and resume/load setup phase, migration region
> is queried from vendor driver and is mmaped by QEMU. This region is
> used to read/write data from and to vendor driver.
> * .save_live_pending, .save_live_iterate and .is_active_iterate are
> implemented to use QEMU's functionality of iteration during pre-copy
> phase.
> * In .save_live_complete_precopy, that is in stop-and-copy phase,
> iteration to read data from vendor driver is implemented till pending
> bytes returned by vendor driver are not zero.
> * .save_cleanup and .load_cleanup are implemented to unmap migration
> region that was setup duing setup phase.
> * Added function to get dirty pages bitmap from vendor driver.
> - Add vfio_listerner_log_sync to mark dirty pages.
> - Make VFIO PCI device migration capable.
>

I didn't see a kernel part change implementing the new KABI. If there is,
can you point out?

btw how is this work related to previous effort on adding live migration
to VFIO?

https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg01134.html
https://www.spinics.net/linux/fedora/libvir/msg170669.html

Thanks
Kevin