]> xenbits.xensource.com Git - libvirt.git/commitdiff
backup: Add two new qemu capabilities
authorEric Blake <eblake@redhat.com>
Thu, 6 Jun 2019 02:25:05 +0000 (21:25 -0500)
committerEric Blake <eblake@redhat.com>
Wed, 12 Jun 2019 02:42:57 +0000 (21:42 -0500)
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>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml
tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml
tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml
tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml
tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml
tests/qemucapabilitiesdata/caps_4.0.0.x86_64.xml

index c8d724aed5435b04d8d778487cdbf60957012c00..d0fdd1da9fd8edc127263abd52b0bfac5caae1e0 100644 (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;
index 0f282ad239ebb26e47d2f6a2f19ca9b4c63f4811..3032d4edcd85c7fe729a99b9603fe49e712fe852 100644 (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;
 
index e071bc0c8d28530e081bad19c138b5e44d35e43e..250b7edd528ce38926053d918fc9be1ae8ae66fa 100644 (file)
   <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>
index 9c4e6583ec2d5f29cac4ea542c67599027bda9df..24b55002a601fbb894c9bca11702d380e217f10d 100644 (file)
   <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>
index e987cdd41575766ee8473a232dad0443641c6796..230e1e7c994019964d17a93e4a2e9ccb81740f92 100644 (file)
   <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>
index e1a07dd9454444280a8e6f3da74cc981c235595e..4b2f4cf628efb58e5fd0f4f11eac37b7ab8bc3ff 100644 (file)
   <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>
index 8cb537eaf4b5f0b80a989e7bc29703b22a3a59ab..a1ac2587a038db0f56b5315b9e0d7e36b46eda48 100644 (file)
   <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>
index ca7174e3b9af4c2e9c15c49423a7bf5cebe7a97e..68845cca744a28cebdfd41d6f34db8ee559c20f5 100644 (file)
   <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>