forked from rpms/libvirt
1dc8926705
- qemu: introduce capability QEMU_CAPS_MIGRATION_BLOCKED_REASONS (rhbz#2092833) - qemu: new function to retrieve migration blocker reasons from QEMU (rhbz#2092833) - qemu: query QEMU for migration blockers before our own harcoded checks (rhbz#2092833) - qemu: remove hardcoded migration fail for vDPA devices if we can ask QEMU (rhbz#2092833) - qemu_migration: Use EnterMonitorAsync in qemuDomainGetMigrationBlockers (rhbz#2092833) - qemu: don't try to query QEMU about migration blockers during offline migration (rhbz#2092833) - qemu_migration: Acquire correct job in qemuMigrationSrcIsAllowed (rhbz#2092833) - virsh: Require --xpath for *dumpxml (rhbz#2103524) - qemu: skip hardcoded hostdev migration check if QEMU can do it for us (rhbz#1497907) Resolves: rhbz#1497907, rhbz#2092833, rhbz#2103524
59 lines
2.5 KiB
Diff
59 lines
2.5 KiB
Diff
From 0ba11af2300d0aaf80456575e03848f843ae29de Mon Sep 17 00:00:00 2001
|
|
Message-Id: <0ba11af2300d0aaf80456575e03848f843ae29de@dist-git>
|
|
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
|
|
Date: Thu, 21 Jul 2022 19:29:15 +0200
|
|
Subject: [PATCH] qemu: remove hardcoded migration fail for vDPA devices if we
|
|
can ask QEMU
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
vDPA devices will be migratable soon, so we shouldn't unconditionally
|
|
block migration of any domain with a vDPA device. Instead, we should
|
|
rely on QEMU to make the decision when that info is available from the
|
|
query-migrate QMP command (QEMU versions too old to have that info in
|
|
the results of query-migrate don't support migration of vDPA devices,
|
|
so in that case we will continue to unconditionally block migration).
|
|
|
|
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
|
|
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
Reviewed-by: Laine Stump <laine@redhat.com>
|
|
|
|
(cherry picked from commit 2103807e330487952f423d86f541a7a28e003e95)
|
|
Resolves: https://bugzilla.redhat.com/2092833
|
|
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
|
|
---
|
|
src/qemu/qemu_migration.c | 8 +++++---
|
|
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
|
index cfb7626bb0..2f77e45abf 100644
|
|
--- a/src/qemu/qemu_migration.c
|
|
+++ b/src/qemu/qemu_migration.c
|
|
@@ -1455,9 +1455,11 @@ qemuMigrationSrcIsAllowed(virQEMUDriver *driver,
|
|
int nsnapshots;
|
|
int pauseReason;
|
|
size_t i;
|
|
+ bool blockedReasonsCap = virQEMUCapsGet(priv->qemuCaps,
|
|
+ QEMU_CAPS_MIGRATION_BLOCKED_REASONS);
|
|
|
|
- /* Ask qemu if it has a migration blocker */
|
|
- if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MIGRATION_BLOCKED_REASONS)) {
|
|
+ /* Ask qemu if it have a migration blocker */
|
|
+ if (blockedReasonsCap) {
|
|
g_auto(GStrv) blockers = NULL;
|
|
if (qemuDomainGetMigrationBlockers(driver, vm, &blockers) < 0)
|
|
return false;
|
|
@@ -1576,7 +1578,7 @@ qemuMigrationSrcIsAllowed(virQEMUDriver *driver,
|
|
virDomainNetDef *net = vm->def->nets[i];
|
|
qemuSlirp *slirp;
|
|
|
|
- if (net->type == VIR_DOMAIN_NET_TYPE_VDPA) {
|
|
+ if (!blockedReasonsCap && net->type == VIR_DOMAIN_NET_TYPE_VDPA) {
|
|
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
|
_("vDPA devices cannot be migrated"));
|
|
return false;
|
|
--
|
|
2.35.1
|
|
|