From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704726851; cv=none; d=zohomail.com; s=zohoarc; b=K10vt9x+W51/bhP8YtAX7hXcbo5pd/9YRN4ilinUy862IjZ8KZqWnpW/yN7jQ7g13Kodv1nSe+OyOQe3KegQN9UhKj3HrshXFjEHxh3WoCt+kK1QKJqCy9GJuYylavo7RsHdKJmCjoTQSsHzNDc3+RO1IABrJNeJE4/UKt5h5Wo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704726851; h=Content-Type: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=OXuo8l/nA31Hwk3vdPvJmIYU7WuVY275jbIT2FWOsWk=; b=kzaLbAXJIuUjQIbH6crR6rk04lUqVIYzpLVD828YhTma/ZgUCfK/FNKOZHEsOm7yXmrO5E7mtsZem7aKzSiaPhUkUG22eIjFnCi9RNIbOjF5V583LSPHIG+hQjWgfCdfom6/f93mOSM3+829IcFOrHhnTQlZsOsamlYEwG+gHVU= 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 1704726851788242.59092961842794; Mon, 8 Jan 2024 07:14:11 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKB-0004CS-Sb; Mon, 08 Jan 2024 10:13:59 -0500 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 1rMrKA-0004C9-1h for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:13:58 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrK7-0001Wc-Tf for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:13:57 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3368d1c7b23so1938529f8f.0 for ; Mon, 08 Jan 2024 07:13:54 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a5-20020adffb85000000b003376af392e5sm2440383wrr.38.2024.01.08.07.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:13:53 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F37B85F93F; Mon, 8 Jan 2024 15:13:52 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726834; x=1705331634; 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=OXuo8l/nA31Hwk3vdPvJmIYU7WuVY275jbIT2FWOsWk=; b=fbXAgWJPYjahZYqelUbD5rFvFE5XoA5rhDWul6ietHWtr08EvhVsXI6bbOtbj+T2p6 nOyH0aJQ7Dr713nJ7RqwaS4a5K7aV2MhODNM+yzJOrL3I/DK+InCtsdEmG8y3zErFSC6 FhzeMalnYhnFk9q4C7ZLIlDYv48Dwqb3/dWtZjDh7PkdVWPO5JcQOUrO9EeSBstbuOzp UAFV7pqzftjbK5ZHml0jci2iE4tJyNEskgsCM17JjgBV+2knYXdz1gke1wnTvHRS5o2r YwQsBhdnUzg7EWiH1hTwTUryfP42IXUF2PB2DT4HJ2TC7NWkHxVpnuWuvG0BzH4scs7g k7Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726834; x=1705331634; 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=OXuo8l/nA31Hwk3vdPvJmIYU7WuVY275jbIT2FWOsWk=; b=eO+5gjuyNPv03oKX1q/5hcaZS5kToCbOeySARQ7Z6w/JVu3S7J0iC+1rYukNGY0/kT qTBU0Di8szBPxKgm2osMVCUDJdSzu2SpaYZoVwPk/PKqUWBm5rZU6LfxTVrWj6PmNqA3 YojxuNIaT0rMAwc+vHbxJyfB51jZbFxhLC/oIajzDnPeWyTzYMSrzoTM0Kr8wDrNVj8O AiPnuHI0lnjiKf5bBiS2YAg3t7WS+owJJxCrNEe+72YMEycZ4zbOYFyCEIzYNANFXE/Y OrOsIVUNAG+b12RLAv15Y1DueB05pTrt5DhHkRm074WR+lDNC3wb41eyIzNUui9T8oeE rlWw== X-Gm-Message-State: AOJu0YyEXOZaWlvutBQx4Z+fhVQalRn3hcrjOqu0AKzxzrRZQlxzJhfW RnYtYDG93jhrgIB2ixKtcP8Hn9DbC/IAyQ== X-Google-Smtp-Source: AGHT+IGUK7/Uk83dZXFKIZPuiffzu4/pZb+Qh1A/PHiIEVOi5OCL1cNPKTcV6KrhqfBaw9kxOTdrBg== X-Received: by 2002:a5d:5184:0:b0:337:2296:adb0 with SMTP id k4-20020a5d5184000000b003372296adb0mr1925590wrv.54.1704726833743; Mon, 08 Jan 2024 07:13:53 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pavel Dovgalyuk , Richard Henderson , Pavel Dovgalyuk , Paolo Bonzini , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 01/13] tests/avocado: add a simple i386 replay kernel test Date: Mon, 8 Jan 2024 15:13:40 +0000 Message-Id: <20240108151352.2199097-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704726853900100003 There are a number of bugs against 32 bit x86 on the tracker. Lets at least establish a baseline pure kernel boot can do record/replay before we start looking at the devices. Acked-by: Pavel Dovgalyuk Acked-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-2-alex.bennee@linaro.org> diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py index c37afa662c2..1eaa36444cb 100644 --- a/tests/avocado/replay_kernel.py +++ b/tests/avocado/replay_kernel.py @@ -82,6 +82,22 @@ def run_rr(self, kernel_path, kernel_command_line, conso= le_pattern, =20 class ReplayKernelNormal(ReplayKernelBase): =20 + def test_i386_pc(self): + """ + :avocado: tags=3Darch:i386 + :avocado: tags=3Dmachine:pc + """ + kernel_url =3D ('https://storage.tuxboot.com/20230331/i386/bzImage= ') + kernel_hash =3D 'a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb8= 6e277f1b76ed956' + kernel_path =3D self.fetch_asset(kernel_url, + asset_hash=3Dkernel_hash, + algorithm =3D "sha256") + + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' + console_pattern =3D 'VFS: Cannot open root device' + + self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) + # See https://gitlab.com/qemu-project/qemu/-/issues/2010 @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test sometimes gets s= tuck') def test_x86_64_pc(self): --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704726921; cv=none; d=zohomail.com; s=zohoarc; b=AGmoy9FhVEMgnsMzMww4S3HljUyqRuMNV51et6ewo+m9sSfjyXyH1zrm4LgbcbTeQ0i4Uplu1I01fRabz55uq2A8KK80kqszWoXxN1Au82dxWocoe0dvGvGm8dduylDBlOE6akYJ+n6/W3Pr4HlSkIRSnND+f8jyOlpwJ+bkm2k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704726921; h=Content-Type: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=wnYL/+L/m9RcK0IeiSLcPjsAr8XsHeZX4IFVvVVgTiE=; b=au6sI10p0h7V2Fy4Cd/OE01NI2TKcsnq7WfA1ZjcCwb0N1cJ5+3x2vR4NdwZ3JzMc0d07597xbOjhKp3xHBdxekjmdHEk5ayMt7mEbazmUiCDhzx9xRXMoWwIUS6DKB7J7CCgflCGa8V1dHqwdzbCJAGz3PK8SWQXQxQx9Ad+T4= 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 1704726921510303.73143668741216; Mon, 8 Jan 2024 07:15:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKG-0004Dt-07; Mon, 08 Jan 2024 10:14:04 -0500 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 1rMrKE-0004D9-FQ for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:02 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrK8-0001Wl-8M for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:02 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3367a304091so1894744f8f.3 for ; Mon, 08 Jan 2024 07:13:55 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id v15-20020adfebcf000000b00336673a4153sm8020931wrn.80.2024.01.08.07.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:13:53 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 12CDB5F940; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726834; x=1705331634; 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=wnYL/+L/m9RcK0IeiSLcPjsAr8XsHeZX4IFVvVVgTiE=; b=I+5hDEFvayNb+0q1B+0rEY46a3fhCvdkJnOZ6OfsPnrXuRB0oO2wJLP9giKRkeA5NF LQjBvq1QhdIkKvCx/sM0lOCjANp2QQfNo13ImkYPT0g8zwjMWWZqIOFH+r3eThYzXA+i ISpYls4QVruv1/4rCTnGITnvqW2rdUp02pqdyNTwJfzUGZHWINmxhsEyB5DMpoczl1fm gzayI0mlOfamVHb3UlWidXPI67I24ByJ7WDr8TMVp10/oTeSwiH3FV/Swpw5DSxzNqNy 1/4YY5gNP4b19Lg1dDIPOPBhjQr2sgeF6WSSoaHB7YVWXQ517tuyzVDZr5vHPppx9I4M XsOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726834; x=1705331634; 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=wnYL/+L/m9RcK0IeiSLcPjsAr8XsHeZX4IFVvVVgTiE=; b=vINewTDN9fqY0Kmesu3Dr+fX5xmza18JsLtsRs+hjW7GmuvFwmikwALWH293RGkU69 h8fb+wdd5NaD3DNEyT7mc22sYJ5QFrPWhWZ8KeCwuX0GhhNXYrtZnuocFatI1ZQ3fn0V 4rqHnu0u2YjO0xkqcIY90qMv6a+UGaWh6UDeMiQiCk4hIvUR3FxRlREdNcHXIZb0JkC2 G2rrnQ/e+5/CQlvvzFszsfp1eoQhZ0ghSbi7/B/Ct3rjmiKS3sJnvJnL84jFloNV3K3Q DMqwtuz5yX55ST0AwwhEJzXjWrWVYmN9b4lGuqwJIqYywAXYtihKFhicE/gadGFHJkIy S1ng== X-Gm-Message-State: AOJu0YwxmhlhkpYXItWSAZiZjEEwmQBynD97Kua3bgMxYBj3uXXJwM16 vQ+SuW5vnVKXdXhS+nQNk8IXY7N/cV/qhpuKN6Eo61XlAsI= X-Google-Smtp-Source: AGHT+IFPLsr/MLVbqZp6gNaupYlgFLBDN2NOuiUNxzV6rdqzox7h+KZ5tuJHPUGa2PCCZAEgzpXhsw== X-Received: by 2002:a05:600c:1e0a:b0:40e:486f:45ac with SMTP id ay10-20020a05600c1e0a00b0040e486f45acmr377097wmb.19.1704726833941; Mon, 08 Jan 2024 07:13:53 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pavel Dovgalyuk , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Pavel Dovgalyuk , Paolo Bonzini , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 02/13] tests/avocado: fix typo in replay_linux Date: Mon, 8 Jan 2024 15:13:41 +0000 Message-Id: <20240108151352.2199097-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704726922179100001 Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-3-alex.bennee@linaro.org> diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 270ccc1eae8..e95bff32999 100644 --- a/tests/avocado/replay_linux.py +++ b/tests/avocado/replay_linux.py @@ -94,7 +94,7 @@ def launch_and_wait(self, record, args, shift): else: vm.event_wait('SHUTDOWN', self.timeout) vm.wait() - logger.info('successfully fihished the replay') + logger.info('successfully finished the replay') elapsed =3D time.time() - start_time logger.info('elapsed time %.2f sec' % elapsed) return elapsed --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704726903; cv=none; d=zohomail.com; s=zohoarc; b=nayqxN/j0z4+IyFwM6dqGoz8gAfMNX5JA82odV5WAkWVdf9+Qsj8zoOQ7Oz9xt9YzkUxSWgiX0MB38QGQQevQpsK8Uz/2gV5DjaMPeERCwXtOONpZFSXlmob5XZzlIAzHE430yPsNdheCqjLMtL9R0abx28p8JIFrtmSnZHdQHw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704726903; h=Content-Type: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=D+qYSiNuHCw9vpeOMvQUbkSg7Ml8q939vYKp9TceBTU=; b=VABjC3ARKAKcVQziftS4oMN/Zwbx4u5CNiqRV8m1Y3Y8KAvmsceylvwjgJO6oxwfVuqM81+ygw4qDBRdXyBXky75DEPZslT/FDN7ryjwN5I9qMcougkjTvtpk9IsUHJlhAlRC0pcG7Pe4cw8xRYvvzQwlq1hMx+wYVnMETCCpLc= 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 1704726903940691.5620801029625; Mon, 8 Jan 2024 07:15:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKN-0004JM-Hu; Mon, 08 Jan 2024 10:14:11 -0500 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 1rMrKL-0004Gk-Ml for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:09 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKA-0001YJ-WC for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:09 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40e45504006so7481445e9.1 for ; Mon, 08 Jan 2024 07:13:58 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j23-20020a05600c1c1700b0040d8ff79fd8sm150554wms.7.2024.01.08.07.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:13:53 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 28A885F942; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726836; x=1705331636; 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=D+qYSiNuHCw9vpeOMvQUbkSg7Ml8q939vYKp9TceBTU=; b=o/FI/5r+Uum1O0bvD5lHergn1BHTM4ASLdPgayHTsdzkBUPQ6k56oa7um9OeiAEMn5 SjS/7/04CzB62fEuoUPmy1dgABJJcG9DyD6nbzBWT1+pmh756qMSh0J7eYJeR4Z0C23a P+HpzMolEoOu8phodHcMoudtP5iS4cESy/liOUs76CORtRmOlyjvSFBxxELTpz8rafgI CK8+Sq6bSEzFvF4bDRWDRb0mtSsiHg46BmaY/3CthBBQ6Vq5UA25MLEsQkM94lpwNfQs jf5kFQkgjBMJPNHvCT6zgRH/r2yTGNTeQWBDpTPRh846+/DjEO4qD4UScr3WIL3unYkO 6z2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726836; x=1705331636; 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=D+qYSiNuHCw9vpeOMvQUbkSg7Ml8q939vYKp9TceBTU=; b=HhJrrTZyHvE2DpQTyatNPaS3vdZK6uCNx0oRfQHbVP8RYvwHSIGRbEh2WtRUnWv4rL j8dSNs7tPhKhgUyt0EujL8mGYaLfYVBEWKjSNgbm6dvcxV9o5PWkgI8NoSftv/RlWWLq jlgnzQeCz1j1jXWmFpVL6YGrKG8gteh0CIfKqpEgVRsEGIDrI4hV5KezlIlbeieiYtVY Bqvcaehz+E0XPm/4DWo52eFIrk0LuoHSBVESTGa41/NdZoG3T/iczPEEqsUPjowkjYl5 uDx+RNcagZg+baz3dnumVBx7tfSYhPrKiFIITk/qGy9Xk011xjY4JJsM3YZduvx2+qH4 6Ouw== X-Gm-Message-State: AOJu0YyMnSxhjZf+XTBJv5eHwC7nB09pnzzZ2e2o9nbsJNcy2DmQORH1 0FN/bWMlpJkKUL1unHYlbIluk+1EH7TMeA== X-Google-Smtp-Source: AGHT+IGe+V6MY3TPFeAtLiA4vZSH1BScP0G7fuTXInxOfUpbJCIpolLDd++4X1KI8Ag+gzV7dZgJ7Q== X-Received: by 2002:a05:600c:3f87:b0:40e:44c3:e0eb with SMTP id fs7-20020a05600c3f8700b0040e44c3e0ebmr1167197wmb.28.1704726836343; Mon, 08 Jan 2024 07:13:56 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pavel Dovgalyuk , Paolo Bonzini , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 03/13] tests/avocado: modernise the drive args for replay_linux Date: Mon, 8 Jan 2024 15:13:42 +0000 Message-Id: <20240108151352.2199097-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704726905671100003 QEMU complains about us not being explicit with setting snapshot so lets do that. Also as cdroms are RO media we don't need to jump the hoops of setting up snapshots and replay disks - just declare the drive is a cdrom and nothing should change. Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-4-alex.bennee@linaro.org> diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index e95bff32999..f3a43dc98c2 100644 --- a/tests/avocado/replay_linux.py +++ b/tests/avocado/replay_linux.py @@ -48,12 +48,15 @@ def vm_add_disk(self, vm, path, id, device): bus_string =3D '' if self.bus: bus_string =3D ',bus=3D%s.%d' % (self.bus, id,) - vm.add_args('-drive', 'file=3D%s,snapshot,id=3Ddisk%s,if=3Dnone' %= (path, id)) + vm.add_args('-drive', 'file=3D%s,snapshot=3Don,id=3Ddisk%s,if=3Dno= ne' % (path, id)) vm.add_args('-drive', 'driver=3Dblkreplay,id=3Ddisk%s-rr,if=3Dnone,image=3Ddisk%s' %= (id, id)) vm.add_args('-device', '%s,drive=3Ddisk%s-rr%s' % (device, id, bus_string)) =20 + def vm_add_cdrom(self, vm, path, id, device): + vm.add_args('-drive', 'file=3D%s,id=3Ddisk%s,if=3Dnone,media=3Dcdr= om' % (path, id)) + def launch_and_wait(self, record, args, shift): self.require_netdev('user') vm =3D self.get_vm() @@ -65,7 +68,7 @@ def launch_and_wait(self, record, args, shift): if args: vm.add_args(*args) self.vm_add_disk(vm, self.boot_path, 0, self.hdd) - self.vm_add_disk(vm, self.cloudinit_path, 1, self.cd) + self.vm_add_cdrom(vm, self.cloudinit_path, 1, self.cd) logger =3D logging.getLogger('replay') if record: logger.info('recording the execution...') --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704726900; cv=none; d=zohomail.com; s=zohoarc; b=dwx5VEllQEnLKxyU6eH8p9TLdlAqBYCFHpRRYad61DTtPq6Z7RBFnyP6m3fGaeyAsk+DT7uQoMXt1eK78Tqr0lP6zNolO6n7ha1YvzhP4COktLtms1+ZUpzMlQ3Lx6IEScW+vBO2ff/rLmTQD+HF9fnvF6lwwJif3DCpNSFZuJE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704726900; h=Content-Type: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=ytoJGUOfVhpGlmTk7EPY0JIdgCeWa/v+zzjLeogcti8=; b=loTDYx+mDvDj9uUgXaVoroL1hIXPe5CweAwq96aWff+1FoutxUYe15O16pdGiS2l9oQC7OsvrsuNWsoBInFAe0njaweZjQApY5SoqICHXP8KHfR4bnoq2QSDdDVS27T/7Zc+2GzWFhmnWj7GofSsQwny3+msjZYE+V1MqsTpBwE= 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 1704726900751251.40606590003608; Mon, 8 Jan 2024 07:15:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKH-0004Ei-Lk; Mon, 08 Jan 2024 10:14:05 -0500 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 1rMrKF-0004Do-Nu for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:03 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKA-0001YM-5M for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:03 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-336788cb261so1852102f8f.3 for ; Mon, 08 Jan 2024 07:13:57 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l3-20020adff483000000b0033719111458sm8056448wro.36.2024.01.08.07.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:13:53 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3C7F25F944; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726836; x=1705331636; 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=ytoJGUOfVhpGlmTk7EPY0JIdgCeWa/v+zzjLeogcti8=; b=DpUrXjZV95ey8DPQn+7cGZO+fQof3YY2Ni12pA92IRMpzVJ7YGOcHnDk7BKV2LYttK S6SdbYMF+oTgF2XB+OR2fHpY04vyz6Z9HK520G4hiLy3NKebl3O54DGr1QmJGzvo8LB3 e/JO2xDMLqJlDd6q+2hif7vpu8qYFP2MBw+GNn7wFi0e3kY8AAO6/K5Klzd8yhLarWpJ ywHTwIgbmMMzq4y/T62PRVbQ09zjYkJsD9eEMKiwZ+FuvYRHxayfOkQ/XPRkgQY/Izlb jSOQQomHe6Ig2+C59Fq9d5Rm2S9ntAV3WtdGGMbEFKOg5P9fkYOJk/cgqKp1WbJlm0e/ M8fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726836; x=1705331636; 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=ytoJGUOfVhpGlmTk7EPY0JIdgCeWa/v+zzjLeogcti8=; b=jOB5jNRYlwe/Eb8EUvtguNt+KwYDahkeIvRl6YxhzRpSX+RyHSaDr1FLYo6FKBvlqM sSBLcTroZ/ZsSkQpht/caZWsxvwlq8QNSwaw3q8I9Hdv+YxqWcJ4TpqpSpy3AMzj6xKd D+mBBgZ4OfkB1WOaBErW//mv7DjbfPEX3v0GElwhFGmssOEqObrp8EbIr9uVgsq64XP2 Wb9uIUPT6w3/D374o2dnD26N71bsut4QnZjzHeuagmDkCTdxMs0InJdvaOpwMxuZaBoQ 1ACE4GabV+OZh1V93XRiS03Z2ozfma7Dy/BhQGJZWG+99WnTL492CZHh6Eot6Uduwubh CIPg== X-Gm-Message-State: AOJu0YyO9PlSBMHO0vwrbhO0TZmmtxxDp0MFeu3GHJvN8zw43fZPw32p KUsK5iznHL/jn1Swo2jjqp3HX07ShQyvlcuZVF2Rrv/zEv8= X-Google-Smtp-Source: AGHT+IENL7Sysu+xb8vai5o+U0jJsJnlYMT6PkjU4Wlsmi1yePO4/baA18SIm4JqAoNmL4/a0yjdiw== X-Received: by 2002:a5d:4343:0:b0:337:5b64:7414 with SMTP id u3-20020a5d4343000000b003375b647414mr1763861wrr.100.1704726836540; Mon, 08 Jan 2024 07:13:56 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , John Snow , Cleber Rosa Subject: [PULL 04/13] scripts/replay-dump: update to latest format Date: Mon, 8 Jan 2024 15:13:43 +0000 Message-Id: <20240108151352.2199097-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704726901806100001 To help debugging replay logs I've implemented decode_plain and decode_char_write as well as put in a new table for the current format of log. Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-5-alex.bennee@linaro.org> diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py index b89dc29555a..6f300e4c54e 100755 --- a/scripts/replay-dump.py +++ b/scripts/replay-dump.py @@ -21,6 +21,7 @@ import argparse import struct from collections import namedtuple +from os import path =20 # This mirrors some of the global replay state which some of the # stream loading refers to. Some decoders may read the next event so @@ -82,6 +83,12 @@ def read_qword(fin): "Read a 64 bit word" return struct.unpack('>Q', fin.read(8))[0] =20 +def read_array(fin): + "Read a sized array" + size =3D read_dword(fin) + data =3D fin.read(size) + return data + # Generic decoder structure Decoder =3D namedtuple("Decoder", "eid name fn") =20 @@ -115,6 +122,11 @@ def decode_unimp(eid, name, _unused_dumpfile): print("%s not handled - will now stop" % (name)) return False =20 +def decode_plain(eid, name, _unused_dumpfile): + "Plain events without additional data" + print_event(eid, name, "no data") + return True + # Checkpoint decoder def swallow_async_qword(eid, name, dumpfile): "Swallow a qword of data without looking at it" @@ -151,6 +163,12 @@ def decode_instruction(eid, name, dumpfile): print_event(eid, name, "0x%x" % (ins_diff)) return True =20 +def decode_char_write(eid, name, dumpfile): + res =3D read_dword(dumpfile) + offset =3D read_dword(dumpfile) + print_event(eid, name, "%d -> %d" % (offset, res)) + return True + def decode_audio_out(eid, name, dumpfile): audio_data =3D read_dword(dumpfile) print_event(eid, name, "%d" % (audio_data)) @@ -189,14 +207,19 @@ def decode_clock(eid, name, dumpfile): print_event(eid, name, "0x%x" % (clock_data)) return True =20 +def decode_random(eid, name, dumpfile): + ret =3D read_dword(dumpfile) + data =3D read_array(dumpfile) + print_event(eid, "%d bytes of random data" % len(data)) + return True =20 # pre-MTTCG merge v5_event_table =3D [Decoder(0, "EVENT_INSTRUCTION", decode_instruction), Decoder(1, "EVENT_INTERRUPT", decode_interrupt), - Decoder(2, "EVENT_EXCEPTION", decode_unimp), + Decoder(2, "EVENT_EXCEPTION", decode_plain), Decoder(3, "EVENT_ASYNC", decode_async), Decoder(4, "EVENT_SHUTDOWN", decode_unimp), - Decoder(5, "EVENT_CHAR_WRITE", decode_unimp), + Decoder(5, "EVENT_CHAR_WRITE", decode_char_write), Decoder(6, "EVENT_CHAR_READ_ALL", decode_unimp), Decoder(7, "EVENT_CHAR_READ_ALL_ERROR", decode_unimp), Decoder(8, "EVENT_CLOCK_HOST", decode_clock), @@ -215,10 +238,10 @@ def decode_clock(eid, name, dumpfile): # post-MTTCG merge, AUDIO support added v6_event_table =3D [Decoder(0, "EVENT_INSTRUCTION", decode_instruction), Decoder(1, "EVENT_INTERRUPT", decode_interrupt), - Decoder(2, "EVENT_EXCEPTION", decode_unimp), + Decoder(2, "EVENT_EXCEPTION", decode_plain), Decoder(3, "EVENT_ASYNC", decode_async), Decoder(4, "EVENT_SHUTDOWN", decode_unimp), - Decoder(5, "EVENT_CHAR_WRITE", decode_unimp), + Decoder(5, "EVENT_CHAR_WRITE", decode_char_write), Decoder(6, "EVENT_CHAR_READ_ALL", decode_unimp), Decoder(7, "EVENT_CHAR_READ_ALL_ERROR", decode_unimp), Decoder(8, "EVENT_AUDIO_OUT", decode_audio_out), @@ -250,7 +273,7 @@ def decode_clock(eid, name, dumpfile): Decoder(10, "EVENT_SHUTDOWN_GUEST_RESET", decode_unimp), Decoder(11, "EVENT_SHUTDOWN_GUEST_PANIC", decode_unimp), Decoder(12, "EVENT_SHUTDOWN___MAX", decode_unimp), - Decoder(13, "EVENT_CHAR_WRITE", decode_unimp), + Decoder(13, "EVENT_CHAR_WRITE", decode_char_write), Decoder(14, "EVENT_CHAR_READ_ALL", decode_unimp), Decoder(15, "EVENT_CHAR_READ_ALL_ERROR", decode_unimp), Decoder(16, "EVENT_AUDIO_OUT", decode_audio_out), @@ -268,6 +291,48 @@ def decode_clock(eid, name, dumpfile): Decoder(28, "EVENT_CP_RESET", decode_checkpoint), ] =20 +v12_event_table =3D [Decoder(0, "EVENT_INSTRUCTION", decode_instruction), + Decoder(1, "EVENT_INTERRUPT", decode_interrupt), + Decoder(2, "EVENT_EXCEPTION", decode_plain), + Decoder(3, "EVENT_ASYNC", decode_async), + Decoder(4, "EVENT_ASYNC", decode_async), + Decoder(5, "EVENT_ASYNC", decode_async), + Decoder(6, "EVENT_ASYNC", decode_async), + Decoder(6, "EVENT_ASYNC", decode_async), + Decoder(8, "EVENT_ASYNC", decode_async), + Decoder(9, "EVENT_ASYNC", decode_async), + Decoder(10, "EVENT_ASYNC", decode_async), + Decoder(11, "EVENT_SHUTDOWN", decode_unimp), + Decoder(12, "EVENT_SHUTDOWN_HOST_ERR", decode_unimp), + Decoder(13, "EVENT_SHUTDOWN_HOST_QMP_QUIT", decode_unimp= ), + Decoder(14, "EVENT_SHUTDOWN_HOST_QMP_RESET", decode_unim= p), + Decoder(14, "EVENT_SHUTDOWN_HOST_SIGNAL", decode_unimp), + Decoder(15, "EVENT_SHUTDOWN_HOST_UI", decode_unimp), + Decoder(16, "EVENT_SHUTDOWN_GUEST_SHUTDOWN", decode_unim= p), + Decoder(17, "EVENT_SHUTDOWN_GUEST_RESET", decode_unimp), + Decoder(18, "EVENT_SHUTDOWN_GUEST_PANIC", decode_unimp), + Decoder(19, "EVENT_SHUTDOWN_GUEST_SUBSYSTEM_RESET", deco= de_unimp), + Decoder(20, "EVENT_SHUTDOWN_GUEST_SNAPSHOT_LOAD", decode= _unimp), + Decoder(21, "EVENT_SHUTDOWN___MAX", decode_unimp), + Decoder(22, "EVENT_CHAR_WRITE", decode_char_write), + Decoder(23, "EVENT_CHAR_READ_ALL", decode_unimp), + Decoder(24, "EVENT_CHAR_READ_ALL_ERROR", decode_unimp), + Decoder(25, "EVENT_AUDIO_IN", decode_unimp), + Decoder(26, "EVENT_AUDIO_OUT", decode_audio_out), + Decoder(27, "EVENT_RANDOM", decode_random), + Decoder(28, "EVENT_CLOCK_HOST", decode_clock), + Decoder(29, "EVENT_CLOCK_VIRTUAL_RT", decode_clock), + Decoder(30, "EVENT_CP_CLOCK_WARP_START", decode_checkpoi= nt), + Decoder(31, "EVENT_CP_CLOCK_WARP_ACCOUNT", decode_checkp= oint), + Decoder(32, "EVENT_CP_RESET_REQUESTED", decode_checkpoin= t), + Decoder(33, "EVENT_CP_SUSPEND_REQUESTED", decode_checkpo= int), + Decoder(34, "EVENT_CP_CLOCK_VIRTUAL", decode_checkpoint), + Decoder(35, "EVENT_CP_CLOCK_HOST", decode_checkpoint), + Decoder(36, "EVENT_CP_CLOCK_VIRTUAL_RT", decode_checkpoi= nt), + Decoder(37, "EVENT_CP_INIT", decode_checkpoint_init), + Decoder(38, "EVENT_CP_RESET", decode_checkpoint), +] + def parse_arguments(): "Grab arguments for script" parser =3D argparse.ArgumentParser() @@ -278,14 +343,18 @@ def parse_arguments(): def decode_file(filename): "Decode a record/replay dump" dumpfile =3D open(filename, "rb") - + dumpsize =3D path.getsize(filename) # read and throwaway the header version =3D read_dword(dumpfile) junk =3D read_qword(dumpfile) =20 + # see REPLAY_VERSION print("HEADER: version 0x%x" % (version)) =20 - if version =3D=3D 0xe02007: + if version =3D=3D 0xe0200c: + event_decode_table =3D v12_event_table + replay_state.checkpoint_start =3D 30 + elif version =3D=3D 0xe02007: event_decode_table =3D v7_event_table replay_state.checkpoint_start =3D 12 elif version =3D=3D 0xe02006: @@ -299,8 +368,13 @@ def decode_file(filename): decode_ok =3D True while decode_ok: event =3D read_event(dumpfile) - decode_ok =3D call_decode(event_decode_table, event, dumpfile) + decode_ok =3D call_decode(event_decode_table, event, + dumpfile) + except Exception as inst: + print(f"error {inst}") + finally: + print(f"Reached {dumpfile.tell()} of {dumpsize} bytes") dumpfile.close() =20 if __name__ =3D=3D "__main__": --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704726981; cv=none; d=zohomail.com; s=zohoarc; b=HhT7NANizx/Flm/oARl20NFGJLrw/N4bg5YNKRRh3GZhRgwD4JgJmypHwnR8Nvy1yI2Szb5pIJ6tOuJIM3zJYJgsME2dm2+RDG2b/+locv77sXLFrMmTFQNJEzhuN5idRaWfhgKu6TfLRb7+8JRtnGE11lhb+kLV5YoNgjCJkQA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704726981; h=Content-Type: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=AwDKE536xixs1EyATvmJWMG8HzyVCBtTOCg149auIRI=; b=n4jDpa8cqfpYa0y40IhHMsqNwwOKcszBx8PT/7CNUGYL3Cjq9qi+gcCnyzrGXGQ93UfyF3NVPuP9WFatc0I7pApIcA4pzO9x0Sxgm6kPN51j/p445szJztFCIEij97SVIA/x45oX+5dHST3ecU8NqGHMRBYarqeMRYZDcRnUCfk= 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 1704726981072942.9066277083098; Mon, 8 Jan 2024 07:16:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKK-0004Fq-45; Mon, 08 Jan 2024 10:14:08 -0500 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 1rMrKH-0004Ej-NF for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:05 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKE-0001ak-NV for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:05 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40d5336986cso25384865e9.1 for ; Mon, 08 Jan 2024 07:14:01 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j1-20020adfe501000000b0033686e8f02dsm8038809wrm.45.2024.01.08.07.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:13:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 50F065F946; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726840; x=1705331640; 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=AwDKE536xixs1EyATvmJWMG8HzyVCBtTOCg149auIRI=; b=QiufuyNwMTV1H55JtJ8X1Yzx5GMAFhD5rqZStaV/emhkLY4aDfKvUeAucwn9feANOr D1se0IKVOmkvgQhcNl2Ui4zym0Ibszja10d+t7aDLm5K6vMaHCuUuOd5jX4+w1W1aOR8 NfDXjErm8xkLugGk0QcJbELLxts9VHq9rSH3FkkelSUNXrgPagHURs92/vsWHbghAYSz z7yR6xdGrb0LuR8nHIA5Dmx6j4IdDpJ9Dh7yjQpi2kDnEL0NrF2JBN66uGWyz3fSy7Mr 6fPm2qxVISU7FeRPHIC80mGo/q6kydy9Yp8E9E9C3PHOSguDgc4Ok4/EhMFTn2GRhlNw q5Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726840; x=1705331640; 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=AwDKE536xixs1EyATvmJWMG8HzyVCBtTOCg149auIRI=; b=U98agXRzPWyVOCO9WHOEHx+d+TU4iXH9jHrVplQTdsvGVHH8ZCAmQlZKlTe9V5PRXu krHaLjt8/c44KQ99jUn8DvOnxGWHa4CtsPqAkseSfy+c4mZrwxqE7J3DVu5sfi1Het5/ 7uY9XT6q4KS/p+4XmvcE1kfJr6RHpSplKCbV6nlk/M5rFGSaTaFVmAE9+W4lERMXJHP+ 6MZC92ggy6AK4yQyrQGWeOKsqF6p9P+Rc+XtDsXzZD+OF5HC//W7prx4nFuUp/Nxk6FJ It4Znh145wTr8ro+TmqEWcKLNkDqyhzW1LjS7A0WKConE9Lr+PGpbMq1X2CJfDmEWaEZ CKHA== X-Gm-Message-State: AOJu0YxfJG9pZhLgeMsI32emgV/7IFDlT59fXKkHXmKbWyJ96WAiglG8 hEdScDYZc8i6Lujl/wIH9BuPeGiaQ0I6RQ== X-Google-Smtp-Source: AGHT+IGTvAXTigvu/pbvaiL1Ixqk0Azg66OrpQtZHxT9aHQxn3Tar5i6fMauVyiCOR9o6gPH+Pez8w== X-Received: by 2002:a05:600c:4e0e:b0:40e:4b1c:13db with SMTP id b14-20020a05600c4e0e00b0040e4b1c13dbmr134175wmq.18.1704726840013; Mon, 08 Jan 2024 07:14:00 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pavel Dovgalyuk , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , John Snow , Cleber Rosa Subject: [PULL 05/13] scripts/replay_dump: track total number of instructions Date: Mon, 8 Jan 2024 15:13:44 +0000 Message-Id: <20240108151352.2199097-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704726982063100001 This will help in tracking where we are in the stream when debugging. Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-6-alex.bennee@linaro.org> diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py index 6f300e4c54e..d668193e793 100755 --- a/scripts/replay-dump.py +++ b/scripts/replay-dump.py @@ -157,10 +157,13 @@ def decode_async(eid, name, dumpfile): =20 return call_decode(async_decode_table, async_event_kind, dumpfile) =20 +total_insns =3D 0 =20 def decode_instruction(eid, name, dumpfile): + global total_insns ins_diff =3D read_dword(dumpfile) - print_event(eid, name, "0x%x" % (ins_diff)) + total_insns +=3D ins_diff + print_event(eid, name, "+ %d -> %d" % (ins_diff, total_insns)) return True =20 def decode_char_write(eid, name, dumpfile): --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704726926; cv=none; d=zohomail.com; s=zohoarc; b=Obhp/jsTOh3hnnQQlg1E5Dd4lUulR+PiKO5PoDjq4K7xdpOJ7Z0ifsmpn9A9iF+4iLCmMIleE31RGZjOwWstijatsm1RcI30CFahX62/RHI3OatfbYrtLhL+RILlZeY96Yqiu6+lUlx8GiEjl08Wm+cBuApp7ajpeIfFyI7z+6A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704726926; h=Content-Type: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=MMV6mhc2gSysrpUH6HPMUt3N81sB5EX397Qla+10sMg=; b=EjuYF/4knm/ZlbkidfkN2ZWs0VAoHlY0DQfITnqJVs/8L9Z9X0EuEgH9eueh+46CnVISoPoz4wmGy9TUm5dCPHODclqjAcL55h0BcVvwz9md66hYHoDP988WsCVZ0waPvfI6e2FfgOsztD6RwAjdeTUheVqpHOBFs2Ew7PPrfQQ= 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 1704726926221424.3897501355823; Mon, 8 Jan 2024 07:15:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKF-0004DZ-2T; Mon, 08 Jan 2024 10:14:03 -0500 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 1rMrKD-0004D0-Pu for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:01 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKA-0001YS-9j for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:01 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40e4ad831b0so3241505e9.2 for ; Mon, 08 Jan 2024 07:13:57 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id m21-20020a05600c3b1500b0040d5c58c41dsm140532wms.24.2024.01.08.07.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:13:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 63D705F948; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726837; x=1705331637; 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=MMV6mhc2gSysrpUH6HPMUt3N81sB5EX397Qla+10sMg=; b=JL/NBzuYAFFdo8/Nere2q28B9odOXr5Ls+Vpgc/3bsaw3iHYK+8t0JD72tU9iZjM8j rfrJNzBgsZy3AL5mI/Ubyc4lyokKNdnmTOhHkMqmfqVtYIax7qZpFEyHopl5WuczX1yO 5eEqqaT83Ji3UZXBz5rKcpcU7oH+FPYcOQMdJe2tdDGSpJU3dEmMUHbpB9q+iVzAQTO2 q7iePPhBI72Mv5fZS4wL6rH5UaVVsKIb5Cs1l6s1BYDN1AuZUQmfDaNoq4ufTgBBv54C W8+aXROmSnL74DqerodEivlwAhLizeq0gh6GYSsNeCVU9ZWoezEtxdExTDDvpAnloEIZ r9Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726837; x=1705331637; 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=MMV6mhc2gSysrpUH6HPMUt3N81sB5EX397Qla+10sMg=; b=Ar0hj5nbdRua5u7hoSD2/jTpefx6m6UEZ0PFBSvm/TlZZYLv2JKU7OqsclZ3jFe4P0 Xw6ufxdhcKkMPblbby9ejOH3XsDBq8XnMXeHAXMgWjxzo/CEZjxmgW9fFasSIB1uWa3r bsoUALiaKZlPtIoon184FqUD1RYNcnXTnTBEWYlD7faUpYfG/2UQlldscJG0LXnHcsz4 jlwKWpnr+pEIcRHEKuRGrg3rUWJKPkSHJDzIdq9lbfRww5sdkye+ZYyZWXzxjGuX3lCG E9aNPRILhafLeXK7l/AbQiyMSlU9A+uSy4N4MNOJlQy3u6PcjdlPm7rj1kMiDAFf1NVe 5oTw== X-Gm-Message-State: AOJu0YzBIcTArW0aKIIs0PuM9mWPdzQiw0JUluLjqY2BjeHYweZSomAT FYGQ1j9uKB9ZK48gUlFZZPj0Uv/26amwIw== X-Google-Smtp-Source: AGHT+IHAVCFc/V2TEXHTz1z3YKCvpxHBRBoB3jJvRxiRiRGf6pUf9vB+7FtKUe5r8y3eD5nz1J98bA== X-Received: by 2002:a05:600c:1f11:b0:40e:49c6:45e0 with SMTP id bd17-20020a05600c1f1100b0040e49c645e0mr454314wmb.23.1704726836834; Mon, 08 Jan 2024 07:13:56 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Pavel Dovgalyuk , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pavel Dovgalyuk , Paolo Bonzini Subject: [PULL 06/13] replay: remove host_clock_last Date: Mon, 8 Jan 2024 15:13:45 +0000 Message-Id: <20240108151352.2199097-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704726927777100003 Fixes: a02fe2ca70 (replay: Remove host_clock_last) Reviewed-by: Richard Henderson Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-7-alex.bennee@linaro.org> diff --git a/replay/replay-internal.h b/replay/replay-internal.h index b6836354ac5..516147ddbca 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -80,8 +80,6 @@ typedef struct ReplayState { This counter is global, because requests from different block devices should not get overlapping ids. */ uint64_t block_request_id; - /*! Prior value of the host clock */ - uint64_t host_clock_last; /*! Asynchronous event id read from the log */ uint64_t read_event_id; } ReplayState; --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704726878; cv=none; d=zohomail.com; s=zohoarc; b=NzkYFrE/NY6rjQ5k3d1RhwexaxpOyyYZ7u83wiumHjxeZ5kgKQv2X32Tk8H+OKILI3JCj6kDMkfleeVuSF28CFTid80OQ8h21cBTPQo6789QsZ0z12t58Sbuv1CUYWDfFXm/dRfiV5yAvQx803GnKbYr/d/YFaVsA4y0z4n4DF0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704726878; h=Content-Type: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=sGtlVmj/cLSRItSFI6o6Pd2FVVc8E9gmG7YjPACLCW8=; b=JBGaw0IPbbqbUQqr3LPWZxAUwz/3Mh7Tle5XETkQBSdXJPP6LE/ynYnXTDcGnqlhZefv/rfTq9j46M8CkgeOJHnTKEUqSc3OThyVzqbAPsvhPTK8hSmf4DqY2eNMahBIgabwrD2+97631FVtJwTDd09IvgbvIiRyo49m7PQYrts= 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 1704726878509826.8616233629377; Mon, 8 Jan 2024 07:14:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKP-0004LU-4H; Mon, 08 Jan 2024 10:14:13 -0500 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 1rMrKO-0004Jx-0D for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:12 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKA-0001Yf-TN for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:11 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40d87df95ddso21231725e9.0 for ; Mon, 08 Jan 2024 07:13:58 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id u2-20020a7bc042000000b0040d79997731sm5233915wmc.0.2024.01.08.07.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:13:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 775185F949; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726837; x=1705331637; 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=sGtlVmj/cLSRItSFI6o6Pd2FVVc8E9gmG7YjPACLCW8=; b=jPRLjZp3PetcpyNYsqbZve+HKDNZynXGDxa1QO7/T++T5HTUYpnndHHxndk8UPquUN RlcxaeKjOC3R651AtOSsuWRZTEmfxs+SWPUrNy+cgshaj3a439+PA/uuOz6cK3hufso3 to6kXPSjaQCC5e1rdBMBRNGe3Rv6i7SkmW0Zo5SpN5UXbJNrBAQrmfPC1eZL1zbA0NxA yiaXARki24AjlQrgB1QD8bJ846/bWS6aAetc5kkSSLWGcrJ/Ap16y92VKbvfmny+ggOX lsydc9uI3kBG4eiFUmsMvIz18d8H6uwTRl8QZZvXJauQvASOj5XJBkif3uwMSL9dZLaL h91g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726837; x=1705331637; 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=sGtlVmj/cLSRItSFI6o6Pd2FVVc8E9gmG7YjPACLCW8=; b=puUhRB7b7j+5nRGLHJ6ErYhwqcpfilozj+iq7GhD9oHfM6YuwLcZUSymVv77k8vTRP hm4l2xdXzwNW5+RhXk6PAfZ3igIItlAGdhmEbkXpDikc7rX/h/RSiE9pBtt3pkQCzaes rXgBw0uuMy3Qpubk6LCnWvOj6Aslp0Ettb7IaZaoPtJylc9Q8DAc1ASitNP1WvNqzVYP gqnWQJORl7iRjqXxB7KTan8vbIrEielhmmfRFxyo7OFD5PVCF3y013DiK0WUcshzbVzY D7+vVlEK2hkcG6d980UrcsXUqVa1v0acM4NE2R9Mlp29vtO/Y46FGlWZzmFYIKWWpB9h TglA== X-Gm-Message-State: AOJu0Yx/boptH2Us+anGn4TyuEhQTwwzdrDan9AGMLGIyF+U3Y34V44z HuaK66lvyzmF4nMLmCgUapBtOTxpJRHqMA== X-Google-Smtp-Source: AGHT+IF6/r/blh9ykR03g3UR7YNR7t3wTGE71UDHl93ONfvwScvHK2A2Ny7HQP+mmLed38GJagI3NA== X-Received: by 2002:a05:600c:1f16:b0:40e:4239:5075 with SMTP id bd22-20020a05600c1f1600b0040e42395075mr876947wmb.364.1704726836992; Mon, 08 Jan 2024 07:13:56 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pavel Dovgalyuk , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pavel Dovgalyuk , Paolo Bonzini Subject: [PULL 07/13] replay: add proper kdoc for ReplayState Date: Mon, 8 Jan 2024 15:13:46 +0000 Message-Id: <20240108151352.2199097-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704726879636100001 Remove the non-standard comment formatting and move the descriptions into a proper kdoc comment. Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-8-alex.bennee@linaro.org> diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 516147ddbca..98ca3748edb 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -63,24 +63,31 @@ enum ReplayEvents { EVENT_COUNT }; =20 +/** + * typedef ReplayState - global tracking Replay state + * + * This structure tracks where we are in the current ReplayState + * including the logged events from the recorded replay stream. Some + * of the data is also stored/restored from VMStateDescription when VM + * save/restore events take place. + * + * @cached_clock: Cached clocks values + * @current_icount: number of processed instructions + * @instruction_count: number of instructions until next event + * @data_kind: current event + * @has_unread_data: 1 if event not yet processed + * @file_offset: offset into replay log at replay snapshot + * @block_request_id: current serialised block request id + * @read_event_id: current async read event id + */ typedef struct ReplayState { - /*! Cached clock values. */ int64_t cached_clock[REPLAY_CLOCK_COUNT]; - /*! Current icount - number of processed instructions. */ uint64_t current_icount; - /*! Number of instructions to be executed before other events happen. = */ int instruction_count; - /*! Type of the currently executed event. */ unsigned int data_kind; - /*! Flag which indicates that event is not processed yet. */ unsigned int has_unread_data; - /*! Temporary variable for saving current log offset. */ uint64_t file_offset; - /*! Next block operation id. - This counter is global, because requests from different - block devices should not get overlapping ids. */ uint64_t block_request_id; - /*! Asynchronous event id read from the log */ uint64_t read_event_id; } ReplayState; extern ReplayState replay_state; --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704726959; cv=none; d=zohomail.com; s=zohoarc; b=GK2zB/J3wZmeXalI/6cTEZz+dvmZ1+9TwZhk5Quz5xvy0PIOxfz6tqFk9C6ZQCknYywqCElf+467+aHnFLpdmWnZQoGhI8ivM4yr+k1KHST3c+hrFaCAcnco8S1+8ciwugMFb8xk4hJg0WGkRJRU/aF9cBSyRokoFlZy3myGaS0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704726959; h=Content-Type: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=SPOk6AJuTFsbsY/JbpngsdrxHBBFNIYVyd4S9YTkZ9o=; b=KDeVoOffFTCYLkEsCyA3TU1j/Q+BoN0PpebYRmhkKFNbuQpwqOjKaUjzWVpKxWusUS1i2VMZ2wCN/AYgDTROqC7FmUzYkHY+b8EYZpTmvq4wluH2oCrDCLF9FUXfW7F1L9xfPUzIw3ZXPUJ5d8pdHnmt81EpLY4+cf7BoU3x0o4= 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 1704726959651100.33263226403562; Mon, 8 Jan 2024 07:15:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKI-0004FK-Oj; Mon, 08 Jan 2024 10:14:06 -0500 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 1rMrKG-0004EK-W9 for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:05 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKE-0001ai-HF for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:04 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40d89446895so11540495e9.0 for ; Mon, 08 Jan 2024 07:14:02 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j8-20020a05600c190800b0040d6d755c90sm119705wmq.42.2024.01.08.07.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:13:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8D7FD5F94A; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726840; x=1705331640; 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=SPOk6AJuTFsbsY/JbpngsdrxHBBFNIYVyd4S9YTkZ9o=; b=elbBRmRyT5xCIwaPYLGpbkkLhHL1pETurwbivmsWFxxAYyaCKJhGsmcVYT+Sprr0ip zJUnGMEg6K+WRtgaIxmF5Nx3prqfSjr4I6nHOhEF+gC0UXAgKLZY7ebhxWKuczS2f+Bk R2726ECtzNvRvooOr2iO2fa9JNqQrbqExWF12O0fNuWCF9CZNqigUl8GaHQU6WQQUh4z JkLh1gL4OVPYbr3npcRPVO77AG3k2wkvz+EZZ+0KEokO0rXwqtUQSmMn8Ahv9tGKv5UN ba2L+HyFSAvG0iEzCs3UQ7pbYfIXEEaOPeV2DDrh44OFQowe3VMoohLWLP2q8glxH24H SxHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726840; x=1705331640; 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=SPOk6AJuTFsbsY/JbpngsdrxHBBFNIYVyd4S9YTkZ9o=; b=XvGpXpGjsCJ+OL9sdf04acm+JmAgfly9Ak+snMtQnsBZQQYHT7oyaw7JJ1kjOS9zkr NPhVlTyhQUpaEYQ54p0nBN6SEKoD7uXOSIJEDyy3y+XyyJutNuvvrLrpq5/Q5At0qdxl qbj0Xs/toPNBJL2bgDJCHhLZfV/gzV7VZ+sxOkhFAc6jtGqYVR3MHHL2hRyDnvneWnXU N3u2EtEXgx+4lPkfKa3tg8s41JiNQl76zQBpQsWsn98ga/It6nN2LLAh7eBKQcUqe4lu c0hImG7W5VPvs3FghRSzCusqtA//Bhz+jqN7Nq3b+Btvy4mE4xeddFevMuWkDJBBJBjW zZrA== X-Gm-Message-State: AOJu0Yz8n2sJaCfofbIY3Hvzz+SNXNYw+6syt0O0f0Ao8q9x1WGBIsMp cBRATUUxILY06dXDqCIzeucpv0fx299Tmg== X-Google-Smtp-Source: AGHT+IHR5k5TwixRpZ/ulpi5S8syMOx2df2djUykv9MpFgVvNnF4yiznCZBfpvVTfdof46esf6D1rw== X-Received: by 2002:a05:600c:35d1:b0:40d:887e:fc85 with SMTP id r17-20020a05600c35d100b0040d887efc85mr1906231wmq.32.1704726839847; Mon, 08 Jan 2024 07:13:59 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Pavel Dovgalyuk , Richard Henderson , Pavel Dovgalyuk , Paolo Bonzini Subject: [PULL 08/13] replay: make has_unread_data a bool Date: Mon, 8 Jan 2024 15:13:47 +0000 Message-Id: <20240108151352.2199097-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704726959996100001 For clarity given it only has two states. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-9-alex.bennee@linaro.org> diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 98ca3748edb..1bc8fd50868 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -75,7 +75,7 @@ enum ReplayEvents { * @current_icount: number of processed instructions * @instruction_count: number of instructions until next event * @data_kind: current event - * @has_unread_data: 1 if event not yet processed + * @has_unread_data: true if event not yet processed * @file_offset: offset into replay log at replay snapshot * @block_request_id: current serialised block request id * @read_event_id: current async read event id @@ -85,7 +85,7 @@ typedef struct ReplayState { uint64_t current_icount; int instruction_count; unsigned int data_kind; - unsigned int has_unread_data; + bool has_unread_data; uint64_t file_offset; uint64_t block_request_id; uint64_t read_event_id; diff --git a/replay/replay-internal.c b/replay/replay-internal.c index 77d0c82327e..634025096ef 100644 --- a/replay/replay-internal.c +++ b/replay/replay-internal.c @@ -179,7 +179,7 @@ void replay_fetch_data_kind(void) replay_state.instruction_count =3D replay_get_dword(); } replay_check_error(); - replay_state.has_unread_data =3D 1; + replay_state.has_unread_data =3D true; if (replay_state.data_kind >=3D EVENT_COUNT) { error_report("Replay: unknown event kind %d", replay_state.data_kind); @@ -191,7 +191,7 @@ void replay_fetch_data_kind(void) =20 void replay_finish_event(void) { - replay_state.has_unread_data =3D 0; + replay_state.has_unread_data =3D false; replay_fetch_data_kind(); } =20 diff --git a/replay/replay-snapshot.c b/replay/replay-snapshot.c index e5e39161e33..d4f6cb7cda8 100644 --- a/replay/replay-snapshot.c +++ b/replay/replay-snapshot.c @@ -47,8 +47,8 @@ static int replay_post_load(void *opaque, int version_id) =20 static const VMStateDescription vmstate_replay =3D { .name =3D "replay", - .version_id =3D 2, - .minimum_version_id =3D 2, + .version_id =3D 3, + .minimum_version_id =3D 3, .pre_save =3D replay_pre_save, .post_load =3D replay_post_load, .fields =3D (const VMStateField[]) { @@ -56,7 +56,7 @@ static const VMStateDescription vmstate_replay =3D { VMSTATE_UINT64(current_icount, ReplayState), VMSTATE_INT32(instruction_count, ReplayState), VMSTATE_UINT32(data_kind, ReplayState), - VMSTATE_UINT32(has_unread_data, ReplayState), + VMSTATE_BOOL(has_unread_data, ReplayState), VMSTATE_UINT64(file_offset, ReplayState), VMSTATE_UINT64(block_request_id, ReplayState), VMSTATE_UINT64(read_event_id, ReplayState), --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704726891; cv=none; d=zohomail.com; s=zohoarc; b=Ilb5IOVoNdEFsyswkfmRAQikDYRfuyoZV/J00ghBEw7L31h9PqT2EFTYMAJ8oiZIjnMY1mrahZT99ShoJlfpeJtQxpmnfiLfgxyQxllEsqRL7d64bIs/DMUp7f61F0vmsvCev/XnEWLfYJIUC3FL88MpeM2+ws8Bp9fitcKLSZ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704726891; h=Content-Type: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=fLTiWwdEIfg9JspvYt86f20QV2JuGa01IK1rdNLR1WY=; b=Aw2OibwY4MS02D+RJP1dNBiQ6cSZ3KPWtHR39/Up5zSk5tJR4j61rs7Jhof1FXnUhiNCRd325mWME9yCqzgkU/r7LteTQgpdvEQI5dCRJUAeePNpBUKp08ELNcyxJlUxwnD1cXWvgtYShzY+7Ejn6O+HOLk0tWvGg7mCFSSfB+M= 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 1704726891012851.0204490513433; Mon, 8 Jan 2024 07:14:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKM-0004Gl-Q4; Mon, 08 Jan 2024 10:14:10 -0500 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 1rMrKK-0004Fw-Do for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:08 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKF-0001bp-BY for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:07 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-33678156e27so1931651f8f.1 for ; Mon, 08 Jan 2024 07:14:02 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id cg2-20020a5d5cc2000000b00336c120855dsm8018589wrb.84.2024.01.08.07.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:13:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A34305F756; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726842; x=1705331642; 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=fLTiWwdEIfg9JspvYt86f20QV2JuGa01IK1rdNLR1WY=; b=enDk4Zm6NbV8OSzLRhkP7LawH1UnkkuY7IAcmLXCJw2e0KNvJiH+XZ4k2Ecl/TkyVc 63MbBlnv3B8wtnvmYAe1ZdBbWxd7luqq3zUN1jnup++bNk/8HQU3ToRi9pRdaoYp+cgD hXuBXrWR84MdfZh6Mb/QGbJgmEYmY5YxnzcOEDDa+gOz+TBDcCPVhjFtDccShWw6wtIh 1oWAs55fbzCuArrQ1gGmmGiNMG22xn6S97E8vDaJOFJ2O7VWuzA3JN1QT0vymz29xCKH KIhvEUco6+KuMRwmEGrLR7eRcmS0eYImWvhh3ywVjHhWK9gbdqWeehzjNu4Kk2EEalJW FRdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726842; x=1705331642; 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=fLTiWwdEIfg9JspvYt86f20QV2JuGa01IK1rdNLR1WY=; b=ozFDLOso6JxRXhMsFzWWXclXGTeZTdLRIgx93Jt//BR0bomnfR+kHiaInGLa4HFxFh f4WmYKciFXHs2BxgLB7XIDX/vthY+1o/PMV6XZ2l7RAyyOliLEg6gIj5AZ2Z9xYshfWL yryRu4Xp1KPTHJiCLhBt3D63FOifcvWGXySfMm1XzeFdIMPk9bsoBCl613eGkQye85yF 88KRsPMy7vZ/mSQp8ZaQFF2KcEdBM1eGqmNU9pCgafT2hCG0o3royttXrv3GPxLuIBQJ jYG1brAd30pFDqcypism/+ZflErQQywSayJC8kYM9HWMM9i9+z+5vv8o0oXNapQSDR60 licw== X-Gm-Message-State: AOJu0YzTPPeHHwrZ06tq4Pzm0AEW3K2BNR1om8TxLZES9wgoBeu+OrxD kfxgqIUERfvooL6EcpfiRRNCyX/XhR4wcQ== X-Google-Smtp-Source: AGHT+IGsgh4oWx42sULD9q+FQ6dWMxyNcTqFU3oxHYgqoJfqDxNYnS05UZ3W3pFvLKZfPwY8xI9O8Q== X-Received: by 2002:adf:b612:0:b0:336:c00c:c84c with SMTP id f18-20020adfb612000000b00336c00cc84cmr1695956wre.28.1704726841966; Mon, 08 Jan 2024 07:14:01 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Pavel Dovgalyuk , Paolo Bonzini Subject: [PULL 09/13] replay: introduce a central report point for sync errors Date: Mon, 8 Jan 2024 15:13:48 +0000 Message-Id: <20240108151352.2199097-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704726891769100001 Figuring out why replay has failed is tricky at the best of times. Lets centralise the reporting of a replay sync error and add a little bit of extra information to help with debugging. Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-10-alex.bennee@linaro.org> diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 1bc8fd50868..75249b76936 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -25,7 +25,12 @@ typedef enum ReplayAsyncEventKind { REPLAY_ASYNC_COUNT } ReplayAsyncEventKind; =20 -/* Any changes to order/number of events will need to bump REPLAY_VERSION = */ +/* + * Any changes to order/number of events will need to bump + * REPLAY_VERSION to prevent confusion with old logs. Also don't + * forget to update replay_event_name() to make your debugging life + * easier. + */ enum ReplayEvents { /* for instruction event */ EVENT_INSTRUCTION, @@ -74,6 +79,7 @@ enum ReplayEvents { * @cached_clock: Cached clocks values * @current_icount: number of processed instructions * @instruction_count: number of instructions until next event + * @current_event: current event index * @data_kind: current event * @has_unread_data: true if event not yet processed * @file_offset: offset into replay log at replay snapshot @@ -84,6 +90,7 @@ typedef struct ReplayState { int64_t cached_clock[REPLAY_CLOCK_COUNT]; uint64_t current_icount; int instruction_count; + unsigned int current_event; unsigned int data_kind; bool has_unread_data; uint64_t file_offset; @@ -188,6 +195,16 @@ void replay_event_net_save(void *opaque); /*! Reads network from the file. */ void *replay_event_net_load(void); =20 +/* Diagnostics */ + +/** + * replay_sync_error(): report sync error and exit + * + * When we reach an error condition we want to report it centrally so + * we can also dump some useful information into the logs. + */ +G_NORETURN void replay_sync_error(const char *error); + /* VMState-related functions */ =20 /* Registers replay VMState. diff --git a/replay/replay-internal.c b/replay/replay-internal.c index 634025096ef..654b99cfb55 100644 --- a/replay/replay-internal.c +++ b/replay/replay-internal.c @@ -175,6 +175,7 @@ void replay_fetch_data_kind(void) if (replay_file) { if (!replay_state.has_unread_data) { replay_state.data_kind =3D replay_get_byte(); + replay_state.current_event++; if (replay_state.data_kind =3D=3D EVENT_INSTRUCTION) { replay_state.instruction_count =3D replay_get_dword(); } diff --git a/replay/replay-snapshot.c b/replay/replay-snapshot.c index d4f6cb7cda8..ccb4d89dda7 100644 --- a/replay/replay-snapshot.c +++ b/replay/replay-snapshot.c @@ -55,6 +55,7 @@ static const VMStateDescription vmstate_replay =3D { VMSTATE_INT64_ARRAY(cached_clock, ReplayState, REPLAY_CLOCK_COUNT), VMSTATE_UINT64(current_icount, ReplayState), VMSTATE_INT32(instruction_count, ReplayState), + VMSTATE_UINT32(current_event, ReplayState), VMSTATE_UINT32(data_kind, ReplayState), VMSTATE_BOOL(has_unread_data, ReplayState), VMSTATE_UINT64(file_offset, ReplayState), diff --git a/replay/replay.c b/replay/replay.c index 0f7d766efe8..ff197f436bf 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -38,6 +38,107 @@ static GSList *replay_blockers; uint64_t replay_break_icount =3D -1ULL; QEMUTimer *replay_break_timer; =20 +/* Pretty print event names */ + +static const char *replay_async_event_name(ReplayAsyncEventKind event) +{ + switch (event) { +#define ASYNC_EVENT(_x) case REPLAY_ASYNC_EVENT_ ## _x: return "ASYNC_EVEN= T_"#_x + ASYNC_EVENT(BH); + ASYNC_EVENT(BH_ONESHOT); + ASYNC_EVENT(INPUT); + ASYNC_EVENT(INPUT_SYNC); + ASYNC_EVENT(CHAR_READ); + ASYNC_EVENT(BLOCK); + ASYNC_EVENT(NET); +#undef ASYNC_EVENT + default: + g_assert_not_reached(); + } +} + +static const char *replay_clock_event_name(ReplayClockKind clock) +{ + switch (clock) { +#define CLOCK_EVENT(_x) case REPLAY_CLOCK_ ## _x: return "CLOCK_" #_x + CLOCK_EVENT(HOST); + CLOCK_EVENT(VIRTUAL_RT); +#undef CLOCK_EVENT + default: + g_assert_not_reached(); + } +} + +/* Pretty print shutdown event names */ +static const char *replay_shutdown_event_name(ShutdownCause cause) +{ + switch (cause) { +#define SHUTDOWN_EVENT(_x) case SHUTDOWN_CAUSE_ ## _x: return "SHUTDOWN_CA= USE_" #_x + SHUTDOWN_EVENT(NONE); + SHUTDOWN_EVENT(HOST_ERROR); + SHUTDOWN_EVENT(HOST_QMP_QUIT); + SHUTDOWN_EVENT(HOST_QMP_SYSTEM_RESET); + SHUTDOWN_EVENT(HOST_SIGNAL); + SHUTDOWN_EVENT(HOST_UI); + SHUTDOWN_EVENT(GUEST_SHUTDOWN); + SHUTDOWN_EVENT(GUEST_RESET); + SHUTDOWN_EVENT(GUEST_PANIC); + SHUTDOWN_EVENT(SUBSYSTEM_RESET); + SHUTDOWN_EVENT(SNAPSHOT_LOAD); +#undef SHUTDOWN_EVENT + default: + g_assert_not_reached(); + } +} + +static const char *replay_checkpoint_event_name(enum ReplayCheckpoint chec= kpoint) +{ + switch (checkpoint) { +#define CHECKPOINT_EVENT(_x) case CHECKPOINT_ ## _x: return "CHECKPOINT_" = #_x + CHECKPOINT_EVENT(CLOCK_WARP_START); + CHECKPOINT_EVENT(CLOCK_WARP_ACCOUNT); + CHECKPOINT_EVENT(RESET_REQUESTED); + CHECKPOINT_EVENT(SUSPEND_REQUESTED); + CHECKPOINT_EVENT(CLOCK_VIRTUAL); + CHECKPOINT_EVENT(CLOCK_HOST); + CHECKPOINT_EVENT(CLOCK_VIRTUAL_RT); + CHECKPOINT_EVENT(INIT); + CHECKPOINT_EVENT(RESET); +#undef CHECKPOINT_EVENT + default: + g_assert_not_reached(); + } +} + +static const char *replay_event_name(enum ReplayEvents event) +{ + /* First deal with the simple ones */ + switch (event) { +#define EVENT(_x) case EVENT_ ## _x: return "EVENT_"#_x + EVENT(INSTRUCTION); + EVENT(INTERRUPT); + EVENT(EXCEPTION); + EVENT(CHAR_WRITE); + EVENT(CHAR_READ_ALL); + EVENT(AUDIO_OUT); + EVENT(AUDIO_IN); + EVENT(RANDOM); +#undef EVENT + default: + if (event >=3D EVENT_ASYNC && event <=3D EVENT_ASYNC_LAST) { + return replay_async_event_name(event - EVENT_ASYNC); + } else if (event >=3D EVENT_SHUTDOWN && event <=3D EVENT_SHUTDOWN_= LAST) { + return replay_shutdown_event_name(event - EVENT_SHUTDOWN); + } else if (event >=3D EVENT_CLOCK && event <=3D EVENT_CLOCK_LAST) { + return replay_clock_event_name(event - EVENT_CLOCK); + } else if (event >=3D EVENT_CHECKPOINT && event <=3D EVENT_CHECKPO= INT_LAST) { + return replay_checkpoint_event_name(event - EVENT_CHECKPOINT); + } + } + + g_assert_not_reached(); +} + bool replay_next_event_is(int event) { bool res =3D false; @@ -226,6 +327,15 @@ bool replay_has_event(void) return res; } =20 +G_NORETURN void replay_sync_error(const char *error) +{ + error_report("%s (insn total %"PRId64"/%d left, event %d is %s)", erro= r, + replay_state.current_icount, replay_state.instruction_cou= nt, + replay_state.current_event, + replay_event_name(replay_state.data_kind)); + abort(); +} + static void replay_enable(const char *fname, int mode) { const char *fmode =3D NULL; @@ -258,6 +368,7 @@ static void replay_enable(const char *fname, int mode) replay_state.data_kind =3D -1; replay_state.instruction_count =3D 0; replay_state.current_icount =3D 0; + replay_state.current_event =3D 0; replay_state.has_unread_data =3D 0; =20 /* skip file header for RECORD and check it for PLAY */ --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704726915; cv=none; d=zohomail.com; s=zohoarc; b=Of3RH2/3mMVr40py2HzA2FSVpLdk/qfjiftbwzwvsMUXwGLzm24UQP7EESxJ44hb5mD97iZtNotkPt2EUpHDwPvecd+sUG8YJ7NnoSe2lf39ie3BKleZ0EDza3FcH2J1WALFnj2zytCR2FQGDQcESe40CONDmTqOv6fwjGZiNVM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704726915; h=Content-Type: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=k9MwYzVVCpi8aRF113OyWJJfAJmZSssygUp+Otb9ZUM=; b=LXxAxHT2DfZdAPhXlx6/Pm3fssTizdcWCQeZhJsoRWPeRhD3wEInAgnRoozxFkspkkHkc6tNh4uZG4gKPObpOBOEVzYA9uUVezvQrph0zYAhpKw9igSR8up7sfQGVLbjkcxcxnEP60OY+CUtJ+4t79LZTWma2J1k+QZzNaLupbs= 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 1704726915344457.0575260949639; Mon, 8 Jan 2024 07:15:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKK-0004GK-Hr; Mon, 08 Jan 2024 10:14:08 -0500 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 1rMrKI-0004Er-6f for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:06 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKF-0001aY-8Y for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:05 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-33765009941so1594206f8f.3 for ; Mon, 08 Jan 2024 07:14:02 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id h13-20020a5d6e0d000000b0033677a4e0d6sm8039039wrz.13.2024.01.08.07.13.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:13:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B75D85F94E; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726839; x=1705331639; 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=k9MwYzVVCpi8aRF113OyWJJfAJmZSssygUp+Otb9ZUM=; b=YXS7hglEEUflE7sy6TJB7AtaVu2eupXd7DiMSywJV2moysIrqrvHckOprwfa7L8SJ7 3EcyMV4vgF5yHHUZktmzLdds510bu+1rDNf3Q3eCTzBpoJ9j7YAtMbRf8ILF6ZIQEtYk qiwvTX19Z/UGlO7XCE5DFw9dCWqomh/NgWQa0JUT7pV8lZAIPCqs2t/Qae2QTMxOQDra 1GSCsoXtzye5ZVnPzMytHzVQhXkxtnOgS1o4i79RDPBUYm1CUVdoFQqvhVNrhZGEkdw7 KjD5Zr5uZu56+rTS7pJ1DF7O0lFb/OZm3acH8SRI4m+OtcTQz/Oi5L0O/BCITNYFvQ1B /dzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726839; x=1705331639; 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=k9MwYzVVCpi8aRF113OyWJJfAJmZSssygUp+Otb9ZUM=; b=UkQ2WhWz8PogixZjfW//rWUjI+GMGDmUiWQtqYITie8Giw/4H3+KiFEqKKYwyfb/T6 +VIcSR6p1NQUhf0BQRQuvnXU1i4aTM9KR0RqCdEywurJqmr0NKXUUe8/wyRybonBNR0/ g86kpi6+T9IPDF2EShNQYLtX14+Vjll205N8MTnu3RtETjQpCNgE6k6rreGI/9UAq1YF rzBrGpx0GpoetIsVhBJFAFh/nL9x/AyflAMvAtdbZtJ2D2Kg/YSoHiSIrhjFK6yrRTrp q9+P/wNKbqJJgQlyA4+sQ2I80mH1W1B1c3EFeygtR2mo/GRKZHJUf3nPRhS2/3gkCw7q GVaQ== X-Gm-Message-State: AOJu0Yx0h2dxZ7L+uYiAH4fuwCG1zU+94t/vYFTihyKcvBXlPlPXcutH QEegspdGCXen7lDfyXAqK3bdrHFu//fE4w== X-Google-Smtp-Source: AGHT+IHKmX/FvThUqBxxDftDSSU17HQvFVl1DOmlQDWNwgVN7Hhuoz5OdoCV9/0PuE8QaZ4P/pmu5g== X-Received: by 2002:a05:6000:1204:b0:337:5ba9:3435 with SMTP id e4-20020a056000120400b003375ba93435mr2090385wrx.124.1704726839640; Mon, 08 Jan 2024 07:13:59 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson , Pavel Dovgalyuk , Paolo Bonzini Subject: [PULL 10/13] replay/replay-char: use report_sync_error Date: Mon, 8 Jan 2024 15:13:49 +0000 Message-Id: <20240108151352.2199097-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704726915719100001 Now we have a centralised report function use it for missing character events. Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-11-alex.bennee@linaro.org> diff --git a/replay/replay-char.c b/replay/replay-char.c index a31aded032e..72b1f832dde 100644 --- a/replay/replay-char.c +++ b/replay/replay-char.c @@ -113,8 +113,7 @@ void replay_char_write_event_load(int *res, int *offset) *offset =3D replay_get_dword(); replay_finish_event(); } else { - error_report("Missing character write event in the replay log"); - exit(1); + replay_sync_error("Missing character write event in the replay log= "); } } =20 @@ -135,8 +134,7 @@ int replay_char_read_all_load(uint8_t *buf) replay_finish_event(); return res; } else { - error_report("Missing character read all event in the replay log"); - exit(1); + replay_sync_error("Missing character read all event in the replay = log"); } } =20 --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704727025; cv=none; d=zohomail.com; s=zohoarc; b=WayuZCIfLx6Z2PBr5zgA25UqEuA/rfGitZrZ+28YFqcajUtEykxYzyjleODUbeESUUZ5w4tMp1sZkEBeZLij1p0G63pu1mXpTujcko9VhgPhEWY6OLZz6gZMmBMeemjAf+CejHggX7hy4sZvDdlXf4CAOpb0ClX5s+YrqAbmRic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704727025; h=Content-Type: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=/3f/gZt7kuZhNsGlk9QFjConVSBhlieoHxarURcJ0oU=; b=ezIxEXObnN3iqGAADlD9EytLdDMeZekBblzHvkWs8+NMr1rg3yAtxBtOtRjdk7310FLAYO7oe61USOxK1l2UcmBceDt3YRT9lcHgM0/uTt0QdNuDFNph9McdPcLnEwB+yGqR3L3tyjHiBAoYprHHDImuPaMzqTilzMUtjlFgfi8= 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 1704727025873417.3517284248884; Mon, 8 Jan 2024 07:17:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKN-0004J9-An; Mon, 08 Jan 2024 10:14:11 -0500 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 1rMrKL-0004Gj-Ms for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:09 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKF-0001c2-MQ for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:08 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40e4b20a52bso2169005e9.3 for ; Mon, 08 Jan 2024 07:14:03 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id k25-20020a05600c1c9900b0040d87b9eec7sm11452358wms.32.2024.01.08.07.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:14:01 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CD36F5F950; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726842; x=1705331642; 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=/3f/gZt7kuZhNsGlk9QFjConVSBhlieoHxarURcJ0oU=; b=I/LFI0BL5RQe6weroZ1gezUBYUaosPFCVYGZUnqcUcmZPJngqqw62jmJtT88Hypvl9 pwPrhRrUucZwTdbFk1ph0Bq9LUEJN9tNBXWEiSJf5e+FneiF7X53V62uqHhAZfUjJKaD a3v9whsDxjCTTL/AmISoxwXtFrQkcCwVaq/h4DT2QxDn7fafbT2s+XR9AUefjBWHyIPq 9I7h9EwyAa0CKLDTRokHTVwOPIAN/MTEl7QXfD4x+3JwvjQJLopJkCCIiR/Oqu8qcXjC /1h3JC8MIBNbXPoLv6KW/Zk3ekc+ArpZKx//ObdfTHhyR7ZIXIggVIOhh74K60VBPbzq Ql2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726842; x=1705331642; 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=/3f/gZt7kuZhNsGlk9QFjConVSBhlieoHxarURcJ0oU=; b=VltuFMbzxdKQop/ypg35ii8BwOKhmwMv+QVED/euvGdPDZme2qFDuS00t9cvOPd54z kJolC4AJDvDO5ui4fY+ebS+rUGSEsFbyP1cp6n7XVl6U/N4fOEPndL/wVc4kuCXmYq0Z PR4zU+bNe3GGmxFYQGbZJUB9mqryNmsWZCxBhyuDEI6SjXQS4i1Z8quMFLzAijT3a1Gl 2YsecVBkMtBggOk034KSdD5yGAg/zZ8i4sW1TaVK0k9BFu0L86sKSZypRU3ezByxdKNJ 9L3j4UGWd27ivlhkEta9dTRnckfkhYxKps+R8Cvicnj4jwCewTV5xNY0OsktNhTElc+Q gq5A== X-Gm-Message-State: AOJu0YyMadkkO3AyJq2SI1PqWAef5+SIq9LG/C//8zIyTYK1vVxfQmXK In2cj44aqr9Oc3swuUKUkm9VctiJwMjLwA== X-Google-Smtp-Source: AGHT+IH4ed5oIIydyYvlM/aTrzFpYYXIb19bG6WCEp6jHrwcz+wH2DdAvLIjtlNN8ycxoPkT+WRr8g== X-Received: by 2002:a7b:c4c5:0:b0:40e:4a75:e6c8 with SMTP id g5-20020a7bc4c5000000b0040e4a75e6c8mr410391wmk.116.1704726842222; Mon, 08 Jan 2024 07:14:02 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pavel Dovgalyuk , Richard Henderson , Paolo Bonzini Subject: [PULL 11/13] replay: stop us hanging in rr_wait_io_event Date: Mon, 8 Jan 2024 15:13:50 +0000 Message-Id: <20240108151352.2199097-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704727028245100003 A lot of the hang I see are when we end up spinning in rr_wait_io_event for an event that will never come in playback. As a new check functions which can see if we are in PLAY mode and kick us us the wait function so the event can be processed. This fixes most of the failures in replay_kernel.py Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2013 Cc: Pavel Dovgalyuk Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-12-alex.bennee@linaro.org> diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index 08aae5869fc..83995ae4bd4 100644 --- a/include/sysemu/replay.h +++ b/include/sysemu/replay.h @@ -70,6 +70,11 @@ int replay_get_instructions(void); /*! Updates instructions counter in replay mode. */ void replay_account_executed_instructions(void); =20 +/** + * replay_can_wait: check if we should pause for wait-io + */ +bool replay_can_wait(void); + /* Processing clocks and other time sources */ =20 /*! Save the specified clock */ diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index 611932f3c3a..825e35b3dc4 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++ b/accel/tcg/tcg-accel-ops-rr.c @@ -109,7 +109,7 @@ static void rr_wait_io_event(void) { CPUState *cpu; =20 - while (all_cpu_threads_idle()) { + while (all_cpu_threads_idle() && replay_can_wait()) { rr_stop_kick_timer(); qemu_cond_wait_iothread(first_cpu->halt_cond); } diff --git a/replay/replay.c b/replay/replay.c index ff197f436bf..3fd241a4fcc 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -449,6 +449,27 @@ void replay_start(void) replay_enable_events(); } =20 +/* + * For none/record the answer is yes. + */ +bool replay_can_wait(void) +{ + if (replay_mode =3D=3D REPLAY_MODE_PLAY) { + /* + * For playback we shouldn't ever be at a point we wait. If + * the instruction count has reached zero and we have an + * unconsumed event we should go around again and consume it. + */ + if (replay_state.instruction_count =3D=3D 0 && replay_state.has_un= read_data) { + return false; + } else { + replay_sync_error("Playback shouldn't have to iowait"); + } + } + return true; +} + + void replay_finish(void) { if (replay_mode =3D=3D REPLAY_MODE_NONE) { --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704727025; cv=none; d=zohomail.com; s=zohoarc; b=HQcTpS2gH4PCBtnRoniVP67TMwigq/ouc33YRDceNRqtscbMjeqPmd8lZEvlzZogCNJmzQxd/rd7gz6Ztx8sL0gNFrwcyhsG5OOt7y53jzBxv2Ce87C66mhSN9SkMaeBHY0G/t3kAJ6k0h94083WmkUbgowhXkkVJpJ6w8Xe3IM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704727025; h=Content-Type: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=p2vXh+pSNK2Iht3pnXQCJkC17vaS5mbAQ1w3JtGP+qY=; b=P8BpxlKguZ5sCOl3gMIwKwQzHLsvVQ4KZkV2dide9X/UcMpYsrD0TlDQyAFjg3R10aGLj3sN8lRT5gQepesbPIwIRdCY/Q9WzmNXELpq15jnC4/PS3LpWY3Vfs47BXgZ6MSExSf4zitEDchk+oNqWr9tbDeS08F7ZMxBRVjOujg= 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 1704727025810595.9674321028724; Mon, 8 Jan 2024 07:17:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKO-0004K8-51; Mon, 08 Jan 2024 10:14:12 -0500 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 1rMrKK-0004GN-J1 for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:08 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKF-0001c7-Sv for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:08 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40e4b499b4aso1418595e9.0 for ; Mon, 08 Jan 2024 07:14:03 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id cg2-20020a5d5cc2000000b00336c120855dsm8018677wrb.84.2024.01.08.07.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:14:01 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DF2525F93F; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726842; x=1705331642; 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=p2vXh+pSNK2Iht3pnXQCJkC17vaS5mbAQ1w3JtGP+qY=; b=oWZf1+8b2crFBvFf7ptRGSu05YyKKtSSPiU95RbOImfmPJc1j1vfOzMmJnJdCxS3m7 /v7jkt7HcA6/Z+rwNmEKHHgvpNO/m2+XBip9sFqLR14grlw14h+mqMASqcYxKbwBQH5R VFk4CBoKDby4sWQ/N1kLLAiAZwz3y2I+kt48PfP1149/rH2Xg2g5o2ltV+IApV0V2FfU VMWlXMSPy0+bUisBykangTpzJDhNUnKVmXU6wTQb4UfdCLcAN5GGlwIKxP48rAav5gNF /5aEXv0qRp7I7BJXKilSmi6/76e9vNv3on/ot/jLwMPiJfs/zBSJZAdgljm2Yj0PlW66 /QFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726842; x=1705331642; 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=p2vXh+pSNK2Iht3pnXQCJkC17vaS5mbAQ1w3JtGP+qY=; b=lml8cNW1kJ/o6tLOFO4vs6d5BSQbxJeePBMx/JkuRTKTm9F4ESpPCTrfA9IlTgE5Gc LIFhtggV1jqP5OPubJj7Es5wTVCJ82lhbOSvSc4sixeop7gt2KT2eKWmGalW4cUFMMpt 1OycIgL6R29DsoAi7Yd1yaZ9Pm/v0x8GFGuBUWCljqKE/z9rUsbfOHp0fNx9LNgryXwP IadVz9BhbnGjke1EjVHi1BP3uFypGIEyziWOUnjEdiM05Ak8a5c54NT42eQ6WjE5DzCK Aeu2fCg5odNrHTgHQE0B475SmNKDgyKEVOJgW6Iwoy2xQYB8TnQArk0ueYIrVaPApQsQ EPlQ== X-Gm-Message-State: AOJu0YwCt1J6Lf8JF5as4p1pyWZ+2h9FI6FdkbU+zejeUuftACSx8ul5 iXdO+bzo7Wk8JgR0oAY0m+G6bG0LXHVwoA== X-Google-Smtp-Source: AGHT+IG5MTn0OIHxrxPXOF2NFR8wTrImr7OnpPMnQJRJLZqh+I0ILiYlZPCHNp0xsyhTTeELdNUo0g== X-Received: by 2002:a05:600c:4e8c:b0:40e:435b:4a41 with SMTP id f12-20020a05600c4e8c00b0040e435b4a41mr1573362wmq.89.1704726842394; Mon, 08 Jan 2024 07:14:02 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pavel Dovgalyuk , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Subject: [PULL 12/13] chardev: force write all when recording replay logs Date: Mon, 8 Jan 2024 15:13:51 +0000 Message-Id: <20240108151352.2199097-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704727028256100004 This is mostly a problem within avocado as serial generally isn't busy enough to overfill pipes. However the consequences of recording a failed write will haunt us on replay when the log will be out of sync to the playback. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2010 Acked-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-13-alex.bennee@linaro.org> diff --git a/chardev/char.c b/chardev/char.c index 996a024c7a2..48f28881c28 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -171,6 +171,18 @@ int qemu_chr_write(Chardev *s, const uint8_t *buf, int= len, bool write_all) return res; } =20 + if (replay_mode =3D=3D REPLAY_MODE_RECORD) { + /* + * When recording we don't want temporary conditions to + * perturb the result. By ensuring we write everything we can + * while recording we avoid playback being out of sync if it + * doesn't encounter the same temporary conditions (usually + * triggered by external programs not reading the chardev fast + * enough and pipes filling up). + */ + write_all =3D true; + } + res =3D qemu_chr_write_buffer(s, buf, len, &offset, write_all); =20 if (qemu_chr_replay(s) && replay_mode =3D=3D REPLAY_MODE_RECORD) { --=20 2.39.2 From nobody Tue Nov 26 20:39:41 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704726972; cv=none; d=zohomail.com; s=zohoarc; b=DEQozzvtAGAq0UiR0zQxI2BEhRhRj8NhjJOWN6ZYfBp3KHM+p+aMvmcxV1dQvpS1eobRDSF0XA50mWkhbff4WwCNwrqkSv5eCbYpe01s6Y6nxbZ7L1Nplol6vJ43+RlySadJ25nfNWsSW7HMP7d5c/ytwmPGPbJ38Q87IbbqJ+w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704726972; h=Content-Type: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=CCcg7ysSyOpy/NHtcycGrXvCgSegX/kK/v3WtacdHyY=; b=Db7NcYN8CGiBU+qyKLtfwar2+jdZyZaH1fRcZzFsxWYne21ZdXkaMERCDgx2vxm4bdl22MANzgTk+ywtR7wmnyYlGLR5yZGLORB50jNOAIqwL2bGQ05exdROw544iuLLVJPw4qRgVpLWr1nuYMfuWIw9ZtehX8ZR91mPd4gUosw= 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 1704726972566771.0353812869118; Mon, 8 Jan 2024 07:16:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMrKN-0004Hl-AO; Mon, 08 Jan 2024 10:14:11 -0500 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 1rMrKL-0004Ga-42 for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:09 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMrKH-0001d8-GW for qemu-devel@nongnu.org; Mon, 08 Jan 2024 10:14:08 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-33678156e27so1931683f8f.1 for ; Mon, 08 Jan 2024 07:14:05 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id o5-20020adfca05000000b00336ee9edbb3sm8028968wrh.94.2024.01.08.07.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 07:14:01 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F2BEA5F951; Mon, 8 Jan 2024 15:13:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704726844; x=1705331644; 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=CCcg7ysSyOpy/NHtcycGrXvCgSegX/kK/v3WtacdHyY=; b=j0FXqPgotKUB+gP1zd3Wgzkh8Lp4s5pV5kV4A+WCacIdHiPPYUf9J1X7qgrwMADSlN o/xoTppEi+QbFNd/wpJPXUbXHJY39aL3/6G8a2K2rZZqJp7S/Pc2rCjCi+Udg9bix/qC kmcOS1rd5QKutNYK/kWLu35Ba5oCHXVO3QRya8taDXQDMt0bWPfuMrD1ZeptNVKrR4nB 9LvJqfB+/dRlB3amHriR9NMUyfUTwsznEtjSF+ctPA5w+KVJZG7p/OGU5tzYNc41iltC RNf8g7yNNQacoj8LzVsqzogobp1ap4M8SLl0lFG5pa0eCRvc/TmJyWXL1kaByiF8oPJ3 ZPCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704726844; x=1705331644; 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=CCcg7ysSyOpy/NHtcycGrXvCgSegX/kK/v3WtacdHyY=; b=gkmyn2LF/9V/S6n4Fyw+TPY6zMKH/7TIzHQy4nOMwfJETnF5NNIWKq/gKpJ5Q/AtOt UPR3LASNGKTyss9uCtr9VI9On5mW6bPryZYxlNJ2SMPwM1g+ZKmRKnhsv7JAoc3eDMyN bqlK8zk8K+zM6sd0POyytu4/sZeIEb1vjdYUKeDQvSR/FVSUGKJhc5Z9e2kr858LQoev jDQJBDlpmjQiaixo2uCvRDvaS2AirANkONXaP7Jn82piQZfHAM6uqOQBCIVGGVgKU6jG mBBq384+d6YELl4TCHXwybNiCBVd+j258HKQNKae+HXUkd4ksEw+E3OFyJc5WPgSPP+L S7LQ== X-Gm-Message-State: AOJu0YxSaoI0ePWoDTCwq84C7TBeHZAYkezvDYL6e7ytqDW2FhB81mZ1 RLIsfvpvWbyxgb87VFMYwo3epGDIpUNP6w== X-Google-Smtp-Source: AGHT+IHO7TN/2B0xs17i1KQU9cO+wTzTrLElycVCv7GjDG0S/COOrW6Id/vyk+51O3n0m/xpbYZzMQ== X-Received: by 2002:a5d:4d01:0:b0:336:7e06:390e with SMTP id z1-20020a5d4d01000000b003367e06390emr2009413wrt.134.1704726843906; Mon, 08 Jan 2024 07:14:03 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pavel Dovgalyuk , Pavel Dovgalyuk , Paolo Bonzini , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 13/13] tests/avocado: remove skips from replay_kernel Date: Mon, 8 Jan 2024 15:13:52 +0000 Message-Id: <20240108151352.2199097-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240108151352.2199097-1-alex.bennee@linaro.org> References: <20240108151352.2199097-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.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, T_SCC_BODY_TEXT_LINE=-0.01 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 @linaro.org) X-ZM-MESSAGEID: 1704726974097100001 With the latest fixes for #2010 and #2013 these tests look pretty stable now. Of course the only way to be really sure is to run it in the CI infrastructure and see what breaks. Acked-by: Pavel Dovgalyuk Signed-off-by: Alex Benn=C3=A9e Message-Id: <20231211091346.14616-14-alex.bennee@linaro.org> diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py index 1eaa36444cb..6fdcbd6ac3d 100644 --- a/tests/avocado/replay_kernel.py +++ b/tests/avocado/replay_kernel.py @@ -98,13 +98,10 @@ def test_i386_pc(self): =20 self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) =20 - # See https://gitlab.com/qemu-project/qemu/-/issues/2010 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test sometimes gets s= tuck') def test_x86_64_pc(self): """ :avocado: tags=3Darch:x86_64 :avocado: tags=3Dmachine:pc - :avocado: tags=3Dflaky """ kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' '/linux/releases/29/Everything/x86_64/os/images/pxeb= oot' @@ -135,8 +132,6 @@ def test_mips_malta(self): =20 self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) =20 - # See https://gitlab.com/qemu-project/qemu/-/issues/2013 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') def test_mips64el_malta(self): """ This test requires the ar tool to extract "data.tar.gz" from @@ -152,7 +147,6 @@ def test_mips64el_malta(self): =20 :avocado: tags=3Darch:mips64el :avocado: tags=3Dmachine:malta - :avocado: tags=3Dflaky """ deb_url =3D ('http://snapshot.debian.org/archive/debian/' '20130217T032700Z/pool/main/l/linux-2.6/' @@ -200,13 +194,10 @@ def test_arm_virt(self): =20 self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D1) =20 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') - def test_arm_cubieboard_initrd(self): """ :avocado: tags=3Darch:arm :avocado: tags=3Dmachine:cubieboard - :avocado: tags=3Dflaky """ deb_url =3D ('https://apt.armbian.com/pool/main/l/' 'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_= armhf.deb') @@ -354,7 +345,6 @@ def test_m68k_mcf5208evb(self): file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) self.do_test_advcal_2018(file_path, 'sanity-clause.elf') =20 - @skip("Test currently broken") # Console stuck as of 5.2-rc1 def test_microblaze_s3adsp1800(self): """ :avocado: tags=3Darch:microblaze @@ -389,7 +379,6 @@ def test_or1k_sim(self): file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) self.do_test_advcal_2018(file_path, 'vmlinux') =20 - @skip("nios2 emulation is buggy under record/replay") def test_nios2_10m50(self): """ :avocado: tags=3Darch:nios2 --=20 2.39.2