Add two capabilities for testing features required for the upcoming
virDomainBackupBegin: use block-dirty-bitmap-merge as the generic
witness of bitmap support needed for checkpoints (since all of the
bitmap management functionalities were finalized in the same qemu 4.0
release), and the bitmap parameter to nbd-server-add for pull-mode
backup support. Even though both capabilities are likely to be
present or absent together (that is, it is unlikely to encounter a
qemu that backports only one of the two), it still makes sense to keep
two capabilities as the two uses are orthogonal (full backups don't
require checkpoints, push mode backups don't require NBD bitmap
support, and checkpoints can be used for more than just incremental
backups).
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
src/qemu/qemu_capabilities.h | 4 ++++
src/qemu/qemu_capabilities.c | 6 ++++++
tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 2 ++
tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml | 2 ++
8 files changed, 22 insertions(+)
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 0f282ad239..3032d4edcd 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -509,6 +509,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
QEMU_CAPS_QUERY_CURRENT_MACHINE, /* query-current-machine command */
QEMU_CAPS_MACHINE_VIRT_IOMMU, /* -machine virt,iommu */
+ /* 330 */
+ QEMU_CAPS_BITMAP_MERGE, /* block-dirty-bitmap-merge */
+ QEMU_CAPS_NBD_BITMAP, /* nbd-server-add supports bitmap */
+
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c8d724aed5..d0fdd1da9f 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -526,6 +526,10 @@ VIR_ENUM_IMPL(virQEMUCaps,
"overcommit",
"query-current-machine",
"machine.virt.iommu",
+
+ /* 330 */
+ "bitmap-merge",
+ "nbd-bitmap",
);
@@ -970,6 +974,7 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
{ "qom-list-properties", QEMU_CAPS_QOM_LIST_PROPERTIES },
{ "blockdev-del", QEMU_CAPS_BLOCKDEV_DEL },
{ "query-current-machine", QEMU_CAPS_QUERY_CURRENT_MACHINE },
+ { "block-dirty-bitmap-merge", QEMU_CAPS_BITMAP_MERGE },
};
struct virQEMUCapsStringFlags virQEMUCapsMigration[] = {
@@ -1264,6 +1269,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] =
{
{ "block-commit/arg-type/*top", QEMU_CAPS_ACTIVE_COMMIT },
{ "query-iothreads/ret-type/poll-max-ns", QEMU_CAPS_IOTHREAD_POLLING },
{ "query-display-options/ret-type/+egl-headless/rendernode",
QEMU_CAPS_EGL_HEADLESS_RENDERNODE },
+ { "nbd-server-add/arg-type/bitmap", QEMU_CAPS_NBD_BITMAP },
};
typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps;
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml
index e071bc0c8d..250b7edd52 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml
@@ -161,6 +161,8 @@
<flag name='overcommit'/>
<flag name='query-current-machine'/>
<flag name='machine.virt.iommu'/>
+ <flag name='bitmap-merge'/>
+ <flag name='nbd-bitmap'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700758</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
index 9c4e6583ec..24b55002a6 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
@@ -166,6 +166,8 @@
<flag name='virtio-pci-non-transitional'/>
<flag name='overcommit'/>
<flag name='query-current-machine'/>
+ <flag name='bitmap-merge'/>
+ <flag name='nbd-bitmap'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900758</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
index e987cdd415..230e1e7c99 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
@@ -164,6 +164,8 @@
<flag name='virtio-pci-non-transitional'/>
<flag name='overcommit'/>
<flag name='query-current-machine'/>
+ <flag name='bitmap-merge'/>
+ <flag name='nbd-bitmap'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
index e1a07dd945..4b2f4cf628 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
@@ -164,6 +164,8 @@
<flag name='virtio-pci-non-transitional'/>
<flag name='overcommit'/>
<flag name='query-current-machine'/>
+ <flag name='bitmap-merge'/>
+ <flag name='nbd-bitmap'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml
index 8cb537eaf4..a1ac2587a0 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml
@@ -129,6 +129,8 @@
<flag name='virtio-pci-non-transitional'/>
<flag name='overcommit'/>
<flag name='query-current-machine'/>
+ <flag name='bitmap-merge'/>
+ <flag name='nbd-bitmap'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>39100758</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
index ca7174e3b9..68845cca74 100644
--- a/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml
@@ -202,6 +202,8 @@
<flag name='virtio-pci-non-transitional'/>
<flag name='overcommit'/>
<flag name='query-current-machine'/>
+ <flag name='bitmap-merge'/>
+ <flag name='nbd-bitmap'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100758</microcodeVersion>
--
2.20.1