From nobody Wed Feb 11 02:07:28 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1696877049; cv=none; d=zohomail.com; s=zohoarc; b=C/XDG8PI0cFqiL2J8WrouHpnKHX4Z1OLSP9srvNLqQ4Vo8DHJ8HgZy6g8usjksj3n28H7MZm0MEGyTlTo2ZSG8a775fQEgkO9zGD1qqe6wVRbzFbMJC1SpSc5TK3w+16dW1JSr/bSTTJQO4qLUqkYr2sb27R+VBLLLsZKNFHF34= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696877049; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+6DtYIBIKXIIAG12wBUaJfL9grCmQLGHkvwNS8pZV40=; b=f0VoZawqdmEV1gLAAatwU/ANKrFX1Bs/zy/uA2zTqw53SvJCysM4ySV23iDcIKsAwzkm/4LMhUDoThm5EUhM08krU1JnFZqhcNH6ogt4rmMo3qwIfUDBdQWhRD8NITYQFUk1NJOl8rhM/6RWnMNp8PBTY1LdyM1tk/TylkDuXVs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1696877049791695.492271824507; Mon, 9 Oct 2023 11:44:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpvEK-0007gn-Kx; Mon, 09 Oct 2023 14:43:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpvEI-0007fw-JU for qemu-devel@nongnu.org; Mon, 09 Oct 2023 14:43:46 -0400 Received: from smtp-out2.suse.de ([2001:67c:2178:6::1d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpvEH-0000nL-16 for qemu-devel@nongnu.org; Mon, 09 Oct 2023 14:43:46 -0400 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B48A81F38D; Mon, 9 Oct 2023 18:43:43 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8FFAA13586; Mon, 9 Oct 2023 18:43:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QD9HFt1JJGWFEgAAMHmgww (envelope-from ); Mon, 09 Oct 2023 18:43:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1696877023; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+6DtYIBIKXIIAG12wBUaJfL9grCmQLGHkvwNS8pZV40=; b=IwXjSk0CfQEshPBl0O1XZRkNed1gibFowilTZ4/jX4Fo/lV/rb8pCEka2aRcxZf1lB8NDx AYpZRLD+Gb2pTtuZutYTzJ2zvzv0li4f/tHjy/5+bdLDHvle+Z5sevRu/DwT9VdAEvnXdX qP1n8kyKX3u5w+kvozz5G7bG+8H7dKo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1696877023; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+6DtYIBIKXIIAG12wBUaJfL9grCmQLGHkvwNS8pZV40=; b=CaA//KYv/AxzzDnmjRet+h1wICvOqNsnwMyj4AzUGoxLzxBj0wBH5dq5ye7YT8YmT7JZSY RR8DVYmG2UvNY8DQ== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Juan Quintela , Peter Xu , Leonardo Bras , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Thomas Huth , John Snow , Cleber Rosa Subject: [PATCH v2 5/6] migration: Fix analyze-migration read operation signedness Date: Mon, 9 Oct 2023 15:43:25 -0300 Message-Id: <20231009184326.15777-6-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20231009184326.15777-1-farosas@suse.de> References: <20231009184326.15777-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:67c:2178:6::1d; envelope-from=farosas@suse.de; helo=smtp-out2.suse.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @suse.de) X-ZM-MESSAGEID: 1696877050211100001 Content-Type: text/plain; charset="utf-8" The migration code uses unsigned values for 16, 32 and 64-bit operations. Fix the script to do the same. This was causing an issue when parsing the migration stream generated on the ppc64 target because one of instance_ids was larger than the 32bit signed maximum: Traceback (most recent call last): File "/home/fabiano/kvm/qemu/build/scripts/analyze-migration.py", line 65= 8, in dump.read(dump_memory =3D args.memory) File "/home/fabiano/kvm/qemu/build/scripts/analyze-migration.py", line 59= 2, in read classdesc =3D self.section_classes[section_key] KeyError: ('spapr_iommu', -2147483648) Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela --- scripts/analyze-migration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py index 56ab04dd2d..de506cb8bf 100755 --- a/scripts/analyze-migration.py +++ b/scripts/analyze-migration.py @@ -38,13 +38,13 @@ def __init__(self, filename): self.file =3D open(self.filename, "rb") =20 def read64(self): - return int.from_bytes(self.file.read(8), byteorder=3D'big', signed= =3DTrue) + return int.from_bytes(self.file.read(8), byteorder=3D'big', signed= =3DFalse) =20 def read32(self): - return int.from_bytes(self.file.read(4), byteorder=3D'big', signed= =3DTrue) + return int.from_bytes(self.file.read(4), byteorder=3D'big', signed= =3DFalse) =20 def read16(self): - return int.from_bytes(self.file.read(2), byteorder=3D'big', signed= =3DTrue) + return int.from_bytes(self.file.read(2), byteorder=3D'big', signed= =3DFalse) =20 def read8(self): return int.from_bytes(self.file.read(1), byteorder=3D'big', signed= =3DTrue) --=20 2.35.3