提交 cad65f22 编写于 作者: L Laine Stump

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: NLaine Stump <laine@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 3d63a187
......@@ -558,6 +558,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 350 */
"i8042",
"rng-builtin",
"virtio-net.failover",
);
......@@ -1305,6 +1306,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioNet[] = {
{ "disable-legacy", QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY },
{ "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM },
{ "ats", QEMU_CAPS_VIRTIO_PCI_ATS },
{ "failover", QEMU_CAPS_VIRTIO_NET_FAILOVER },
};
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsSpaprPCIHostBridge[] = {
......
......@@ -539,6 +539,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
/* 350 */
QEMU_CAPS_DEVICE_I8042, /* PS/2 controller */
QEMU_CAPS_OBJECT_RNG_BUILTIN, /* -object rng-builtin */
QEMU_CAPS_VIRTIO_NET_FAILOVER, /* virtio-net-*.failover */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
......
......@@ -177,6 +177,7 @@
<flag name='drive-nvme'/>
<flag name='smp-dies'/>
<flag name='rng-builtin'/>
<flag name='virtio-net.failover'/>
<version>4001050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700242</microcodeVersion>
......
......@@ -221,6 +221,7 @@
<flag name='smp-dies'/>
<flag name='i8042'/>
<flag name='rng-builtin'/>
<flag name='virtio-net.failover'/>
<version>4002000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100242</microcodeVersion>
......
......@@ -222,6 +222,7 @@
<flag name='smp-dies'/>
<flag name='i8042'/>
<flag name='rng-builtin'/>
<flag name='virtio-net.failover'/>
<version>4002050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100241</microcodeVersion>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册