|
|
032100 |
From 81f8b07ed1e4e485ded7f366739c110351120785 Mon Sep 17 00:00:00 2001
|
|
|
032100 |
Message-Id: <81f8b07ed1e4e485ded7f366739c110351120785@dist-git>
|
|
|
032100 |
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
|
|
|
032100 |
Date: Thu, 21 Jul 2022 19:29:05 +0200
|
|
|
032100 |
Subject: [PATCH] qemu: introduce capability
|
|
|
032100 |
QEMU_CAPS_MIGRATION_BLOCKED_REASONS
|
|
|
032100 |
MIME-Version: 1.0
|
|
|
032100 |
Content-Type: text/plain; charset=UTF-8
|
|
|
032100 |
Content-Transfer-Encoding: 8bit
|
|
|
032100 |
|
|
|
032100 |
since qemu 6.0, if migration is blocked for some reason, 'query-migrate'
|
|
|
032100 |
will return an array of error strings describing the migration blockers.
|
|
|
032100 |
This can be used to check whether there are any devices blocking
|
|
|
032100 |
migration, etc.
|
|
|
032100 |
|
|
|
032100 |
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
|
|
|
032100 |
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
|
|
|
032100 |
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
032100 |
Reviewed-by: Laine Stump <laine@redhat.com>
|
|
|
032100 |
|
|
|
032100 |
(cherry picked from commit 1e9d84d9f9513a73572842db30e3d1445e892291)
|
|
|
032100 |
Resolves: https://bugzilla.redhat.com/2092833
|
|
|
032100 |
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
|
|
|
032100 |
---
|
|
|
032100 |
src/qemu/qemu_capabilities.c | 2 ++
|
|
|
032100 |
src/qemu/qemu_capabilities.h | 1 +
|
|
|
032100 |
tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 +
|
|
|
032100 |
tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 +
|
|
|
032100 |
tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 +
|
|
|
032100 |
tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 +
|
|
|
032100 |
tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 +
|
|
|
032100 |
tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 +
|
|
|
032100 |
tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 +
|
|
|
032100 |
tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 +
|
|
|
032100 |
tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 +
|
|
|
032100 |
tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 +
|
|
|
032100 |
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 +
|
|
|
032100 |
13 files changed, 14 insertions(+)
|
|
|
032100 |
|
|
|
032100 |
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
|
|
|
032100 |
index 8586930266..48002f3b58 100644
|
|
|
032100 |
--- a/src/qemu/qemu_capabilities.c
|
|
|
032100 |
+++ b/src/qemu/qemu_capabilities.c
|
|
|
032100 |
@@ -671,6 +671,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
|
|
|
032100 |
"chardev.qemu-vdagent", /* QEMU_CAPS_CHARDEV_QEMU_VDAGENT */
|
|
|
032100 |
"display-dbus", /* QEMU_CAPS_DISPLAY_DBUS */
|
|
|
032100 |
"iothread.thread-pool-max", /* QEMU_CAPS_IOTHREAD_THREAD_POOL_MAX */
|
|
|
032100 |
+ "migration.blocked-reasons", /* QEMU_CAPS_MIGRATION_BLOCKED_REASONS */
|
|
|
032100 |
);
|
|
|
032100 |
|
|
|
032100 |
|
|
|
032100 |
@@ -1623,6 +1624,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
|
|
|
032100 |
{ "chardev-add/arg-type/backend/+qemu-vdagent", QEMU_CAPS_CHARDEV_QEMU_VDAGENT },
|
|
|
032100 |
{ "query-display-options/ret-type/+dbus", QEMU_CAPS_DISPLAY_DBUS },
|
|
|
032100 |
{ "object-add/arg-type/+iothread/thread-pool-max", QEMU_CAPS_IOTHREAD_THREAD_POOL_MAX },
|
|
|
032100 |
+ { "query-migrate/ret-type/blocked-reasons", QEMU_CAPS_MIGRATION_BLOCKED_REASONS },
|
|
|
032100 |
};
|
|
|
032100 |
|
|
|
032100 |
typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps;
|
|
|
032100 |
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
|
|
|
032100 |
index 6f35ba1485..570e43292d 100644
|
|
|
032100 |
--- a/src/qemu/qemu_capabilities.h
|
|
|
032100 |
+++ b/src/qemu/qemu_capabilities.h
|
|
|
032100 |
@@ -650,6 +650,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
|
|
032100 |
QEMU_CAPS_CHARDEV_QEMU_VDAGENT, /* -chardev qemu-vdagent */
|
|
|
032100 |
QEMU_CAPS_DISPLAY_DBUS, /* -display dbus */
|
|
|
032100 |
QEMU_CAPS_IOTHREAD_THREAD_POOL_MAX, /* -object iothread.thread-pool-max */
|
|
|
032100 |
+ QEMU_CAPS_MIGRATION_BLOCKED_REASONS, /* query-migrate returns 'blocked-reasons */
|
|
|
032100 |
|
|
|
032100 |
QEMU_CAPS_LAST /* this must always be the last item */
|
|
|
032100 |
} virQEMUCapsFlags;
|
|
|
032100 |
diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml
|
|
|
032100 |
index 4b4cc2d3aa..3e48d17811 100644
|
|
|
032100 |
--- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml
|
|
|
032100 |
+++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml
|
|
|
032100 |
@@ -189,6 +189,7 @@
|
|
|
032100 |
<flag name='memory-backend-file.prealloc-threads'/>
|
|
|
032100 |
<flag name='virtio-iommu-pci'/>
|
|
|
032100 |
<flag name='virtio-net.rss'/>
|
|
|
032100 |
+ <flag name='migration.blocked-reasons'/>
|
|
|
032100 |
<version>6000000</version>
|
|
|
032100 |
<kvmVersion>0</kvmVersion>
|
|
|
032100 |
<microcodeVersion>61700242</microcodeVersion>
|
|
|
032100 |
diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml
|
|
|
032100 |
index 06543071aa..790b7221d4 100644
|
|
|
032100 |
--- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml
|
|
|
032100 |
+++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml
|
|
|
032100 |
@@ -147,6 +147,7 @@
|
|
|
032100 |
<flag name='memory-backend-file.prealloc-threads'/>
|
|
|
032100 |
<flag name='virtio-iommu-pci'/>
|
|
|
032100 |
<flag name='virtio-net.rss'/>
|
|
|
032100 |
+ <flag name='migration.blocked-reasons'/>
|
|
|
032100 |
<version>6000000</version>
|
|
|
032100 |
<kvmVersion>0</kvmVersion>
|
|
|
032100 |
<microcodeVersion>39100242</microcodeVersion>
|
|
|
032100 |
diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
|
|
|
032100 |
index 8c61bf8a84..86c3732c72 100644
|
|
|
032100 |
--- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
|
|
|
032100 |
+++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml
|
|
|
032100 |
@@ -231,6 +231,7 @@
|
|
|
032100 |
<flag name='memory-backend-file.prealloc-threads'/>
|
|
|
032100 |
<flag name='virtio-iommu-pci'/>
|
|
|
032100 |
<flag name='virtio-net.rss'/>
|
|
|
032100 |
+ <flag name='migration.blocked-reasons'/>
|
|
|
032100 |
<version>6000000</version>
|
|
|
032100 |
<kvmVersion>0</kvmVersion>
|
|
|
032100 |
<microcodeVersion>43100242</microcodeVersion>
|
|
|
032100 |
diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
|
|
|
032100 |
index afd8f606eb..bd76a7a398 100644
|
|
|
032100 |
--- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
|
|
|
032100 |
+++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml
|
|
|
032100 |
@@ -236,6 +236,7 @@
|
|
|
032100 |
<flag name='virtio-iommu-pci'/>
|
|
|
032100 |
<flag name='virtio-net.rss'/>
|
|
|
032100 |
<flag name='chardev.qemu-vdagent'/>
|
|
|
032100 |
+ <flag name='migration.blocked-reasons'/>
|
|
|
032100 |
<version>6001000</version>
|
|
|
032100 |
<kvmVersion>0</kvmVersion>
|
|
|
032100 |
<microcodeVersion>43100243</microcodeVersion>
|
|
|
032100 |
diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml
|
|
|
032100 |
index 86fc46918f..6ed51ec796 100644
|
|
|
032100 |
--- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml
|
|
|
032100 |
+++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml
|
|
|
032100 |
@@ -201,6 +201,7 @@
|
|
|
032100 |
<flag name='virtio-iommu-pci'/>
|
|
|
032100 |
<flag name='virtio-net.rss'/>
|
|
|
032100 |
<flag name='chardev.qemu-vdagent'/>
|
|
|
032100 |
+ <flag name='migration.blocked-reasons'/>
|
|
|
032100 |
<version>6001050</version>
|
|
|
032100 |
<kvmVersion>0</kvmVersion>
|
|
|
032100 |
<microcodeVersion>61700244</microcodeVersion>
|
|
|
032100 |
diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
|
|
|
032100 |
index 983b54430d..1a98fe122e 100644
|
|
|
032100 |
--- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
|
|
|
032100 |
+++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
|
|
|
032100 |
@@ -196,6 +196,7 @@
|
|
|
032100 |
<flag name='memory-backend-file.prealloc-threads'/>
|
|
|
032100 |
<flag name='virtio-iommu-pci'/>
|
|
|
032100 |
<flag name='virtio-net.rss'/>
|
|
|
032100 |
+ <flag name='migration.blocked-reasons'/>
|
|
|
032100 |
<version>6002000</version>
|
|
|
032100 |
<kvmVersion>0</kvmVersion>
|
|
|
032100 |
<microcodeVersion>42900244</microcodeVersion>
|
|
|
032100 |
diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml
|
|
|
032100 |
index 19605d93ae..a77efaaa37 100644
|
|
|
032100 |
--- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml
|
|
|
032100 |
+++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml
|
|
|
032100 |
@@ -238,6 +238,7 @@
|
|
|
032100 |
<flag name='virtio-iommu-pci'/>
|
|
|
032100 |
<flag name='virtio-net.rss'/>
|
|
|
032100 |
<flag name='chardev.qemu-vdagent'/>
|
|
|
032100 |
+ <flag name='migration.blocked-reasons'/>
|
|
|
032100 |
<version>6002000</version>
|
|
|
032100 |
<kvmVersion>0</kvmVersion>
|
|
|
032100 |
<microcodeVersion>43100244</microcodeVersion>
|
|
|
032100 |
diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml
|
|
|
032100 |
index e24e2235fb..6848a075a8 100644
|
|
|
032100 |
--- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml
|
|
|
032100 |
+++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml
|
|
|
032100 |
@@ -209,6 +209,7 @@
|
|
|
032100 |
<flag name='virtio-iommu.boot-bypass'/>
|
|
|
032100 |
<flag name='virtio-net.rss'/>
|
|
|
032100 |
<flag name='chardev.qemu-vdagent'/>
|
|
|
032100 |
+ <flag name='migration.blocked-reasons'/>
|
|
|
032100 |
<version>6002092</version>
|
|
|
032100 |
<kvmVersion>0</kvmVersion>
|
|
|
032100 |
<microcodeVersion>61700243</microcodeVersion>
|
|
|
032100 |
diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
|
|
|
032100 |
index 83e0f50e3a..cf4286b78b 100644
|
|
|
032100 |
--- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
|
|
|
032100 |
+++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
|
|
|
032100 |
@@ -213,6 +213,7 @@
|
|
|
032100 |
<flag name='virtio-iommu.boot-bypass'/>
|
|
|
032100 |
<flag name='virtio-net.rss'/>
|
|
|
032100 |
<flag name='chardev.qemu-vdagent'/>
|
|
|
032100 |
+ <flag name='migration.blocked-reasons'/>
|
|
|
032100 |
<version>7000000</version>
|
|
|
032100 |
<kvmVersion>0</kvmVersion>
|
|
|
032100 |
<microcodeVersion>42900243</microcodeVersion>
|
|
|
032100 |
diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml
|
|
|
032100 |
index 05f844fd5b..8e2c1652f9 100644
|
|
|
032100 |
--- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml
|
|
|
032100 |
+++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml
|
|
|
032100 |
@@ -243,6 +243,7 @@
|
|
|
032100 |
<flag name='virtio-net.rss'/>
|
|
|
032100 |
<flag name='chardev.qemu-vdagent'/>
|
|
|
032100 |
<flag name='display-dbus'/>
|
|
|
032100 |
+ <flag name='migration.blocked-reasons'/>
|
|
|
032100 |
<version>7000000</version>
|
|
|
032100 |
<kvmVersion>0</kvmVersion>
|
|
|
032100 |
<microcodeVersion>43100243</microcodeVersion>
|
|
|
032100 |
diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml
|
|
|
032100 |
index 3707d9b7c9..9bdb207c4e 100644
|
|
|
032100 |
--- a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml
|
|
|
032100 |
+++ b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml
|
|
|
032100 |
@@ -244,6 +244,7 @@
|
|
|
032100 |
<flag name='chardev.qemu-vdagent'/>
|
|
|
032100 |
<flag name='display-dbus'/>
|
|
|
032100 |
<flag name='iothread.thread-pool-max'/>
|
|
|
032100 |
+ <flag name='migration.blocked-reasons'/>
|
|
|
032100 |
<version>7000050</version>
|
|
|
032100 |
<kvmVersion>0</kvmVersion>
|
|
|
032100 |
<microcodeVersion>43100244</microcodeVersion>
|
|
|
032100 |
--
|
|
|
032100 |
2.35.1
|
|
|
032100 |
|