]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: add capabilities flag for failover feature
authorLaine Stump <laine@redhat.com>
Sun, 8 Dec 2019 19:22:34 +0000 (14:22 -0500)
committerLaine Stump <laine@redhat.com>
Wed, 29 Jan 2020 20:33:29 +0000 (15:33 -0500)
commitcad65f222f29dffd4e91d43b230665aca813c7a6
tree7469e81d29768c58764e5d78aa93cca67f3fb2d8
parent3d63a187baf79c9984d0355a909c9a337366224a
qemu: add capabilities flag for failover feature

Presence of the virtio-net-pci option called "failover" indicates
support in a qemu binary of a simplistic bonding of a virtio-net
device with another PCI device. This feature allows migration of
guests that have a network device assigned to a guest with VFIO, by
creating a network bond device in the guest consisting of the
VFIO-assigned device and a virtio-net-pci device, then temporarily
(and automatically) unplugging the VFIO net device prior to migration
(and hotplugging an equivalent device on the migration
destination). (The feature is called "failover" because the bond
device uses the vfio-pci netdev for normal guest networking, but
"fails over" to the virtio-net-pci netdev once the vfio-pci device is
unplugged for migration.)

Full functioning of the feature also requires support in the
virtio-net driver in the guest OS (since that is where the bond device
resides), but if the "failover" commandline option is present for the
virtio-net-pci device in qemu, at least the qemu part of the feature
is available, and libvirt can add the proper options to both the
virtio-net-pci and vfio-pci device commandlines to indicate qemu
should attempt doing the failover during migration.

This patch just adds the qemu capabilities flag "virtio-net.failover".

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml