]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: capabilities: Add detection of the 'savevm' fix for -blockdev
authorPeter Krempa <pkrempa@redhat.com>
Tue, 17 Sep 2019 15:10:08 +0000 (17:10 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 22 Nov 2019 11:51:27 +0000 (12:51 +0100)
The 'savevm' HMP command didn't work properly with blockdev as it tried
to do snapshot of everything including the protocol nodes accessing
files which are not snapshottable. Qemu fixed this bug so now we need to
detect it to allow enabling blockdev.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml
tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml

index b5f6af8dff90fcd371db7faaf7e2496f9ca1abef..510182582326e715d3cdc63df896bcfb21b8fded 100644 (file)
@@ -551,6 +551,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
               /* 345 */
               "arm-max-cpu",
               "blockdev-file-dynamic-auto-read-only",
+              "savevm-monitor-nodes",
     );
 
 
@@ -1397,6 +1398,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
     { "nbd-server-add/arg-type/bitmap", QEMU_CAPS_NBD_BITMAP },
     { "blockdev-add/arg-type/+file/drop-cache", QEMU_CAPS_MIGRATION_FILE_DROP_CACHE },
     { "blockdev-add/arg-type/+file/$dynamic-auto-read-only", QEMU_CAPS_BLOCK_FILE_AUTO_READONLY_DYNAMIC },
+    { "human-monitor-command/$savevm-monitor-nodes", QEMU_CAPS_SAVEVM_MONITOR_NODES },
 };
 
 typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps;
index 63edf451bb8fbb019cf6b169d589d265d69725d7..3fd8bebe7927c41015e1ce983ec39cbeac7623f7 100644 (file)
@@ -532,6 +532,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
     /* 345 */
     QEMU_CAPS_ARM_MAX_CPU, /* max-arm-cpu type exists */
     QEMU_CAPS_BLOCK_FILE_AUTO_READONLY_DYNAMIC, /* the auto-read-only property of block backends for files is dynamic */
+    QEMU_CAPS_SAVEVM_MONITOR_NODES, /* 'savevm' handles monitor-owned nodes properly */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
index 81c5fa80fffc375d434dc67d9a15d0271364dc55..3bae6d8e2c9d6fcdcf842f8cfca14ca77e9be566 100644 (file)
   <flag name='ramfb'/>
   <flag name='arm-max-cpu'/>
   <flag name='blockdev-file-dynamic-auto-read-only'/>
+  <flag name='savevm-monitor-nodes'/>
   <version>4001050</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>61700242</microcodeVersion>
index 0d04413664b8741143e84788b6b6d34c4c61d723..561f756ead98964a530d7ef6ceb98530c497662b 100644 (file)
   <flag name='vhost-user-vga'/>
   <flag name='ramfb'/>
   <flag name='blockdev-file-dynamic-auto-read-only'/>
+  <flag name='savevm-monitor-nodes'/>
   <version>4001092</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>43100242</microcodeVersion>