From nobody Wed Nov 5 06:38:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 14994297152201017.3063682911277; Fri, 7 Jul 2017 05:15:15 -0700 (PDT) Received: from localhost ([::1]:56144 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTSAC-0005Ro-Tv for importer@patchew.org; Fri, 07 Jul 2017 08:15:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTS9T-00055j-2Q for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:14:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTS9O-0002ix-4e for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:14:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:33153 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTS9N-0002iR-U8 for qemu-devel@nongnu.org; Fri, 07 Jul 2017 08:14:22 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8C454AAB9; Fri, 7 Jul 2017 12:14:19 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Alexander Graf To: qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 14:14:43 +0200 Message-Id: <1499429683-73361-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.8.5.6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [Qemu-devel] [PATCH] migration: Make analyze-migration script target-page-size aware X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Dr. David Alan Gilbert" , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The configuration section has a new subsection to transmit the target page size along with the migration stream. The analyze migration script needs to learn about that to read configuration streams that were triggering this subsection to get transmitted. With this patch applied, I can successfully analyze migration streams on AArch64 again. Signed-off-by: Alexander Graf --- scripts/analyze-migration.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py index 1455387..02784f2 100755 --- a/scripts/analyze-migration.py +++ b/scripts/analyze-migration.py @@ -254,12 +254,25 @@ class HTABSection(object): =20 =20 class ConfigurationSection(object): + QEMU_VM_SUBSECTION =3D 0x05 + def __init__(self, file): self.file =3D file =20 def read(self): name_len =3D self.file.read32() name =3D self.file.readstr(len =3D name_len) + oldpos =3D self.file.tell() + if self.file.read8() =3D=3D self.QEMU_VM_SUBSECTION: + name =3D self.file.readstr() + version_id =3D self.file.read32() + if name =3D=3D "configuration/target-page-bits": + target_page_size =3D self.file.read32() + else: + raise Exception("Unknown config subsection: %s" % name) + else: + # No subsection following, forget that we ever read anything + self.file.seek(oldpos) =20 class VMSDFieldGeneric(object): def __init__(self, desc, file): --=20 1.8.5.6