backup: Add two new qemu capabilities

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).

Existing code is not affected by the new capabilities.

Signed-off-by: Eric Blake <eblake@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Eric Blake 2019-06-05 21:25:05 -05:00
parent 73bf0a9c28
commit 6abda7a445
8 changed files with 22 additions and 0 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>