From patchwork Fri Jul 5 08:40:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 810383 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp1509612wru; Fri, 5 Jul 2024 01:49:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVr31An/DrGqjXUjlbAcERjo1YMnwVrkFcOxZFeXyf4aPBWCFVnfHEJZvUKZTawR9yLXxl6DKYPWbeUFuHprgTE X-Google-Smtp-Source: AGHT+IHAv62xAH+LzSyQRYl/AK0QT/Hq277Y3rDpm1kPNoz3Z1a9na7twackECtD4VdjLhZI0Xlb X-Received: by 2002:a05:600c:4b98:b0:425:672a:769a with SMTP id 5b1f17b1804b1-4264a3f2fb3mr37034815e9.31.1720169374563; Fri, 05 Jul 2024 01:49:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720169374; cv=none; d=google.com; s=arc-20160816; b=mV6dX2DKWya4tAivQvJVeyevWNReK0W3/CFP1upiRViG1qukHoIUx9k5WSM8+jlsCl h9hY1yP1jvSaC7dRLZYBf1aKkzg/0Y8SYzhla59VlNEmaWwxYQI70fNZ3S0zTBAkEI3L RDZodP5oMd1xoBTx5gSO5OE6fVKWZ0ArbG4p1GChUisyZGZFc8OtpnRCzN4PMpN0MjJe xb6c0cFrOUny0vhXSwso84Upv8l9pGhfo0t13zNX4DGyyADCd0tzaX4ZmSSZR2f/wOuZ mhncUBzfUqyE7ZMBnnmCoz62udIDkdKLTtXAaS1oZOUzKPGzRkOyCdhdJSwGwK9PUvuX yDYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wP7tDDLg44bwHUt8SqbYxvL0ekGWQNKDr20DKrRYxss=; fh=fOmDb3LWEc8YYk2jJaPNBibuO+xI4aDvcJfVffKo+VU=; b=Wgob+hoF93lIVxbN8yOL83wy33xcn/Vi3+KIm21qqZoLtiV9+UVsvAck+j8Tt/PbHZ fGOTuQQnCbLLzeNFHduUlYnFMvl1WdinUcvrb4jAvZ6n4SGKPLgavF6hfozHfr7nBxu5 yndFFCtL5OXamQL3M0Ptsq2DnCiCEftyyUR/vU1dGyVrzxTLTifRdp4aVRS95uOKNaGU /Ah2rADPttE2PGxa2plM6Z5sn3iD5lSmlOpJ/QvgBajJEyjPd+szcBw+eaa/bkcep+id tqVjozMOGMaDrEN3ORy6DUf8+c1AX12F3D0VqsvLI0d2vVAAOyQvKUyb32pm1talYSUd Lhng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oCRt8zXi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ffacd0b85a97d-367b0971ce7si12201f8f.105.2024.07.05.01.49.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 01:49:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oCRt8zXi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sPebb-00018A-Il; Fri, 05 Jul 2024 04:47: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 1sPebG-0000tm-Te for qemu-devel@nongnu.org; Fri, 05 Jul 2024 04:47:27 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sPeb5-0004Aa-8k for qemu-devel@nongnu.org; Fri, 05 Jul 2024 04:47:25 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-58b5f7bf3edso880706a12.0 for ; Fri, 05 Jul 2024 01:47:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720169232; x=1720774032; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wP7tDDLg44bwHUt8SqbYxvL0ekGWQNKDr20DKrRYxss=; b=oCRt8zXiielVnfGoVZacjZ6UYFMT3ewmaZh8tbnCS99ir/YPMpB7IKZBmTca0xLV0X jCEtgJftL9NF+LUE5viHwXkLYdw0ExmpvW+obOPNN9VYoxfTsrv2t8Fo52pZ/379soh4 0zOa0Nv+Oq4G0EhmIB94/Tuvsfw3X5Utq2D5aVXbSZ8XTM1zLX3rWmU45e3kamFw5F+C 2d3vEPiQvg2aIUQlpTY4Spk0eqNe7YWWs+x18Kayv2MhJZnOuazcpqMaxQlxZqqxDV2n NyxWLeWLoopiKoxbm+BCDCv6UfMsTyN+qusJFW3+FbCDY0BDUaYwPZKv9/WYKUYe0faZ KVdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720169232; x=1720774032; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wP7tDDLg44bwHUt8SqbYxvL0ekGWQNKDr20DKrRYxss=; b=HF2IzBbvvLhGG6xPqpPcfV1I3kS2efElf0CGHGBOzfhPK6g2E+kbFGoQ5yLYJW5qBb BdGdpbmB2e9JNcN3XTrwC9lbwJxkeuAAZqTIxC5RNV2aKBwIvoKv+4l36dbvQFlYX+qf d+E2CAA5tiNdjVdVW5g1H6d+0qneohiHskwSf6qsGJLPJ+G02Yvqs3d6PdV08rQDN8uY 0S57oGe3eGLZqgDmGWjeXZ/UbMuZSLzXFOQL56NirtYoWXByA8XrvAe4cKQiUWDKMKND PPznQ9gLFw6V2RqL/Ct7YJTbw0FoGSJ1zJoXfAUnvItLhCZfCM7zho4NtQ9WOstYS+KU 3ihQ== X-Gm-Message-State: AOJu0YwAt2YooqNFnhGpThSX+9YKKHl+OC05SoR1eaJeKpnM5yPb+Drb HPcJZUw1FsMxM6z2Fqs7PG7QioS0627lUoT3DXZRGkRxz7WhE/LTWvbvJVIOskA= X-Received: by 2002:a05:6402:5108:b0:58b:2d93:ad6c with SMTP id 4fb4d7f45d1cf-58e5a408b30mr4002966a12.19.1720169231495; Fri, 05 Jul 2024 01:47:11 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-58eeabbf108sm1247721a12.93.2024.07.05.01.47.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 01:47:10 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 085AA62142; Fri, 5 Jul 2024 09:40:50 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Beraldo Leal , David Hildenbrand , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier , Alexandre Iooss , Thomas Huth , Mahmoud Mandour , Peter Maydell , qemu-arm@nongnu.org, Aleksandar Rikalo , Mads Ynddal , Yanan Wang , Eduardo Habkost , Peter Xu , Richard Henderson , Marcel Apfelbaum , Paul Burton , Stefan Hajnoczi , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Subject: [PATCH v2 24/40] plugins/lockstep: make mixed-mode safe Date: Fri, 5 Jul 2024 09:40:31 +0100 Message-Id: <20240705084047.857176-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240705084047.857176-1-alex.bennee@linaro.org> References: <20240705084047.857176-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The ExecState is shared across the socket and if we want to compare say 64 bit and 32 bit binaries we need the two to use the same sizes for things. Message-Id: <20240628124258.832466-11-alex.bennee@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- contrib/plugins/lockstep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 111ec3fa27..761bcdf363 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -57,7 +57,7 @@ typedef struct { /* The execution state we compare */ typedef struct { uint64_t pc; - unsigned long insn_count; + uint64_t insn_count; } ExecState; typedef struct { @@ -148,7 +148,7 @@ static void report_divergance(ExecState *us, ExecState *them) g_string_printf(out, "Δ insn_count @ 0x%016" PRIx64 - " (%ld) vs 0x%016" PRIx64 " (%ld)\n", + " (%"PRId64") vs 0x%016" PRIx64 " (%"PRId64")\n", us->pc, us->insn_count, them->pc, them->insn_count); for (entry = log, i = 0;