[PATCH 2/4] lib: Add win-dmp crashdump format

Michal Privoznik mprivozn at redhat.com
Thu May 20 13:49:53 UTC 2021


QEMU gained support for 'win-dmp' format in it's release of 2.13,
but Libvirt doesn't implement it yet. Fortunately, there not much
needed: new value to virDomainCoreDumpFormat public enum, which
unfortunately means that QEMU driver has to be updated in the
same commit, because of VIR_ENUM_IMPL().

Luckily, we don't need any extra QEMU capability - the code
already checks supported formats via
'query-dump-guest-memory-capability' just before issuing
'dump-guest-memory'.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 include/libvirt/libvirt-domain.h | 1 +
 src/qemu/qemu_driver.c           | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index b33eede68b..7ef8ac51e5 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -691,6 +691,7 @@ typedef enum {
                                                * lzo compression */
     VIR_DOMAIN_CORE_DUMP_FORMAT_KDUMP_SNAPPY, /* kdump-compressed format, with
                                                * snappy compression */
+    VIR_DOMAIN_CORE_DUMP_FORMAT_WIN_DMP,      /* Windows full crashdump format */
 # ifdef VIR_ENUM_SENTINELS
     VIR_DOMAIN_CORE_DUMP_FORMAT_LAST
     /*
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index c90d52edc0..e10e699a1a 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -143,6 +143,7 @@ VIR_ENUM_IMPL(qemuDumpFormat,
               "kdump-zlib",
               "kdump-lzo",
               "kdump-snappy",
+              "win-dmp",
 );
 
 
-- 
2.26.3




More information about the libvir-list mailing list