|
|
a1c947 |
From 8f2cd77dc208cfa90b37faa18b092ca4a76a0716 Mon Sep 17 00:00:00 2001
|
|
|
a1c947 |
Message-Id: <8f2cd77dc208cfa90b37faa18b092ca4a76a0716@dist-git>
|
|
|
a1c947 |
From: Laine Stump <laine@redhat.com>
|
|
|
a1c947 |
Date: Thu, 21 Jul 2022 02:03:49 -0400
|
|
|
a1c947 |
Subject: [PATCH] qemu: skip hardcoded hostdev migration check if QEMU can do
|
|
|
a1c947 |
it for us
|
|
|
a1c947 |
|
|
|
a1c947 |
libvirt currently will block migration for any vfio-assigned device
|
|
|
a1c947 |
unless it is a network device that is associated with a virtio-net
|
|
|
a1c947 |
failover device (ie. if the hostdev object has a teaming->type ==
|
|
|
a1c947 |
VIR_DOMAIN_NET_TEAMING_TYPE_TRANSIENT).
|
|
|
a1c947 |
|
|
|
a1c947 |
In the future there will be other vfio devices that can be migrated,
|
|
|
a1c947 |
so we don't want to rely on this hardcoded block. QEMU 6.0+ will
|
|
|
a1c947 |
anyway inform us of any devices that will block migration (as a part
|
|
|
a1c947 |
of qemuDomainGetMigrationBlockers()), so we only need to do the
|
|
|
a1c947 |
hardcoded check in the case of old QEMU that can't provide that
|
|
|
a1c947 |
information.
|
|
|
a1c947 |
|
|
|
a1c947 |
Signed-off-by: Laine Stump <laine@redhat.com>
|
|
|
a1c947 |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
a1c947 |
(cherry picked from commit 25883cd5f0b188f2417f294b7d219a77b219f7c2)
|
|
|
a1c947 |
|
|
|
a1c947 |
https://bugzilla.redhat.com/show_bug.cgi?id=1497907
|
|
|
a1c947 |
|
|
|
a1c947 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
a1c947 |
---
|
|
|
a1c947 |
src/qemu/qemu_migration.c | 11 ++++++++---
|
|
|
a1c947 |
1 file changed, 8 insertions(+), 3 deletions(-)
|
|
|
a1c947 |
|
|
|
a1c947 |
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
|
|
a1c947 |
index f571c9eb27..76903d612b 100644
|
|
|
a1c947 |
--- a/src/qemu/qemu_migration.c
|
|
|
a1c947 |
+++ b/src/qemu/qemu_migration.c
|
|
|
a1c947 |
@@ -1495,6 +1495,14 @@ qemuMigrationSrcIsAllowed(virQEMUDriver *driver,
|
|
|
a1c947 |
_("cannot migrate domain: %s"), reasons);
|
|
|
a1c947 |
return false;
|
|
|
a1c947 |
}
|
|
|
a1c947 |
+ } else {
|
|
|
a1c947 |
+ /* checks here are for anything that doesn't need to be
|
|
|
a1c947 |
+ * checked by libvirt if running QEMU that can be queried
|
|
|
a1c947 |
+ * about migration blockers.
|
|
|
a1c947 |
+ */
|
|
|
a1c947 |
+
|
|
|
a1c947 |
+ if (!qemuMigrationSrcIsAllowedHostdev(vm->def))
|
|
|
a1c947 |
+ return false;
|
|
|
a1c947 |
}
|
|
|
a1c947 |
|
|
|
a1c947 |
if (remote) {
|
|
|
a1c947 |
@@ -1521,9 +1529,6 @@ qemuMigrationSrcIsAllowed(virQEMUDriver *driver,
|
|
|
a1c947 |
return false;
|
|
|
a1c947 |
}
|
|
|
a1c947 |
|
|
|
a1c947 |
- if (!qemuMigrationSrcIsAllowedHostdev(vm->def))
|
|
|
a1c947 |
- return false;
|
|
|
a1c947 |
-
|
|
|
a1c947 |
if (vm->def->cpu) {
|
|
|
a1c947 |
/* QEMU blocks migration and save with invariant TSC enabled
|
|
|
a1c947 |
* unless TSC frequency is explicitly set.
|
|
|
a1c947 |
--
|
|
|
a1c947 |
2.35.1
|
|
|
a1c947 |
|