[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 06/14] migration: fix analyze-migration.py script wit
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 06/14] migration: fix analyze-migration.py script with radix table |
Date: |
Wed, 3 Jan 2018 10:38:26 +0100 |
From: Laurent Vivier <address@hidden>
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 <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
scripts/analyze-migration.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py
index 14553876a2..88ff4adb30 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
--
2.14.3
- [Qemu-devel] [PULL 00/14] Migration pull request, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 01/14] migration: Use proper types in json, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 03/14] migration: free addr in the same function that we created it, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 02/14] migration: print features as on off, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 05/14] migration: free result string, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 06/14] migration: fix analyze-migration.py script with radix table,
Juan Quintela <=
- [Qemu-devel] [PULL 04/14] docs: Convert migration.txt to rst, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 07/14] migration: introduce postcopy-blocktime capability, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 08/14] migration: add postcopy blocktime ctx into MigrationIncomingState, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 09/14] migration: calculate vCPU blocktime on dst side, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 11/14] migration: add blocktime calculation into migration-test, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 10/14] migration: postcopy_blocktime documentation, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 12/14] migration: add postcopy total blocktime into query-migrate, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 13/14] migration: Guard ram_bytes_remaining against early call, Juan Quintela, 2018/01/03
- [Qemu-devel] [PULL 14/14] migration: finalize current_migration object, Juan Quintela, 2018/01/03
- Re: [Qemu-devel] [PULL 00/14] Migration pull request, Eric Blake, 2018/01/04