diff options
author | Laurent Vivier <lvivier@redhat.com> | 2017-12-05 13:27:40 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2018-01-15 12:47:58 +0100 |
commit | 029ff892e1049ca4f93f9d8f0059bc02fffd6e32 (patch) | |
tree | e58f0e5c87890c5176b2a4c4ddd83defb8b90deb /scripts | |
parent | 9c43435dc1f872a1452792fd8d9dbcf5c0482e46 (diff) | |
download | qemu-029ff892e1049ca4f93f9d8f0059bc02fffd6e32.zip qemu-029ff892e1049ca4f93f9d8f0059bc02fffd6e32.tar.gz qemu-029ff892e1049ca4f93f9d8f0059bc02fffd6e32.tar.bz2 |
migration: fix analyze-migration.py script with radix table
Since commit 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
the HTAB migration stream contains a header set to "-1", meaning there
is no HPT. Teach analyze-migration.py to ignore the section in this case.
Without this fix, the script fails with a dump from a POWER9 guest:
Traceback (most recent call last):
File "./qemu/scripts/analyze-migration.py", line 602, in <module>
dump.read(dump_memory = args.memory)
File "./qemu/scripts/analyze-migration.py", line 539, in read
section.read()
File "./qemu/scripts/analyze-migration.py", line 250, in read
self.file.readvar(n_valid * self.HASH_PTE_SIZE_64)
File "./qemu/scripts/analyze-migration.py", line 64, in readvar
raise Exception("Unexpected end of %s at 0x%x" % (self.filename, self.file.tell()))
Exception: Unexpected end of migrate.dump at 0x1d4763ba
Fixes: 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/analyze-migration.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py index 1455387..88ff4ad 100755 --- a/scripts/analyze-migration.py +++ b/scripts/analyze-migration.py @@ -234,6 +234,10 @@ class HTABSection(object): header = self.file.read32() + if (header == -1): + # "no HPT" encoding + return + if (header > 0): # First section, just the hash shift return |