[libvirt PATCH] qemu: end the agent job in qemuDomainSetTimeAgent

2020-01-19 Thread Ján Tomko
This function grabs an agent job but ends a monitor job. End the agent job instead. https://bugzilla.redhat.com/show_bug.cgi?id=1792723 Signed-off-by: Ján Tomko Reported-by: Dan Zheng Fixes: e005c95f56fee9ed780be7f8db103d690bd34cbd --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1

Re: [libvirt PATCH 00/12] virtio failover / vfio auto-plug-on-migrate

2020-01-19 Thread Laine Stump
I forgot to mention in the cover letter - there is a bug in the QEMU 4.2.0 release that causes the qemu process to crash whenever the vfio device is unplugged, and for some reason when booting a Fedora 31 guest with a failover pair, the guest kernel attempts to unplug the vfio device during

[libvirt PATCH 12/12] conf/qemu: new attribute "useBackupMAC"

2020-01-19 Thread Laine Stump
Current virtio-net drivers that support the failover feature match up the virtio backup device with its corresponding hostdev device by looking for an interface with a matching MAC address. Since libvirt will assign a different random MAC address to each interface that isn't given an explicit MAC

[libvirt PATCH 09/12] qemu: allow migration with assigned PCI hostdev if backupAlias is set

2020-01-19 Thread Laine Stump
Normally a PCI hostdev can't be migrated, so qemuMigrationSrcIsAllowedHostdev() won't permit it. In the case of a PCI hostdev that has the backupAlias attribute set, QEMU will automatically unplug the device prior to migration, and re-plug a corresponding device on the destination. This patch

[libvirt PATCH 08/12] conf: add backupAlias attribute to driver subelement

2020-01-19 Thread Laine Stump
For the subelement (including the backupAlias attribute) is parsed directly into the hostdev child object (virDomaniHostdevDef) of the interface (using virDomainHostdevDefParseXMLSubsys()). But for where the network is a pool of hostdevs, the hostdev object doesn't exist until the network port

[libvirt PATCH 11/12] docs: document virtio failover / QEMU auto-plug of hostdev during migration

2020-01-19 Thread Laine Stump
The information in formatdomain.html seems too detailed, but it also didn't seem right to put that information in a wiki page before the patches are even pushed... Signed-off-by: Laine Stump --- docs/formatdomain.html.in | 70 +++ docs/news.xml |

[libvirt PATCH 05/12] qemu: add capabilities flag for failover feature

2020-01-19 Thread Laine Stump
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

[libvirt PATCH 10/12] qemu: add wait-unplug to qemu migration status enum

2020-01-19 Thread Laine Stump
Aside from eliminating itinerant error (effectively just warning, since the migration continues) messages due to an unrecognized response from qemu, this isn't even necessary - the migration proceeds successfully to completion anyway. (I'm not sure where to see this status reported in the API

[libvirt PATCH 04/12] conf: refactor 's subelement parse/format

2020-01-19 Thread Laine Stump
Until now the subelement of was only parsed/used/formatted if the device model was "virtio". Making the driver member of the data object a struct instead of a union and refactoring the parsing/formatting code in this separate patch will make it easier to see exactly what is being added when an

[libvirt PATCH 03/12] conf: rename two static functions

2020-01-19 Thread Laine Stump
Adding Driver to the names makes them better fit their purpose. Signed-off-by: Laine Stump --- src/conf/domain_conf.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 69e3b7be9a..58f4a1c14b 100644 ---

[libvirt PATCH 02/12] conf: change virDomainVirtioNet*Format() to return void

2020-01-19 Thread Laine Stump
All three of these functions could only return 0 anyway, so just get rid of all the extra red tape. Signed-off-by: Laine Stump --- src/conf/domain_conf.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c

[libvirt PATCH 00/12] virtio failover / vfio auto-plug-on-migrate

2020-01-19 Thread Laine Stump
https://bugzilla.redhat.com/1693587 'QEMU 4.2.0 and later, combined with a sufficiently recent guest virtio-net driver, supports setting up a simple network bond device comprised of one virtio emulated NIC and one hostdev NIC (which must be an SRIOV VF). The allure of this setup is that the bond

[libvirt PATCH 06/12] conf: add failover attribute to subelement of

2020-01-19 Thread Laine Stump
This attribute is only used for virtio-net devices, so it is stored in the virtio part of the anonymous union in virDomainNetDef::driver. An example of the new option: The corresponding qemu commandline option can only be set if the qemu binary supports it, so

[libvirt PATCH 01/12] conf: refactor hostdev driver subelement format for simpler additions

2020-01-19 Thread Laine Stump
This reorganizes with no functional change, to make it easier to see what is added in an upcoming patch. (Yes, the "backend != DEFAULT" clause is duplicated in the nested if - the first is to check if *any* attributes of are present, the second is checking for this specific attribute; this will

[libvirt PATCH 07/12] qemu: add backupAlias attribute to subelement of hostdev devices

2020-01-19 Thread Laine Stump
The new attribute backupAlias gives the alias name ("id" in QEMU parlance) of the virtio-net device that will be paired in the guest with a vfio-pci device for "failover" when the vfio-pci device is unplugged (e.g. during migration). This patch adds backupAlias for (which has its stored in the

[PATCH ocaml 2/3] String_val returns const char * in OCaml 4.10.

2020-01-19 Thread Richard W.M. Jones
This should be compatible with earlier versions of OCaml too since we are just assigning a char * to a const char *. --- libvirt/generator.pl| 14 +++--- libvirt/libvirt_c_oneoffs.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libvirt/generator.pl

[PATCH ocaml 3/3] Don't try to memcpy into a String_val.

2020-01-19 Thread Richard W.M. Jones
In OCaml 4.10 String_val returns const char *, so we cannot use it as the destination for memcpy. Use Bytes_val instead. --- libvirt/generator.pl| 2 +- libvirt/libvirt_c_oneoffs.c | 8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libvirt/generator.pl

[PATCH ocaml 0/3] Small fixes for OCaml 4.10.

2020-01-19 Thread Richard W.M. Jones
Basically OCaml 4.10 is much more strict about the difference between string (immutable) and bytes (mutable). Rich.

[PATCH ocaml 1/3] block_peek, memory_peek: Use bytes for return buffer.

2020-01-19 Thread Richard W.M. Jones
Strings are immutable in modern OCaml. --- libvirt/libvirt.ml | 4 ++-- libvirt/libvirt.mli | 4 ++-- libvirt/libvirt_c_oneoffs.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libvirt/libvirt.ml b/libvirt/libvirt.ml index 7f9d0e4..bdb9460 100644 ---