RFC Qemu: Add live migration support for SRIOV NIC
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest posting 2/210 patches 60 repliesIn review
- v2 RFC posting 1/23 patches 36 repliesSuperseded
- v1 RFC3 patches 2 repliesSuperseded
Patches in v2 posting 2/2 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [RFC PATCH V2 00/10] Qemu: Add live migration support for SRIOV NIC
This patchset is to propose a solution of adding live migration support for SRIOV NIC.
During migration, Qemu needs to let VF driver in the VM to know migration start and end. Qemu adds faked PCI migration capability to help to sync status between two sides during migration.
Qemu triggers VF's mailbox irq via sending MSIX msg when migration status is changed. VF driver tells Qemu its mailbox vector index via the new PCI capability. In some cases(NIC is suspended or closed), VF mailbox irq is freed and VF driver can disable irq injecting via new capability.
VF driver will put down nic before migration and put up again on the target machine.
Lan Tianyu (10):
Qemu/VFIO: Create head file pci.h to share data struct. Qemu/VFIO: Add new VFIO_GET_PCI_CAP_INFO ioctl cmd definition Qemu/VFIO: Rework vfio_std_cap_max_size() function Qemu/VFIO: Add vfio_find_free_cfg_reg() to find free PCI config space
regs
Qemu/VFIO: Expose PCI config space read/write and msix functions Qemu/PCI: Add macros for faked PCI migration capability
Qemu: Add post_load_state() to run after restoring CPU state
Qemu: Add save_before_stop callback to run just before stopping VCPU
during migration
Qemu/VFIO: Add SRIOV VF migration support
Qemu/VFIO: Misc change for enable migration with VFIO
hw/vfio/Makefile.objs | 2 +- hw/vfio/pci.c | 196 +++++++++----------------------------------- hw/vfio/pci.h | 168 +++++++++++++++++++++++++++++++++++++ hw/vfio/sriov.c | 178 ++++++++++++++++++++++++++++++++++++++++ include/hw/pci/pci_regs.h | 19 +++++ include/migration/vmstate.h | 5 ++ include/sysemu/sysemu.h | 1 + linux-headers/linux/vfio.h | 16 ++++ migration/migration.c | 3 +- migration/savevm.c | 28 +++++++ 10 files changed, 459 insertions(+), 157 deletions(-) create mode 100644 hw/vfio/pci.h create mode 100644 hw/vfio/sriov.c
Signature · 1 line
1.9.3