summary refs log tree commit diff stats
path: root/scripts/analyze-migration.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-11-05 10:10:57 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-11-05 10:10:57 +0000
commit6c5f30cad290c745f910481d0e890b3f4fad1f00 (patch)
tree227ffd08b40aba8f7f64a4266b38ca15f8d22d8e /scripts/analyze-migration.py
parent2b5a79f1d961f07332cf77f38cdf9dc2fc7e2b64 (diff)
parent96e5c9bc77acef8b7b56cbe23a8a2611feff9e34 (diff)
downloadfocaccia-qemu-6c5f30cad290c745f910481d0e890b3f4fad1f00.tar.gz
focaccia-qemu-6c5f30cad290c745f910481d0e890b3f4fad1f00.zip
Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20151104' into staging
migration/next for 20151104

# gpg: Signature made Wed 04 Nov 2015 12:45:19 GMT using RSA key ID 5872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
# gpg:                 aka "Juan Quintela <quintela@trasno.org>"

* remotes/juanquintela/tags/migration/20151104:
  migration: fix analyze-migration.py script
  migration: code clean up
  migration: rename cancel to cleanup in SaveVMHandles
  migration: rename qemu_savevm_state_cancel
  migration: defer migration_end & blk_mig_cleanup

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/analyze-migration.py')
-rwxr-xr-xscripts/analyze-migration.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py
index f6894bece9..14553876a2 100755
--- a/scripts/analyze-migration.py
+++ b/scripts/analyze-migration.py
@@ -252,6 +252,15 @@ class HTABSection(object):
     def getDict(self):
         return ""
 
+
+class ConfigurationSection(object):
+    def __init__(self, file):
+        self.file = file
+
+    def read(self):
+        name_len = self.file.read32()
+        name = self.file.readstr(len = name_len)
+
 class VMSDFieldGeneric(object):
     def __init__(self, desc, file):
         self.file = file
@@ -474,6 +483,7 @@ class MigrationDump(object):
     QEMU_VM_SECTION_FULL  = 0x04
     QEMU_VM_SUBSECTION    = 0x05
     QEMU_VM_VMDESCRIPTION = 0x06
+    QEMU_VM_CONFIGURATION = 0x07
     QEMU_VM_SECTION_FOOTER= 0x7e
 
     def __init__(self, filename):
@@ -514,6 +524,9 @@ class MigrationDump(object):
             section_type = file.read8()
             if section_type == self.QEMU_VM_EOF:
                 break
+            elif section_type == self.QEMU_VM_CONFIGURATION:
+                section = ConfigurationSection(file)
+                section.read()
             elif section_type == self.QEMU_VM_SECTION_START or section_type == self.QEMU_VM_SECTION_FULL:
                 section_id = file.read32()
                 name = file.readstr()