Skip to content

RFC Add migration support for VFIO device

Kirti Wankhede kvm linux-s390 qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4VFIO KABI for migration interfacelinux-headers/linux/vfio.h+91 -08 replies
2/4Add migration functions for VFIO deviceshw/vfio/Makefile.objs hw/vfio/migration.c include/hw/vfio/vfio-common.h+740 -12 replies
3/4Add vfio_listerner_log_sync to mark dirty pageshw/vfio/common.c+32 -00 replies
4/4Make vfio-pci device migration capable.hw/vfio/pci.c+6 -70 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchNeo Jia
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH v1 0/4] Add migration support for VFIO device

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.

Thanks,
Kirti

Kirti Wankhede (4):
VFIO KABI for migration interface
Add migration functions for VFIO devices
Add vfio_listerner_log_sync to mark dirty pages
Make vfio-pci device migration capable.

 hw/vfio/Makefile.objs         |   2 +-
 hw/vfio/common.c              |  32 ++
 hw/vfio/migration.c           | 716 ++++++++++++++++++++++++++++++++++++++++++
 hw/vfio/pci.c                 |  13 +-
 include/hw/vfio/vfio-common.h |  23 ++
 linux-headers/linux/vfio.h    |  91 ++++++
 6 files changed, 869 insertions(+), 8 deletions(-)
 create mode 100644 hw/vfio/migration.c
Signature · 1 line
2.7.0