summary refs log tree commit diff stats
path: root/qemu-options.hx
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2014-06-20 18:56:08 +0530
committerJuan Quintela <quintela@redhat.com>2014-06-23 19:14:50 +0200
commitabfd9ce341ec66eb2e63756b9da43f77c054788e (patch)
tree025a056ec9e74179c8b4ca4971b30cc06c261281 /qemu-options.hx
parente325b49a320b493cc5d69e263751ff716dc458fe (diff)
downloadfocaccia-qemu-abfd9ce341ec66eb2e63756b9da43f77c054788e.tar.gz
focaccia-qemu-abfd9ce341ec66eb2e63756b9da43f77c054788e.zip
migration: dump vmstate info as a json file for static analysis
This commit adds a new command, '-dump-vmstate', that takes a filename
as an argument.  When executed, QEMU will dump the vmstate information
for the machine type it's invoked with to the file, and quit.

The JSON-format output can then be used to compare the vmstate info for
different QEMU versions, specifically to test whether live migration
would break due to changes in the vmstate data.

A Python script that compares the output of such JSON dumps is included
in the following commit.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'qemu-options.hx')
-rw-r--r--qemu-options.hx14
1 files changed, 14 insertions, 0 deletions
diff --git a/qemu-options.hx b/qemu-options.hx
index ca75760b27..ff76ad4830 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3252,6 +3252,20 @@ STEXI
 prepend a timestamp to each log message.(default:on)
 ETEXI
 
+DEF("dump-vmstate", HAS_ARG, QEMU_OPTION_dump_vmstate,
+    "-dump-vmstate <file>\n"
+    "                Output vmstate information in JSON format to file.\n"
+    "                Use the scripts/vmstate-static-checker.py file to\n"
+    "                check for possible regressions in migration code\n"
+    "                by comparing two such vmstate dumps.",
+    QEMU_ARCH_ALL)
+STEXI
+@item -dump-vmstate @var{file}
+@findex -dump-vmstate
+Dump json-encoded vmstate information for current machine type to file
+in @var{file}
+ETEXI
+
 HXCOMM This is the last statement. Insert new options before this line!
 STEXI
 @end table