A Perfect Solution for Live Migration with Pass-through Devices by Quan Xu

From KVM forum’2018.

Several efforts have been made on enabling live migration with pass-through devices, however, it is inevitable to modify device driver to save and restore device states, and mark a page as dirty after DMA memory access. These ‘ugly’ modifications are not compatible with legacy drivers or Windows virtual machine.
We design new virtio hardware devices (virtio-net based Nic and virtio-blk based storage). These devices can be pass-through with VFIO, then the legacy virtio-net/virtio-blk drivers are working without any modification in virtual machine, including Windows. We also extend the capability of devices to support live migration, including being aware of live migration, logging the page of DMA memory access, saving and restoring device states on run-time. And then we extend the migration and VFIO code to support live migration with pass-through these devices as QEMU ‘emulated’ devices.







For RO(Read Only) registers, they can be read by source host, but it couldn’t be restored on the destination host(Because the restore operations need the write of these registers, while RO registers couldn’t be wroten).









If the pass-thru devices support live migration, then all registers are R/W.