From patchwork Mon Dec 11 09:13:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752509 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1197863wrs; Mon, 11 Dec 2023 01:16:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaX6u+7Rtxia+syzDvHTKg07vjzZTuEALbvfpa7mUO858asMloGS/1foV8mp4LdAKKgv/Z X-Received: by 2002:a05:620a:15a2:b0:77f:38c:f03 with SMTP id f2-20020a05620a15a200b0077f038c0f03mr5399085qkk.120.1702286173846; Mon, 11 Dec 2023 01:16:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286173; cv=none; d=google.com; s=arc-20160816; b=mJyCuPH3OUJdUtM89pcCzc+heTVLVEFVKSKBkkURLWSZsJ3VZH1DVHw6z2agAtOpWG r6NgICM+FLoprgA/PMnU+k0pnzz3IM3imlXnJYNu5sGdw3nyXA6Xazfwcaurbp+0XYio g6EzDpbeCE7EC1rulwlgXhdVUOWI8BAjD1S3lZla2+gA/JpCjnWm10EM+Ygp2MVSIofo EEJ/Vy+1nrxo11UNFTyu7J06tCcbvuHBQ/QKQhLdMSv4h+EB/mUdUIuFYD1X59Cs15hk opOE3wxawQlMkeyRq2O8KyzVJz9Tls8m/fcZUuUmx1J1RHcjQqYX90oqoDjnNYdXOS1H wGgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Qst3b8dDcHZQs8ozQAiOtNvMPl3loOjgqonGZQxnJ2I=; fh=f1WUYuFnVBAEIncgxZ+HIUkw3mzwzJ7NOR6vwyn/FI0=; b=zxPGF023JU7DP8x7gtkpXACDLEjpFBdSzq9CQBKFs/T2rfHq5fKKEuXOS1B4gayWCP 4Qp3eUsZs/5w64A4/LFOEBvvUIy61bx3tlWeGOfVqnmkEdFCTIvLhZzDljSG3tFZHm+2 3dIkE0Z1EOqwt746nRhfjeyjDU3jFG+YVVuqfq88g0QzUI29t+lnrnXYyhDz2nnAXkMb KtXEQTU0WvTFNI4bd6237JXPbhzUT8ggjBub/pbh//5GCYB38LlpUgBBovKlOKIV6MFM PKmpkHktgPvOJpK9ilAOzaKwHtUQ081fcRvIaI4XJXiPT+/aij9B6uYUuiCdTVu3AChF vbww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Uix2Vsul; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k24-20020ae9f118000000b0077f24960c93si7323409qkg.438.2023.12.11.01.16.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:16:13 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Uix2Vsul; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcMK-0001Ni-PJ; Mon, 11 Dec 2023 04:13:52 -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 1rCcMJ-0001NA-4J for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:51 -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 1rCcMH-0004KO-7p for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:50 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3334a701cbbso4403722f8f.0 for ; Mon, 11 Dec 2023 01:13:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286027; x=1702890827; 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=Qst3b8dDcHZQs8ozQAiOtNvMPl3loOjgqonGZQxnJ2I=; b=Uix2VsulIQiqCdUXALIUkRyOelg7/0gGPG4nyyksMNeZNYcMHNWGa8n5bDsJdxCGoi x24TiYY0gBlUu2Nf5nbt14JXg8YVsMBiXK6FG+WtMXeper1G+AIyShFwR84W1gEu4Skv I2NXWCqdVn/bUrxVnZIbHOE9etusYGK90iy4sc7GzUlvDkMq9fwEiXn1bYvzU/NiWrLB d5IPfcCW95Hvyn5sQwwXNp/7R2Fxi/2vif1llG6UGu6qz9PLio5RJLWWZ6E0vITZykdt vFmU6paOHUUojvtT+/XcdQyCqn/K0ZvDUPnK+bM0IxPIWXVU6UGXR2ixrEFecvVGauoe n2sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286027; x=1702890827; 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=Qst3b8dDcHZQs8ozQAiOtNvMPl3loOjgqonGZQxnJ2I=; b=tO2fxpdcGR6NHQQux0d8mHdgn0v/NSukbXO/yFJmkW3NmIbplwPVtJ1XCYvfeN+1nJ RPl311jCc2HPccHFVajIOQb7MW8iiHTNOAY1nQWdS304dILRNPr+gfQ+o17zaDbVNhI8 mK62xWaiY4Rw+0n/YJg3VZbJkFN5ft4uCu97xonVBKiKDEdJgLF+CDyCrCInjpphPFLH Xp4VOABNWUG40GOl5rRDCDb3T1T3eoLv+HHbvlpQbUL4td/ZXH4ZnS36VQq529+PccPX QBR/nnSRqhDQwrtaMpXGYHJRxDGO8eO8fRvAp3dYsGD5QvFKW8CBKm3LwsClShVICHTO Qlxw== X-Gm-Message-State: AOJu0Yy8N/Dd+P3mNEcfL6TgLXcYKj4YAzVU2zhCifw+rG8fjDRbDrhx Lv/nPMT0ntVt71TN4IFQ0KfpBA== X-Received: by 2002:a05:6000:1e86:b0:336:ac7:e07b with SMTP id dd6-20020a0560001e8600b003360ac7e07bmr1734969wrb.186.1702286027062; Mon, 11 Dec 2023 01:13:47 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d1-20020adfe881000000b003334926fb81sm2992362wrm.90.2023.12.11.01.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:46 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 30C195FBD3; Mon, 11 Dec 2023 09:13:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= , Pavel Dovgalyuk Subject: [PATCH v2 01/16] tests/avocado: add a simple i386 replay kernel test Date: Mon, 11 Dec 2023 09:13:30 +0000 Message-Id: <20231211091346.14616-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Message-Id: <20231205204106.95531-2-alex.bennee@linaro.org> Acked-by: Pavel Dovgalyuk Acked-by: Richard Henderson Signed-off-by: Alex Bennée --- tests/avocado/replay_kernel.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py index c37afa662c..1eaa36444c 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, console_pattern, class ReplayKernelNormal(ReplayKernelBase): + def test_i386_pc(self): + """ + :avocado: tags=arch:i386 + :avocado: tags=machine:pc + """ + kernel_url = ('https://storage.tuxboot.com/20230331/i386/bzImage') + kernel_hash = 'a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb86e277f1b76ed956' + kernel_path = self.fetch_asset(kernel_url, + asset_hash=kernel_hash, + algorithm = "sha256") + + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' + console_pattern = 'VFS: Cannot open root device' + + self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5) + # See https://gitlab.com/qemu-project/qemu/-/issues/2010 @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test sometimes gets stuck') def test_x86_64_pc(self): From patchwork Mon Dec 11 09:13:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752511 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1198060wrs; Mon, 11 Dec 2023 01:16:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEH/xnpDzyGk6CyL8z6jUDIJGQflm66xHGUx3++KJlTLYTDnGgh31B+zQWd9Dxeh5O9TwZ4 X-Received: by 2002:a05:620a:1353:b0:77e:ffc0:e446 with SMTP id c19-20020a05620a135300b0077effc0e446mr4972129qkl.75.1702286202302; Mon, 11 Dec 2023 01:16:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286202; cv=none; d=google.com; s=arc-20160816; b=UpQFy0/tfd+Ub+owSRfPn1AAMDwV01h1jNEnKwq6dUZgdy5zXiKcBIrgqMF9OSYLE7 dRzIW2iSOcjJVM2DWXiY2/5/iGgg+FzZ111aOKp2IiRavpfFM4EewNNSrf2kExuo5sGg 5YWwJOK/XtiVMqZ2A7Z6+6eDS4m/yeLohvdNJ+YigdIOlszwX8mun/IjDM2sgqtFA3K0 UBoGGV/XDMw7mQV6a8q/6xS46mMcE7tSV4uUPCxPQ59sAsgT6ts6C4H0+m0MKFZ0l5An RTN1vSgXXETxjVuZ4bwUXG2CVWP1vjvD9it1qlmDit0dU7vdrjAKenD8SH+ezKjb7ULx 85sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eVVly0H15LIWjWS01fDgkj5/Woj14MblOWkoYW39ooY=; fh=f1WUYuFnVBAEIncgxZ+HIUkw3mzwzJ7NOR6vwyn/FI0=; b=Mb5x27quTTxN02NWd17MEoU8PuNDL20kyq3g7cGPq7v+LyrNYudDOi9KryiQYyV2lF gf1r6NXCKIpSJxw+cbz3dkF23AgiaBpApw5LI/obBqvjvV41elQ+jem+nzHOtPYQprYd ArKiyiaA88eon1zXVMj87HPhIxFpv7qww+fo/jwbzuXulpRU+pL08cEg+HVwOYurP6Qo ecw/Vd6/45mgkEGIKJ+J5/D885+T/nJ0QmV8p3XUoxS0HHrkhIWdQT4Ursklu6YrtRWA z93rWYT+ztK890/rhxHOGijGT5IpfB2QzY6au/wgmPJp86TpzezBP5KJyHFOBdlp+jNF 84RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i5UbGTXH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o7-20020a05620a0d4700b0077f12d68129si7618435qkl.461.2023.12.11.01.16.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:16:42 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i5UbGTXH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcMM-0001OS-EL; Mon, 11 Dec 2023 04:13:54 -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 1rCcMK-0001NY-C7 for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:52 -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 1rCcMI-0004KY-QS for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:52 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40c39ef63d9so19403055e9.3 for ; Mon, 11 Dec 2023 01:13:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286029; x=1702890829; 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=eVVly0H15LIWjWS01fDgkj5/Woj14MblOWkoYW39ooY=; b=i5UbGTXHODBUGLqyqLC7LWeSV3tCBnRgXymAntVnyN8jBk8ou0k87evEphCcxAbiT/ f9nfT8jhuvqfXHo9z6Xv9WgJh+FvW0JsFeduXYcHvwsm8SYR0iQQsolFsbqBdDtRNhM+ pybb6hRze/lSz7o3XkOsGUWhpqbLWiUOvgKMTaWrHFBpHM/msFr3YOK/dfjWEJ2wf5+x ar/+WwqIkQOKFmGwPZBkHoC1XDCEcjmiwj3+4tXhALG4IVio4HdxR9MGXqskwjJjeFyd 0n4BTiTipGVLZUreLw7BPk2Tp0KExcUlY0RL1SVier8NQzjjF98dT/h9wdZuQFjGAaTm vjfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286029; x=1702890829; 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=eVVly0H15LIWjWS01fDgkj5/Woj14MblOWkoYW39ooY=; b=B+yqchkU+ft/Sty0IEMgTacccAgwPbTnqafKWmNojSzbxINNXI6zYyd3sA1988TXqV 4GOZW/lXhtZdKhJQGxCM0LkB3cJusJCuSeHAXHoqJsortyC9ifuRcO0IQmmTpO6IYfPZ EAaIz4neXNWt8Gv1We7riWFul5u1M5xSeyiD2IVxEOO5JiQC9xKW7Jp1RfXx2dJbblo7 hDcdqJlgAxemlO5CTlPgzlZwoSlYurCopzCdhAQ9tBYsLqt06V/sEd3Gl4AaCbF8iODA f3b1lIT4JNP9w2zHXGgyB4Afg7sIAdYAGC7ZLPiDRLmehpf9N9jACyCQUM91g4etGKuD r3BQ== X-Gm-Message-State: AOJu0YzRJQKtkk3uFGSuDR0yaqHcvSlk9SywYzTlcmrMHFHALlwfJMI6 5IlhYPdiFy+OgERiiUr+M+4OEA== X-Received: by 2002:a05:600c:4749:b0:40b:5e21:cc36 with SMTP id w9-20020a05600c474900b0040b5e21cc36mr1865686wmo.97.1702286029081; Mon, 11 Dec 2023 01:13:49 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l6-20020a05600c4f0600b0040b45282f88sm14493487wmq.36.2023.12.11.01.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:46 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 444275FBDC; Mon, 11 Dec 2023 09:13:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= , Pavel Dovgalyuk Subject: [PATCH v2 02/16] tests/avocado: fix typo in replay_linux Date: Mon, 11 Dec 2023 09:13:31 +0000 Message-Id: <20231211091346.14616-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Message-Id: <20231205204106.95531-3-alex.bennee@linaro.org> Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- tests/avocado/replay_linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 270ccc1eae..e95bff3299 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 = time.time() - start_time logger.info('elapsed time %.2f sec' % elapsed) return elapsed From patchwork Mon Dec 11 09:13:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752510 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1198048wrs; Mon, 11 Dec 2023 01:16:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmpKjV//eaiiyeFfVEKCgyD9FOkiD+oxosMge9AlMbjT167zMfd/APMAWhbuoOJwRMdLrc X-Received: by 2002:a05:620a:6892:b0:77f:37e2:1726 with SMTP id rv18-20020a05620a689200b0077f37e21726mr6245669qkn.71.1702286201544; Mon, 11 Dec 2023 01:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286201; cv=none; d=google.com; s=arc-20160816; b=dJXmnhPF4XugVNsZOL4NklxyxaGv94DQTGnrB9eBp0nzTo0V9v+DFVAsdHGQh2UqCT qLyWnbrsExuVzXERomvXsKJC5df7PUEptbrh0ynnd1yj0Zl0V+j4f0XylIxwT7FQEx5n QeHWPNJaqHNTJWO7KRNykkyPkeZM658gCPqIZeyNiq02+2JJlp8DYS7BSZOfpTEbGdui +JsICwzPK2ORtKLVPMeKHRCIFBq3HP8g95hEh6X0brP7fGbKvf9QURw2Zi7nGe0JeZOW 59vA4KlLXVjJdYxAtm8la4tnnLNZY4FAqmi8JNrpxX58pt3901yxYTg9ghlU7kVNAIyn xmBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=D8qIrlEoKyQAUiAn6AfdU5hmEAuN6bNA20M5VlLbvng=; fh=5P/wIgpI0FmPL++m2PNNQNTrejW6t3h7Ix4gz+ehGxw=; b=bjmMIGdf8Xd1HUI1LXbgb4Mf8dR+jYk8wusaeYuO/WN6Fv6Lxwj7wKAbIqnSN7dRoS 1VE2JRkv5dseFi59foY8xCDdrUF3AFRf4HPxiPKbbZTY5XqjGNppF0uCRhtgvSZN6/Lk iiNguYQ+1VJwESGbh26KX6spFSn0Cjof6pQ9z0h5d4MeCt9AbGL+xJGvvSj14DBli0PY MH/xwKwy2dktomTLi5JNvk+etkLHCgat/2YCUorAs/Eoxqni+syTCkfdKSYFhRJwLMQY iWt1TsaiG44sj7lkQY9oLggv2seSLDHNcdHpAPk9yKm0WxA0PTZ8o+OmwFG4e9RQKmLJ mTLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DQcc9shT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g16-20020a05620a13d000b0077f29224dcasi7491603qkl.746.2023.12.11.01.16.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:16:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DQcc9shT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcMN-0001PG-IV; Mon, 11 Dec 2023 04:13:55 -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 1rCcMM-0001OK-3F for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:54 -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 1rCcMK-0004Kx-Ek for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:53 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3333224c7b9so3810856f8f.1 for ; Mon, 11 Dec 2023 01:13:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286031; x=1702890831; 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=D8qIrlEoKyQAUiAn6AfdU5hmEAuN6bNA20M5VlLbvng=; b=DQcc9shT15cDH5S99vTzY9vQnuJHID8z1AeLjeMIiamNTbqGdnZ5w2wwnE1CXqoOiC 6xUX47l4GOyuMqiY1fgKv6WKTuizRKlYj8ojAOAqKY55O47bMc4CVGZeQgvbNhYMgfkc WUrviVsvA5AetB8FnI5ti5rr3kFSDESRDQ3UxypSITUzu52WGEHZRkCdHkIgWxoaXUVQ yTcshhDaO4Jcj9lfMzZUTQSwesKJV5awp9YB9L+IpTsjXqnifOhk2fsW5VuAkk8Z5smr VsqiZuAwDEGcOJeaJlh4WihkQZLM/MWDTuQixkgzfxjDZ6Uue5jy2Ehv85SWGcf5u+f/ UzbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286031; x=1702890831; 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=D8qIrlEoKyQAUiAn6AfdU5hmEAuN6bNA20M5VlLbvng=; b=Ijaz4mHriUviwH0VgY+qo0fttNH24GKQlAdz7vJT8s54ljP0CKyRQgs9iQynWlu9nb Xidde9IrVpbDcfFN2kvz9eaQYjPXae+eoCKzY3/RGDuAjX6Mvw6FGD+vPGmPjHouNZJe h3bD4VvOsxENBTT6CSS0n7UYGNmyM9kP6glpSnZzU1nid9fQEWLurWsCg3sAstEBKU2E 7FOSCjf6V0WYcAolyKLtg+RTd4peTpjMxNLGsvD3H25ibob3UjclebsA2K1rQAlp9sRE pA8IYQ/oBsfx5nmrMhA1o0ksGHJmrC9Q7N7dp8gRMCuIkqfWTyidnkL74NPkc60V4rfQ A5Lg== X-Gm-Message-State: AOJu0YwalmGWU3FdhFGNapmZqGUlICVuAggJwStSvrT9eVYDs9N0Xz4Y gCnvBYoE7Pt8CmjUxJqnCi3knA== X-Received: by 2002:adf:f58c:0:b0:333:3f8c:b5fb with SMTP id f12-20020adff58c000000b003333f8cb5fbmr2432023wro.135.1702286031072; Mon, 11 Dec 2023 01:13:51 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id o12-20020a5d474c000000b003333dd777a4sm8120545wrs.46.2023.12.11.01.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:47 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 588085FBDE; Mon, 11 Dec 2023 09:13:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 03/16] tests/avocado: modernise the drive args for replay_linux Date: Mon, 11 Dec 2023 09:13:32 +0000 Message-Id: <20231211091346.14616-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée --- tests/avocado/replay_linux.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index e95bff3299..f3a43dc98c 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 = '' if self.bus: bus_string = ',bus=%s.%d' % (self.bus, id,) - vm.add_args('-drive', 'file=%s,snapshot,id=disk%s,if=none' % (path, id)) + vm.add_args('-drive', 'file=%s,snapshot=on,id=disk%s,if=none' % (path, id)) vm.add_args('-drive', 'driver=blkreplay,id=disk%s-rr,if=none,image=disk%s' % (id, id)) vm.add_args('-device', '%s,drive=disk%s-rr%s' % (device, id, bus_string)) + def vm_add_cdrom(self, vm, path, id, device): + vm.add_args('-drive', 'file=%s,id=disk%s,if=none,media=cdrom' % (path, id)) + def launch_and_wait(self, record, args, shift): self.require_netdev('user') vm = 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 = logging.getLogger('replay') if record: logger.info('recording the execution...') From patchwork Mon Dec 11 09:13:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752508 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1197689wrs; Mon, 11 Dec 2023 01:15:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhYzUbvWK8YTqkHtY7igZgq4tGJp3LjEeByK4o2qapNfS74PxMd3WYkvErHD8nSm0YEzvl X-Received: by 2002:a05:6102:52:b0:464:91f1:5dfa with SMTP id k18-20020a056102005200b0046491f15dfamr2140624vsp.17.1702286146371; Mon, 11 Dec 2023 01:15:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286146; cv=none; d=google.com; s=arc-20160816; b=pWSl/rz18eo/NsMexBmvj/LqkBJ2cEVELkcRptwUpVw+26dXpM6wHz1TvzTzB2+4m9 QiST1WYzBGASuOSZx37toOCYFB7feRXg1ArDTIHB3OP0l4j+QLSOa5VI1gycrecZ2ZcK iAXuHjpJNmTpJcvxmKBTAY0FOdvKo1P9YyKxV6ZKwP2N4xZaXXJw1Bvc27TIGxV+Frjs W7hG61+IcRFURBXTpP8x4GWcmC1V9AUs0fj40hA9frPI/uu2FP8tlN7aEOsj/Cx1gVgn fZGawLR3qJbLtSLaOaqn57yuvKf7RjM6oF+ARee/V3Lix1e//Z+DD7GVLrn+3wFX7p/B dvGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eWQTJxjAvJ/tjtG2WMzLhaHBUimTZHZjiblNAYR41mE=; fh=5P/wIgpI0FmPL++m2PNNQNTrejW6t3h7Ix4gz+ehGxw=; b=GxqstUwBKWgMMr1M8Pqjp5hVoz0LkNoQNCFdsDKrmektI8/AQ+mvlgNQQLkHfVuNE2 BgjmSDDP+mWRCLqpnmndeRr/GhrLsFuUkUb3k57/aRUmKa+QetQkjMEjJb8GjdVCCREr nI7P7gHpJZTARQLJ8wCzZDt7srpCf+gey9qqJexUEg0KtaE/EfpNHUdzHU5VRxglhR2f Lz7HidPbk+7vv8T3hb7PMbOGC7xZHrYsU27QeBbpnt/SduRwzSSPxSeQGxE9IDSTMWZN qW1XyUKc0Af3Rrz0c1eWvLfjrFrFNecK1WUiTJzAEwEBhmw9nCFCQPa/RXmv8CE5C41R 6Hcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c22eghQP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j3-20020a0ceb03000000b0067aa71a955asi7934106qvp.504.2023.12.11.01.15.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:15:46 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c22eghQP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcMM-0001Ow-Vz; Mon, 11 Dec 2023 04:13:55 -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 1rCcMK-0001Nw-S5 for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:52 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCcMI-0004Ka-QS for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:52 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40c339d2b88so28723345e9.3 for ; Mon, 11 Dec 2023 01:13:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286029; x=1702890829; 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=eWQTJxjAvJ/tjtG2WMzLhaHBUimTZHZjiblNAYR41mE=; b=c22eghQPmHcNyK9fnWQ+DeiOU8ZDPUy91AsJ93PqGoAKtxIt4N//WmEWL5GgUyYQzV /3+CuP5OvcDaPUQolZOLiOuL5Bv6CJma+OdA7HDI9WHzom5oB2KdRLoKr1rajneJsLd1 +WZucqimake2qzo883wzqQlNbmVKXEcjgIoXOsMwDTbwuWQJ75hiRIcflUZ4KS68L4nl 6A1fzDruoGxvdug/Nd5VjLHfoJarhIxx0Dbwu373YZpqQiNBw3zbeZy0l5JjGfvfD94z 4Msyyd1b9VMvFmNBCz5crU7KgSBjjjbotiLZBPG3m+2t0QwEV/K0IQBl8sMalzltIAR2 FSrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286029; x=1702890829; 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=eWQTJxjAvJ/tjtG2WMzLhaHBUimTZHZjiblNAYR41mE=; b=VvJIcD6lMh1ueWuMB3K2g+WXo2Yo3gjFS762yCJezCUf4i38eL6Q0ShzrpwTeeWRAH 9UcjDGztwnDOAVpazqBacCmGwh7l5hVD3z0HsN2Itw2KPmYZ6t1DDGNXtuXP0kyHR+1K r2UEORvXgx2SUrc7EllLPxyeRjBVMFEryJHss6XMmdwWb/QkA4mz20VoqQwRjxaRd/0O 217t1pZXSIatovkuj353gCxa41K3AoeheBEsvxeFt9ZahZgHZ1dmibnVDoZLhi1wyM/X +eWqRymQiArjpoOj1Y/lBvCMGC9vay6jrkmkvak3S10Vbk0fhLIK85fHVVsMmOeqnOnm W66w== X-Gm-Message-State: AOJu0YyUfIs0zycDmrVDOKkWubjZCjU+xAQ88k93Qiua8aqd81dyAGYq sM/rqdFzU6ilsUGsmwPKMeHNoonAwTjpzd8Lpi4= X-Received: by 2002:a05:600c:4d8f:b0:40c:2654:5705 with SMTP id v15-20020a05600c4d8f00b0040c26545705mr1996303wmp.119.1702286029309; Mon, 11 Dec 2023 01:13:49 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id i1-20020a05600c354100b0040c411da99csm6827146wmq.48.2023.12.11.01.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:47 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6DFCF5FBE0; Mon, 11 Dec 2023 09:13:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 04/16] scripts/replay-dump: update to latest format Date: Mon, 11 Dec 2023 09:13:33 +0000 Message-Id: <20231211091346.14616-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Message-Id: <20231205204106.95531-4-alex.bennee@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- v2 - add EVENT_RANDOM decoding --- scripts/replay-dump.py | 90 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 82 insertions(+), 8 deletions(-) diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py index b89dc29555..6f300e4c54 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 # 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] +def read_array(fin): + "Read a sized array" + size = read_dword(fin) + data = fin.read(size) + return data + # Generic decoder structure Decoder = namedtuple("Decoder", "eid name fn") @@ -115,6 +122,11 @@ def decode_unimp(eid, name, _unused_dumpfile): print("%s not handled - will now stop" % (name)) return False +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 +def decode_char_write(eid, name, dumpfile): + res = read_dword(dumpfile) + offset = read_dword(dumpfile) + print_event(eid, name, "%d -> %d" % (offset, res)) + return True + def decode_audio_out(eid, name, dumpfile): audio_data = 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 +def decode_random(eid, name, dumpfile): + ret = read_dword(dumpfile) + data = read_array(dumpfile) + print_event(eid, "%d bytes of random data" % len(data)) + return True # pre-MTTCG merge v5_event_table = [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 = [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), ] +v12_event_table = [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_unimp), + Decoder(14, "EVENT_SHUTDOWN_HOST_SIGNAL", decode_unimp), + Decoder(15, "EVENT_SHUTDOWN_HOST_UI", decode_unimp), + Decoder(16, "EVENT_SHUTDOWN_GUEST_SHUTDOWN", decode_unimp), + Decoder(17, "EVENT_SHUTDOWN_GUEST_RESET", decode_unimp), + Decoder(18, "EVENT_SHUTDOWN_GUEST_PANIC", decode_unimp), + Decoder(19, "EVENT_SHUTDOWN_GUEST_SUBSYSTEM_RESET", decode_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_checkpoint), + Decoder(31, "EVENT_CP_CLOCK_WARP_ACCOUNT", decode_checkpoint), + Decoder(32, "EVENT_CP_RESET_REQUESTED", decode_checkpoint), + Decoder(33, "EVENT_CP_SUSPEND_REQUESTED", decode_checkpoint), + Decoder(34, "EVENT_CP_CLOCK_VIRTUAL", decode_checkpoint), + Decoder(35, "EVENT_CP_CLOCK_HOST", decode_checkpoint), + Decoder(36, "EVENT_CP_CLOCK_VIRTUAL_RT", decode_checkpoint), + Decoder(37, "EVENT_CP_INIT", decode_checkpoint_init), + Decoder(38, "EVENT_CP_RESET", decode_checkpoint), +] + def parse_arguments(): "Grab arguments for script" parser = argparse.ArgumentParser() @@ -278,14 +343,18 @@ def parse_arguments(): def decode_file(filename): "Decode a record/replay dump" dumpfile = open(filename, "rb") - + dumpsize = path.getsize(filename) # read and throwaway the header version = read_dword(dumpfile) junk = read_qword(dumpfile) + # see REPLAY_VERSION print("HEADER: version 0x%x" % (version)) - if version == 0xe02007: + if version == 0xe0200c: + event_decode_table = v12_event_table + replay_state.checkpoint_start = 30 + elif version == 0xe02007: event_decode_table = v7_event_table replay_state.checkpoint_start = 12 elif version == 0xe02006: @@ -299,8 +368,13 @@ def decode_file(filename): decode_ok = True while decode_ok: event = read_event(dumpfile) - decode_ok = call_decode(event_decode_table, event, dumpfile) + decode_ok = 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() if __name__ == "__main__": From patchwork Mon Dec 11 09:13:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752514 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1198466wrs; Mon, 11 Dec 2023 01:17:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYBXpbjkX2MNEubFgvTicUREalKCb9qWL73Ic3vzpJZ5QgeB4PxckeY1lfQJoskOYIffKW X-Received: by 2002:a05:620a:878b:b0:77f:c8:7fc1 with SMTP id py11-20020a05620a878b00b0077f00c87fc1mr5371874qkn.70.1702286267750; Mon, 11 Dec 2023 01:17:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286267; cv=none; d=google.com; s=arc-20160816; b=eW74zmqRSGeWWy9wypW14fLffIEU/ERlQ5iEsk1Dy3NW6sJ5XnAVIs+UMtDx84PdmL nRH9Qju/UjmWfvbzdoQKM2EimSpA0M3LWcFflPYRMz2cm/fXgi+fTJd/Ir4We420WTbB 1oQjC+xW/ZAz7DTpOO61Xl0z7pI0zGtJ3vUGVNxAMsRbef0lRp07euvh/KabJOt0sP12 67RSNGn3SU0coEI4tLsK3rIrzxTPV56h/4grd4R8zI300LK9zT4cPUPqeX0nOD99Mr9x 4o750o3fDH7U1OI1arMQI512kq37Sh5I3qt+7lXxgyJCXFoAhbRI5h2Oy0w5RbjbU+ab +igg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4SlvRTKcz2q66zKaZfqY8RiFDl94/8+g2tpwbIBdd48=; fh=f1WUYuFnVBAEIncgxZ+HIUkw3mzwzJ7NOR6vwyn/FI0=; b=j3synwg6bj6VUKI/XLrhbxscpQI8peQaJbklhzaofIRBKo0hw5cCX+UtscFm/1IQL1 hsi2jSaHr1fpTEL5rov/Kaf1gGVoD9c3VkCe9j2I0yYm8tD7Vn8iW5K4HLuhoAt/eZk6 kYH+xTaH3nD3y/Po4pyM9MMJkefjkc5i3WLdeuYZmXakTWm6jdYD6vYy1GyWRr5DHqya IUL93Fue91wcmwmjKojWPwz02Igr7j4Gvh3T63+aTyXQ9KcFdNjZuwjxgBnEkAO+I29F nGszIIzTDiD/1YKpG38wI6CA9d8Ya2wmvxyUj1D37LpKJUCOZncvvvrAVzOvdnYLJ6kk TVlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HPAC0cu2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e12-20020ad450cc000000b0067ab372721fsi7853298qvq.362.2023.12.11.01.17.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:17:47 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HPAC0cu2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcMO-0001PO-3g; Mon, 11 Dec 2023 04:13:56 -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 1rCcMN-0001PD-Bt for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:55 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCcML-0004LG-Pn for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:55 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40c3ceded81so18124295e9.1 for ; Mon, 11 Dec 2023 01:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286032; x=1702890832; 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=4SlvRTKcz2q66zKaZfqY8RiFDl94/8+g2tpwbIBdd48=; b=HPAC0cu2q9h0FMmvkf4rkNTUAFwymWZYKXHQcOwUdNXzPeJXP4ytJ/kYYE4a8nmaI4 C8gZDQ5Grutdlf8Vo9cTTJqlGK9NuAvWYA8lDYCsOM1IoAZ9Ix4YwFic7Paez7LJjTLq x3Co7YSwXprnJyGknYYKhfbaVL329lOExWOBaI3toPLTEeLxCNhLaXGqf8POSx4k0SM/ Nt2dQBLszVcrr6PbDIhfEPYBYb730n/nC6c2LA91OQCdDGWxtHhlxQBvQmCQ+QLBH9MG nlgcgEW3LhAHhITnfLN+MsDiqsUM2k8OTv5rbhrHKkT8A7VCeAwinJ9juFDlInboiwjV knbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286032; x=1702890832; 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=4SlvRTKcz2q66zKaZfqY8RiFDl94/8+g2tpwbIBdd48=; b=OXldov/kceWd2eKn5Whl+fiUlqJ/XrF7Sj3VmoKEcPfCRvVhjtWz82zsyCb6rBuB/W bjLj2AwuiqHv3O/8GD3o5SLQh7ZZDNYDGYfyN5SDBFfV1vAzDRZDvFuKIw4En7GldVeX EFxM+rnwnaPLE1HXaKca+VtkAahwDqJlXcyNaqYEgHd/mrhQWPnmEqPpd+oX+AvylO20 r+15d2Ip0QK8fQyXkFzKUsdBjeMPt/FLRFCTqSQwhidLArWwmrJQFDRSzK5ZTamsBJEZ 7GbpatRs57BrMLnfbsjqz2ewtzoJIsnQrajqAcXgNozS6l7cNgVNihDS/QIKeX+eBCYN 2Afw== X-Gm-Message-State: AOJu0YxSGb0RRQYA6Mg7GNlwhqlZbHLY/bM04egBV2IZ0by4zEpOz8Bt NyQ3SvaqbGrz10SEdJFv3FYlXA== X-Received: by 2002:a7b:ce98:0:b0:40c:271a:e7f4 with SMTP id q24-20020a7bce98000000b0040c271ae7f4mr2072440wmj.140.1702286032481; Mon, 11 Dec 2023 01:13:52 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id x15-20020a5d54cf000000b0033339da02f9sm8062721wrv.110.2023.12.11.01.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:51 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 81A3A5FBE3; Mon, 11 Dec 2023 09:13:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= , Pavel Dovgalyuk Subject: [PATCH v2 05/16] scripts/replay_dump: track total number of instructions Date: Mon, 11 Dec 2023 09:13:34 +0000 Message-Id: <20231211091346.14616-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This will help in tracking where we are in the stream when debugging. Message-Id: <20231205204106.95531-5-alex.bennee@linaro.org> Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- scripts/replay-dump.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py index 6f300e4c54..d668193e79 100755 --- a/scripts/replay-dump.py +++ b/scripts/replay-dump.py @@ -157,10 +157,13 @@ def decode_async(eid, name, dumpfile): return call_decode(async_decode_table, async_event_kind, dumpfile) +total_insns = 0 def decode_instruction(eid, name, dumpfile): + global total_insns ins_diff = read_dword(dumpfile) - print_event(eid, name, "0x%x" % (ins_diff)) + total_insns += ins_diff + print_event(eid, name, "+ %d -> %d" % (ins_diff, total_insns)) return True def decode_char_write(eid, name, dumpfile): From patchwork Mon Dec 11 09:13:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752505 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1197401wrs; Mon, 11 Dec 2023 01:15:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZ72SAoQYQi/ZbdVDo5s7ZLKxYt6+3mTIADCY+tHk5hwxZzAyTyPr/hTEVl9Hth+O3R2kz X-Received: by 2002:a0c:f74a:0:b0:67a:a721:8302 with SMTP id e10-20020a0cf74a000000b0067aa7218302mr4745094qvo.92.1702286102629; Mon, 11 Dec 2023 01:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286102; cv=none; d=google.com; s=arc-20160816; b=u+uXziC7DYX55P05Vn1j3+3TtYSxAZmFdNUfo/JUjTA96cGaYi5jQ2oeBMayZWpVLQ 1MyMznQoldaSehvkDd/nuJl2YOYJwsdMDM9qoZQ6W5cMIXc6cIKsUw2EzfVVi8GXAB2p utp9jJT5Nyc6cLsznzTSGWHSfDB2+nJIg0htgCcyuhHJukcSr4hV5GPrcMT+SQgH9r2Y EULhtPMxCFm6KUhvgQhO6GTVXZ/W92k7zqhM3+7U5StT1Gd8QSK+leTpy4Tx4ymQrWKR KSGucRK+FMn+Y8BqVW09MU0wjbiINZ1Z9jmJysBtEGvthqxTqWbXzkoyGr/Qkj0VdorG jN0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=E2A0FLXIYa1xWSm3FkBRraMt/ZpNKUbc3z2ZyKK25Ps=; fh=f1WUYuFnVBAEIncgxZ+HIUkw3mzwzJ7NOR6vwyn/FI0=; b=emNASC6US60SDE0NN5e5t6EyfL/fAr0diiIE18+Ock1O4nz9vqv3bC19q8RIs0oNi+ HGAo5dkYv7/oYyVvtSa8+RN9I2n7RfasAVci0rajjxGJzJyMF5nX1nHr8DqtIdfQduIO ViLg6QHkZWl7+JyqDBA96YpIcTZJucg+nOS+dePv1ECB1HfexXZYrlIhdkzn7zosrSRS jiH+vK4jfg1c+zq8yCOp375fdXohkenFcxNIAfjgtqYa8eo94ww6SMs/d+gUcYvhP1++ W6hcZfVByPaAumTw5Suq9BXq2Ebs0wLQfdzNW0Y4UhEKV77pAF1N40lsHqdGm4a2w0z5 3XTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dgitHBsC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o4-20020a056214180400b0067adebf5440si7756917qvw.391.2023.12.11.01.15.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:15:02 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dgitHBsC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcMS-0001R3-Eo; Mon, 11 Dec 2023 04:14:00 -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 1rCcMQ-0001QF-KC for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:58 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCcMO-0004Lq-3g for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:57 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40c3ceded81so18124625e9.1 for ; Mon, 11 Dec 2023 01:13:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286034; x=1702890834; 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=E2A0FLXIYa1xWSm3FkBRraMt/ZpNKUbc3z2ZyKK25Ps=; b=dgitHBsCPkspl70F46KS3FdG82lW1SsV/ePAGXJVxxAxE9Ql7DrllAHFPGLdQJ/bV0 jlXJAWsEWtiOgfY8jhZitRQLcnq47OM6SMW2h51z9qLYfmpKYeyzZgKyBRkwHWNNw7HE zXCEBZxds3aulyjt4TDiiDwvElXCNMLcaPx7nhD+2kkQ9c9m1LgNVvIYlcS4zQQL5jAH rw2wyOOciVVE8+f7fJ623UD9qlEof98OtBVbG5KC/iGaUzJBP4B35VL231HnrLRA24Dn 0tf8j27rgbksmeHh5/3e7Mbz8WXt2Uv7ZMsZ8mxRKZxxR6e65mAexCDNjBxpyp3tUi+Q CaAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286034; x=1702890834; 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=E2A0FLXIYa1xWSm3FkBRraMt/ZpNKUbc3z2ZyKK25Ps=; b=jlbFhLRt2ZioTwHQYdnuXDzJI6bsQEKeTBVrqhlTrT1N8YE81UndJhJN1DzU9vu4Ag AxGzlAMmDNxTb3t1JqsA8dXYUzhwB/rNKK8AB6YoYH8w2wRvA5t7Ba1fbcJwROhjPoWA ZvajHwD2im/Wa7jxePYekIZy0eKjpqmNZzxt0qHA9GTBRceysUzosd8Z87JJEJQYIDYI /IpRHj+agHTbgES5zdHPOrdjFzfKVbYuizhdUfIm6ijKeVATPUl7MrWurOCYYRt3BBj6 RrYKdaMLHFeaFKX3+16WsT/DBn1WSU2fxmQRFe31tAcypas7FbGvTJYpnSRXrAW7zJu+ SHZA== X-Gm-Message-State: AOJu0YxcRkMw8jIv2xRjAg4rRqURAPJfj/RSR7U+Cmwzz1woByZAH8hY BC5XaYb8KyYwLPpIpZjaw+Wvgw== X-Received: by 2002:a05:600c:4e07:b0:40b:5e21:ec3e with SMTP id b7-20020a05600c4e0700b0040b5e21ec3emr2014081wmq.112.1702286034612; Mon, 11 Dec 2023 01:13:54 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id e12-20020a05600c4e4c00b0040b398f0585sm12484433wmq.9.2023.12.11.01.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:51 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 993285FBE7; Mon, 11 Dec 2023 09:13:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= , Pavel Dovgalyuk Subject: [PATCH v2 06/16] replay: remove host_clock_last Date: Mon, 11 Dec 2023 09:13:35 +0000 Message-Id: <20231211091346.14616-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fixes: a02fe2ca70 (replay: Remove host_clock_last) Message-Id: <20231205204106.95531-6-alex.bennee@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- replay/replay-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/replay/replay-internal.h b/replay/replay-internal.h index b6836354ac..516147ddbc 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; From patchwork Mon Dec 11 09:13:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752503 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1197392wrs; Mon, 11 Dec 2023 01:15:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhVrifaMnZGmriV+TYK9yEtCPJqI09D5iV1IdMwmfIcP2qId7fPj3YASAZoL3fvELy4csQ X-Received: by 2002:a05:6808:201e:b0:3b9:ec87:849 with SMTP id q30-20020a056808201e00b003b9ec870849mr5265809oiw.74.1702286102047; Mon, 11 Dec 2023 01:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286102; cv=none; d=google.com; s=arc-20160816; b=opraUSGCIqKbtLeXBEA9kxwTDGTbwXl/XJNajVLQYti/R3PbJ8VJ6fBEPHzShgkHon Crw0uU07GfEIOXbwrsaxEeiuzV1shLfepx0xNIppsZ3vClRPJX9U8MXZ4y/z9mBVjs4+ 1KZZhYpNcIGmpqQWa5YL8Y48HEpwQxd2HQfSuAzOQxOW8VEA5IE6jylVa2l7GD/fl/1V c5TKhk3rbI7AJu9YRSFVa+G1WguWyfTIfq8K2qjWixccShqsmnWjDA8qKvF17ixBKqR9 RGFCBEDJu1wxJUPiJnDjstCOVSlcfefRHw6tY1U7AEELI8uelKMGolQXdxsNt2n8noac SE3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=l1cZ8rGcMVRz/ykfSTmDydjLIdSR950YfUbOQT8uOwo=; fh=f1WUYuFnVBAEIncgxZ+HIUkw3mzwzJ7NOR6vwyn/FI0=; b=dVKFVifyhxfIDSpusk5gRQjMHk3TQbi99GH/DL+HIUq4tliR1KTISVpAingEmZcQf6 ZAnCKREOCPXFkFd8zvBhZOXhmoZkiF/lmGisUP5+H12B+T6V6WEUkZ59BcYznOKzcwFl qUQUWc2/HEfA0UAiosV+eiD3wyXAs5QZIUBC9CX/7doWt1ODRZc6cyOlOJhYPp+uHmYi yGFNphAVg96bxUogL1OTeZ1L76NJrMAqs7Lts5vuCOVR1XyANvKPS5y6bNsFmYVaS1KE zqdgqeoKGnXvEnqdQRpFqciE2ge/A6OWvlC66xq40kEe164vcGK/5CXuphTPVXHPboQ/ /TBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KGgKrk+8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r17-20020a05622a035100b00425a1900d5csi7043094qtw.240.2023.12.11.01.15.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:15:02 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KGgKrk+8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcMP-0001Pc-CQ; Mon, 11 Dec 2023 04:13:57 -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 1rCcMO-0001PP-Ab for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:56 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCcMM-0004LJ-8b for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:56 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3332efd75c9so3883228f8f.2 for ; Mon, 11 Dec 2023 01:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286032; x=1702890832; 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=l1cZ8rGcMVRz/ykfSTmDydjLIdSR950YfUbOQT8uOwo=; b=KGgKrk+8Bf+dJFtmWBVg05DLPWCHtxY9yGBJjbllP2Lvb1Wg0lHq/GJwex8pu/V2Af FsQbUUqcIburb+I1T0hEKbTVAaL1gbEWPyU9e+drtGMLt/WFaaML334dQOmfJ5jIpaEv A1b8QgduwjDegIPPlMsQ9KKxinm9fx5Ia+9To22Xsmv20fbNjqbyPECtAr0AGD3XlCzk +dbZWCGsELBT03VGUREWxswvqLFPxQFRdE8MUCM4SJaT8kH6f1kClnDti9P3VuIgmlBz YrUI12QtnqN/+kVIvBI615LmBBb9CKBKhsjfb808CN2cM8m3fbjMolf8FSiTxiWP4vj9 DjnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286032; x=1702890832; 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=l1cZ8rGcMVRz/ykfSTmDydjLIdSR950YfUbOQT8uOwo=; b=ZUBpBE6DvzyLmG/0XD6N8sdhpG1FchPKODWrXt6MraQALxKSzmQneECE9uEwEYgHD8 VA4pgKGCBZAQUq2tiHgPiaqjdJQt2L5LeqWKNyMvMIV0EcbgfUbwS7YAsVnIXa1JusKK rqXzHrXAegRwuwEdj4m5ZXX8dzRQzcIdnOCo/2+vLgmN+JGm5sxxRbFAhY4qqqObSnVC eFPiGK9C4mjs7QysZM8E6z2IMZu8CPaxxWnYL7UiX3TqC7g9qyEC/8eAIZEywZgEtEur JEHsv5AIVh3DuqUjoWIp4gh73Omre+o5Ualps5K4NghxBlHJM9xfkRXQZSWLglTrx9Gw 9u2g== X-Gm-Message-State: AOJu0Yx27Mfl0nRcFVJ/G2J+xsTFd72lPt7E7qphaL+/XBvvmHT4VVkA XHkGvXN0sWxlmtG5tib+pvFCQw== X-Received: by 2002:a5d:54c4:0:b0:333:49a8:73ea with SMTP id x4-20020a5d54c4000000b0033349a873eamr839277wrv.249.1702286032722; Mon, 11 Dec 2023 01:13:52 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d16-20020a5d4f90000000b0033349bccac6sm8151663wru.1.2023.12.11.01.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:51 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id AFD245FBEA; Mon, 11 Dec 2023 09:13:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= , Pavel Dovgalyuk Subject: [PATCH v2 07/16] replay: add proper kdoc for ReplayState Date: Mon, 11 Dec 2023 09:13:36 +0000 Message-Id: <20231211091346.14616-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Remove the non-standard comment formatting and move the descriptions into a proper kdoc comment. Message-Id: <20231205204106.95531-7-alex.bennee@linaro.org> Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- replay/replay-internal.h | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 516147ddbc..98ca3748ed 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -63,24 +63,31 @@ enum ReplayEvents { EVENT_COUNT }; +/** + * 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; From patchwork Mon Dec 11 09:13:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752512 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1198290wrs; Mon, 11 Dec 2023 01:17:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IE8srlUHJEEa+dSdyf0SEJmtKm8KMmKXPV8v7efiyloQeYfmbz3PG8WIE1eBvC+2W6JOUjR X-Received: by 2002:a05:620a:1d97:b0:77d:88cc:e759 with SMTP id pj23-20020a05620a1d9700b0077d88cce759mr5386379qkn.44.1702286238326; Mon, 11 Dec 2023 01:17:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286238; cv=none; d=google.com; s=arc-20160816; b=mZ9PXFE/ITChsEDmUKlPHwgAQ2YQ0MuC0TqV70r3krx1cGcAY97gip9G10ZtVUlhbB Svg8c3uTC3ANbjGwe79xC3yvqK9KWfxnCsuvUKecZYBpg1IjsZviuVB0oAsaVeAxgRYj tZU1xaZ2aC+WGrJxGKfAKZh7Bky/Z37I1ii6gOH5LM38boNaUrwaaeL+8F6+kodvmfCw lJg61zPQkJva8VZ+eTN0+jcp3Gs49WBgc96bFBBor46MLLDfAgCrmY1ITgvTHKUPc140 uUSCcU2h6vNjwJVNNweJVKmoBuNXMx9aXSPox0LNaPekJPna7taOykwOMrdkH7/Mz/G3 LgoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HdDx5EiLjddIKUt2fw45zi8pgfokyd/tBcuj5PJ4A5k=; fh=f1WUYuFnVBAEIncgxZ+HIUkw3mzwzJ7NOR6vwyn/FI0=; b=k9amY1WIwaMPE9HSS6fnIb44oXaMWM7V5wjlhaMroRPwppKNGyfQWPDJpdZ/Rzof3m X8WhWC1J/SPr4KULvWAwYYAVcfk18FGdrSK8luF2iQNQXKTIljzm4fqf3Top47U+geDg A9RWe4bR1JF7Yt5iNXAwPrLIkIn0crSy9RVuhb/7wzG0N6v8GWbxtnvEYWKTXmszVDsC RpycLWrh7xbTaDqz4KgNQM8uKIe8K6Ej0xdCzSNr04gmbiM/LvonQp8qQIUX+PkRVcGL 91fFMw9L2dhMwepOvkRQJDuaQCE8UnDQ/PIp/87R+SXUyvosdKe/FpOU+IvIqvS0zdvl /Feg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="AE4/f/Vc"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k3-20020ae9f103000000b0077da9bb9868si7518481qkg.446.2023.12.11.01.17.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:17:18 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="AE4/f/Vc"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcMU-0001Rg-7n; Mon, 11 Dec 2023 04:14:02 -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 1rCcMT-0001R5-1K for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04: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 1rCcMR-0004MF-9k for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:14:00 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40c29f7b068so40058415e9.0 for ; Mon, 11 Dec 2023 01:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286036; x=1702890836; 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=HdDx5EiLjddIKUt2fw45zi8pgfokyd/tBcuj5PJ4A5k=; b=AE4/f/VcVmd7cYxY+SnfA8AGSm3DmSYVkVAnRHqvfdVvkTW/F039zfjqToBvzDTJnt UWw5W+sqkbJOhq/Kb6cbie+feX/qC8PcSGRZldPSHwAtG4ZXeerYLGuL0qJ8CicICEh2 8K7zMpICGX0AmVkHt9e7wemYizxwCtIinpwpm7EVxbMvJP80TCMCh9lD8ZCnD0p6X2n4 iCGDeAffyV7tWis1Wsg9joqBjC6CepvCnrmowNWr3amG4t2TFMjWDDzLhgfg+qj5SpfY rHLlgzqGMA6T2iMDmAeqEGy3pMYorXSZK7AhreL9E0EzFW2FWWxZPehHRHvaKawE8vQO E3Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286036; x=1702890836; 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=HdDx5EiLjddIKUt2fw45zi8pgfokyd/tBcuj5PJ4A5k=; b=U8/lZ4ugoKPTh2G0SOhD1K5dmlCqDTMxQPvMt7iY3w74kjo8UA1Din9nD6dnRb11Jt W1DwzckbmUA5xe67hdIehKzlY7JdV9+czCC/QsUPp/9pYvIVvHvmMH2Q+Fp/U5x7tJqC P5/tEHwSr7BQTnej8AGdmNA0DyB+JfWaSbs1Lk68OEuu0QoCIQ2LU4t4QO0p9VEQdLjp c7m8xQrNgfi9O0ZoTp+cPmFEvUnk1tpOVZ5/3bqvQQXq39DB186BTiWi53FLFwXjjjDC d0KxnF5Lt+yxACoAbfPWiATisyS3i04l39hIvL3ZXTp0lP4swLlbcZIDXNswtzpWncBh jWZA== X-Gm-Message-State: AOJu0YwC0BaGBkh3rVWp/SMnkUtcP8CHxB+sslY6eGOqsP+Bt7N/Q/xE 8A0ti820JONpIoTx4SA7ZtBEyg== X-Received: by 2002:a05:600c:20e:b0:40c:330f:f2fb with SMTP id 14-20020a05600c020e00b0040c330ff2fbmr1766679wmi.162.1702286036538; Mon, 11 Dec 2023 01:13:56 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t15-20020a05600c198f00b0040c4620b9fasm3864005wmq.11.2023.12.11.01.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:51 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C60B75FBEC; Mon, 11 Dec 2023 09:13:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= , Pavel Dovgalyuk Subject: [PATCH v2 08/16] replay: make has_unread_data a bool Date: Mon, 11 Dec 2023 09:13:37 +0000 Message-Id: <20231211091346.14616-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org For clarity given it only has two states. Message-Id: <20231205204106.95531-8-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- replay/replay-internal.h | 4 ++-- replay/replay-internal.c | 4 ++-- replay/replay-snapshot.c | 6 +++--- replay/replay.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 98ca3748ed..1bc8fd5086 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 77d0c82327..634025096e 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 = replay_get_dword(); } replay_check_error(); - replay_state.has_unread_data = 1; + replay_state.has_unread_data = true; if (replay_state.data_kind >= EVENT_COUNT) { error_report("Replay: unknown event kind %d", replay_state.data_kind); @@ -191,7 +191,7 @@ void replay_fetch_data_kind(void) void replay_finish_event(void) { - replay_state.has_unread_data = 0; + replay_state.has_unread_data = false; replay_fetch_data_kind(); } diff --git a/replay/replay-snapshot.c b/replay/replay-snapshot.c index 10a7cf7992..bf75c2ed28 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) static const VMStateDescription vmstate_replay = { .name = "replay", - .version_id = 2, - .minimum_version_id = 2, + .version_id = 3, + .minimum_version_id = 3, .pre_save = replay_pre_save, .post_load = replay_post_load, .fields = (VMStateField[]) { @@ -56,7 +56,7 @@ static const VMStateDescription vmstate_replay = { 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), diff --git a/replay/replay.c b/replay/replay.c index 0f7d766efe..d729214197 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -258,7 +258,7 @@ static void replay_enable(const char *fname, int mode) replay_state.data_kind = -1; replay_state.instruction_count = 0; replay_state.current_icount = 0; - replay_state.has_unread_data = 0; + replay_state.has_unread_data = false; /* skip file header for RECORD and check it for PLAY */ if (replay_mode == REPLAY_MODE_RECORD) { From patchwork Mon Dec 11 09:13:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752506 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1197404wrs; Mon, 11 Dec 2023 01:15:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmgaJVz+N74uNrvtgFneg/Bbq0544BY+kal/FwcAECLb8FH0fR1LbYaEiExdxPqcNWYQcW X-Received: by 2002:a05:6358:7254:b0:170:1be0:34b0 with SMTP id i20-20020a056358725400b001701be034b0mr3703482rwa.55.1702286102931; Mon, 11 Dec 2023 01:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286102; cv=none; d=google.com; s=arc-20160816; b=ItI7mRN548UfrRJFNjOor4C/5QN5Vd3SDkzjn0x8tESQ0sHC9542qo/kH5OqyU5ywq twumgnmguKfxme1pYlwzsOtf9WLRUFbL7JoSGHiP3lm/+xp+J4zCpkVtlVfTmrjw4WE/ EGLQ27oJyZ7KZ6EgG8p0XpZI82VwN+4LmK4VAfyJHxds+CGALuYaAi93vkOifGMeBd/S 4ZVO7ve9ssaura1a9VN5mTaXwcRt3sJoozdWXatH6B+GM4xjYxhN39GS9vUZKnHG7kDc i7tfuYugzVnIHroP9YNze+D71mNFVRHq2x0FUKSKKmm8nXQePuSk6YG6j2F38IQQ7q7G K5Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Empg023tjpYJtJwnns0c9XdxnArIwdv6MObgi9qbIew=; fh=5P/wIgpI0FmPL++m2PNNQNTrejW6t3h7Ix4gz+ehGxw=; b=BaVf9NfF98dHpqo0ttHbhLKp4t+W9Ybn8CM0H5XExLWrOKAc84olgTdUTtVzcObMYB PMxfe9UcYtqeDl5maUDAcYj8KPFxR0S8dlgn+voN3V9QhAoFdxpBPwWsgBatkXl/1xpW hGxf2L9CIfQ4WWKiHqCY51IykBcOoPeFPW3tsRVIJNG1iq9QrCSb0A+5+0Mq7vrW+bqJ BHt8MYZ+vp4mSPLvbo90unBrYdh4lesjaKAu/Ehoe1xhhAC0KuOu3wEU5FwGeXLerixp kfE9f2tV7HL96ZKU8ubdt/Hl9nguXGAF4mbTC0eH7eW9YqXfy/MGaFPgpTWWbG/IxJgK jN/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rQDDM3s8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a9-20020a0ce909000000b0067a1c7eff37si7675435qvo.154.2023.12.11.01.15.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:15:02 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rQDDM3s8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcMR-0001Qj-UB; Mon, 11 Dec 2023 04: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 1rCcMQ-0001Q6-7j for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:58 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCcMO-0004Ly-9t for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:57 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40c2718a768so45115485e9.0 for ; Mon, 11 Dec 2023 01:13:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286035; x=1702890835; 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=Empg023tjpYJtJwnns0c9XdxnArIwdv6MObgi9qbIew=; b=rQDDM3s8KLfCwkuv23t5/KkDoNOnMqT//ByV2CnGjWCuD6STlgdjXuyptQMd+Ii1dx /czy48QLd13VDjqWIfHcV1ilz+4mP/5/Fu7qNNdmnq4ySSGdGlRSFvt6fgRWmmSBlVCO qqYv4Qg1LUzNPLJGRzyOqwYb9vPaS2pRtHm+BjzHE/hZgMD8n0WNUmzDcO01NqI9QWLi bXW70eY2CPbYOImnyIzlG00g4qogkpzSa6sCls1ooVSzHsP2RAxtiErbTGCyn/9D1KUQ mSW77SYN8l8l7HbxDHaljN+2y9QCqkN1o3Wa2P5v0x+gWKknCOFAdvkG2KznIj/VhkUF OqcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286035; x=1702890835; 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=Empg023tjpYJtJwnns0c9XdxnArIwdv6MObgi9qbIew=; b=flZOPvmrGfrJ42+7A4nI4hQUvkQNv+EaO8gEsGijM/dm1Vt5DE2wz8Aut6+2XDgsF0 6GI7i/b+MRgR0gChNlF7UQPz0paJllCfsS41mnOXnpZt+eV3KVOp3lR7zJmaT5ySV7Zl 4gkqMccp3nvN8xeJO4HyaubmZMhiyCo+LRkaI66wcWOftuEdDleiJAeAYVrlJgwHxfs/ +9jDan5JlYl/HeD5wdG1id2mg5g+aPAKhg7hjEjp5+LlgHz6UAeshmv5S0QZ/I7/UIjc SnPyTODLOHFuMcSC1q8IMhQjn5p0KpHxR/5Cp3FYrW0JPpgp1nXLFboXw1IskuhYAdEx nfDg== X-Gm-Message-State: AOJu0Yz3wCGdyWYOa5FmQssvIMSd3kd/9xy2A0L3TB7VxlbRorcd29XM w/b0UPNDLgrymy7aRYZJ8ZEpHQ== X-Received: by 2002:a05:600c:21cf:b0:40c:2bb5:f8d with SMTP id x15-20020a05600c21cf00b0040c2bb50f8dmr2499931wmj.123.1702286034844; Mon, 11 Dec 2023 01:13:54 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n10-20020a05600c500a00b004094e565e71sm12279016wmr.23.2023.12.11.01.13.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:51 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DDDC85FBEE; Mon, 11 Dec 2023 09:13:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 09/16] replay: introduce a central report point for sync errors Date: Mon, 11 Dec 2023 09:13:38 +0000 Message-Id: <20231211091346.14616-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Message-Id: <20231205204106.95531-9-alex.bennee@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- v2 - split the char reporting into new commit - report the event name rather than id - add current_event to VMState snapshot --- replay/replay-internal.h | 19 ++++++- replay/replay-internal.c | 1 + replay/replay-snapshot.c | 1 + replay/replay.c | 111 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 131 insertions(+), 1 deletion(-) diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 1bc8fd5086..75249b7693 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -25,7 +25,12 @@ typedef enum ReplayAsyncEventKind { REPLAY_ASYNC_COUNT } ReplayAsyncEventKind; -/* 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); +/* 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 */ /* Registers replay VMState. diff --git a/replay/replay-internal.c b/replay/replay-internal.c index 634025096e..654b99cfb5 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 = replay_get_byte(); + replay_state.current_event++; if (replay_state.data_kind == EVENT_INSTRUCTION) { replay_state.instruction_count = replay_get_dword(); } diff --git a/replay/replay-snapshot.c b/replay/replay-snapshot.c index bf75c2ed28..a24d8a7483 100644 --- a/replay/replay-snapshot.c +++ b/replay/replay-snapshot.c @@ -55,6 +55,7 @@ static const VMStateDescription vmstate_replay = { 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 d729214197..3ab6360cfa 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -38,6 +38,107 @@ static GSList *replay_blockers; uint64_t replay_break_icount = -1ULL; QEMUTimer *replay_break_timer; +/* 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_EVENT_"#_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_CAUSE_" #_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 checkpoint) +{ + 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 >= EVENT_ASYNC && event <= EVENT_ASYNC_LAST) { + return replay_async_event_name(event - EVENT_ASYNC); + } else if (event >= EVENT_SHUTDOWN && event <= EVENT_SHUTDOWN_LAST) { + return replay_shutdown_event_name(event - EVENT_SHUTDOWN); + } else if (event >= EVENT_CLOCK && event <= EVENT_CLOCK_LAST) { + return replay_clock_event_name(event - EVENT_CLOCK); + } else if (event >= EVENT_CHECKPOINT && event <= EVENT_CHECKPOINT_LAST) { + return replay_checkpoint_event_name(event - EVENT_CHECKPOINT); + } + } + + g_assert_not_reached(); +} + bool replay_next_event_is(int event) { bool res = false; @@ -226,6 +327,15 @@ bool replay_has_event(void) return res; } +G_NORETURN void replay_sync_error(const char *error) +{ + error_report("%s (insn total %"PRId64"/%d left, event %d is %s)", error, + replay_state.current_icount, replay_state.instruction_count, + replay_state.current_event, + replay_event_name(replay_state.data_kind)); + abort(); +} + static void replay_enable(const char *fname, int mode) { const char *fmode = NULL; @@ -258,6 +368,7 @@ static void replay_enable(const char *fname, int mode) replay_state.data_kind = -1; replay_state.instruction_count = 0; replay_state.current_icount = 0; + replay_state.current_event = 0; replay_state.has_unread_data = false; /* skip file header for RECORD and check it for PLAY */ From patchwork Mon Dec 11 09:13:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752504 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1197396wrs; Mon, 11 Dec 2023 01:15:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2+bB2Msl7pMiMydbsby/FodumO7bM55WJwujnIto8bKhEfXjpcMqFJvpQGWhL47OB6nka X-Received: by 2002:a0c:f992:0:b0:67a:d9f5:19fc with SMTP id t18-20020a0cf992000000b0067ad9f519fcmr5794459qvn.28.1702286102346; Mon, 11 Dec 2023 01:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286102; cv=none; d=google.com; s=arc-20160816; b=tF/hCgyrlFOadAonmyuyeRinMZ8LSCvv/Yf6kEiDK7B4LAozgiKQd5fOdRAFufQFRF FvCHqWs7bPxsUHRUXxGHvf09DbwxnhYZ4GDDrjmwtV0gGbnvZA64Nj/5MIaiwuDZpeLC aYXXfUv+jUa+EMjMFgT0rEM28dAR8wKLjzvKeRIM9a0BvR2pu7JjOtgoX5QrlqAJNYoE BA6xsjNm4KrCgbzADaPe79Vw1dqz4ZsUq9D5J8CLZZjzxbPkjLIFw58S6LwNyxBo9ZQQ t6Iuotu2xId+hYvmooKVZDKfsqEF3B6BfwrINEDmUq6lz7sGgiFI7Tx5ZTdWQSKQAxfI LNtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jMhVIXqtIwGitOVNFv/q8yt8hGURWr68L+NA/7+kuZo=; fh=5P/wIgpI0FmPL++m2PNNQNTrejW6t3h7Ix4gz+ehGxw=; b=H/B9DXUOF6Ve/YUGOzJ3UVDF3R/QMCvIyoG2e8fPEYepG6u0bOcp7R+bzCEk21eeIu +hfLeBlqRm3aL9sVmXxC84mkV4UqtyQbRYRpBPDZCcIco09Si7hJk3YUMkm7zO5ZwjVN hRQr5RFeB+Ub3zRRDxJc25866VN0E4un8ZGrPk2ID0O6fDu2Iqkk0Xk/Y5/0h9xOeRx3 AuepkxDbvMqzUP1RzOV+4UnDvAEE0niYjqkc8XlCWLZJoKxniG32PA1F3vFJwOzUxIap v8PSCwY5K98XVSA6ISMCg8XPyXeDiuHChSMq6aO69W+aNYkREXvLRzggowPjLsZhKw+t Kn+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eodwA7y2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id qf18-20020a0562144b9200b0067eaa04ddd1si7784225qvb.143.2023.12.11.01.15.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:15:02 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eodwA7y2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcMT-0001RW-Mg; Mon, 11 Dec 2023 04:14:01 -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 1rCcMR-0001Qc-Mw for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:59 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCcMQ-0004MC-5E for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:13:59 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-333536432e0so3999348f8f.3 for ; Mon, 11 Dec 2023 01:13:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286036; x=1702890836; 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=jMhVIXqtIwGitOVNFv/q8yt8hGURWr68L+NA/7+kuZo=; b=eodwA7y2MaCqylSPffVz7WjYDgNPuw/37KHNYb8dnB3JwWJ717EWnzHGGXwI7mEgEK Q+Z8vpGG7B7fHONaabLxJ3M89IzgVESJAQUAT+xWZnqbDY+ta348WiNkB/UOJiXcPtzy NPNS350ePu62pONVsMLl0KZh1CzNylQDIhaTtLqx8CD1avcCVh+4g1Nn3lTPJCoMCleM QAWKjS54VvqimdOhjogCQqOQI8OuhfA3y7BDXEZBOeNX2mAw0+cMa/q4usi8AoCHGYyl a0G+OGCDqqeOLoNR1GInZzxPPXbTdPNVFUQvD0bw1s+bTbY0HnWvcrgLgceujnr0iyP1 yiGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286036; x=1702890836; 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=jMhVIXqtIwGitOVNFv/q8yt8hGURWr68L+NA/7+kuZo=; b=vZA39zwUvbH2HfH+wallNMuYhzUrWGp2N2+E4HFl9ycHNjQZNdfxBL3nQhYEX50qdk +ZrKEutL3C86NvdqqzVpqZ2AHdbMu2OnW2zoJpqWMsiv/tbd5Jn7PWeqtQ3R1nRuoz6g Tf1krgsufF+MvvdSZ/bRSo495FkPM3B1BTONdKs4RzAZZ9Yswm/yZaKvGvVoFg8HXK7X OlqnYRhcjLhSvO8xMqiOaNnPVFLjJaFw98Pvi0plmLIWZbkhFkwGNuP2vqg2sUDNd0YK d/wf/HdPgWfKLHiiRrrMYkPFUpHHAqG/o+mM9wil0Mq8S2BIMtQhAHV+YJSzUrJgrXSu tXyA== X-Gm-Message-State: AOJu0YzdNPhkpcg/ghTTXjx4ozRhJmIAs7aBtCVg1ZOWuPK+lLNkl3b0 cAGF41HyZPut9FS8HMxNbct2Kg== X-Received: by 2002:a5d:698b:0:b0:336:989:1baf with SMTP id g11-20020a5d698b000000b0033609891bafmr2085634wru.40.1702286036331; Mon, 11 Dec 2023 01:13:56 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id o1-20020adfe801000000b003333c06fa79sm8121030wrm.71.2023.12.11.01.13.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:51 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F2F315FBC6; Mon, 11 Dec 2023 09:13:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 10/16] replay/replay-char: use report_sync_error Date: Mon, 11 Dec 2023 09:13:39 +0000 Message-Id: <20231211091346.14616-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Now we have a centralised report function use it for missing character events. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- replay/replay-char.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/replay/replay-char.c b/replay/replay-char.c index a31aded032..72b1f832dd 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 = 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"); } } @@ -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"); } } From patchwork Mon Dec 11 09:13:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752507 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1197434wrs; Mon, 11 Dec 2023 01:15:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUNhmpBDkewHK6RuWBGOx4PuIBOUzrd0HDzPZCIRUJx9oKtPVGxeqN70rowwMSEKL2JALT X-Received: by 2002:a05:6214:1242:b0:67a:35d3:a76 with SMTP id r2-20020a056214124200b0067a35d30a76mr4534645qvv.34.1702286106864; Mon, 11 Dec 2023 01:15:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286106; cv=none; d=google.com; s=arc-20160816; b=tR/p67npHgnzJVcQx+zV90scFP/f49+Lujtfp8MQdUUJVPUiGT5HAcJnjy7edBvKlL pg6eJdgxg/i7qRk/eL/9hI8obvc6eqZzc3d89EFdR/ctv+XvdSM4Nk2Z+nyCQbj/XTs9 ly/W9H38HVxBeqO+HuHfAibnIRPNc2fHNuhsqet38cGYqPwshu2ktdiwrFcRrGKzdSzP Z4qVcIIF2zBjvy8TynMDGp3lA8tCYdSSR+8qQedScDBmR1hz6chPH+Hz6tKqxF6sISHF D4DsKa46YsDso/vKTQMfSNeMysRKO/lbfucf7juq3ZVjKtWRCzgZAIsWXM7cNS+R04P0 ACSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZyUUUbIxqiiG4umBh+NSFFGXFuKjw1v2RZdUYXJB6cI=; fh=5P/wIgpI0FmPL++m2PNNQNTrejW6t3h7Ix4gz+ehGxw=; b=w0vwZq99TuXVNkzqBkVAwlOcHgi+GNLwww1Bd4Hqc9HJ9C18Kh89nr607dlu4fGRXv rZy8kKVLEj5/7FZb2Gm4qYongl5b2I++lkpRK9X/++VxqfKOPYMLiZCYM/PVQNLoMo2S V6klRj+sRnkRe37Hxdgf/4NkKqxHfbW8A9CnRrVExx68kcab3CYQulxFNZQztE4Usddo ujG0Ne1iW4ZDBERyvxpMhY3wrq0HJbMkelFoUd/XxjMnhtWgT2ssv2r838mHxeoRpcO5 BcHNQWzcL46VFua1fiTzoYgDHgwSJPOv7//lvDkcdoarloOMJ0Tk4a4Bf83k4hbY8eCe r8cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BBaZdwmG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i3-20020a05620a404300b0077f09ac9202si7759962qko.230.2023.12.11.01.15.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:15:06 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BBaZdwmG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcMV-0001SB-LA; Mon, 11 Dec 2023 04: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 1rCcMT-0001RX-OI for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:14:01 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCcMS-0004MH-33 for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:14:01 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3332efd75c9so3883296f8f.2 for ; Mon, 11 Dec 2023 01:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286037; x=1702890837; 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=ZyUUUbIxqiiG4umBh+NSFFGXFuKjw1v2RZdUYXJB6cI=; b=BBaZdwmGvcVsnne6vn9pZ3ooD8i4Yd5SpMVx0dVThqwXAvQZQHMOK2PZRbJd7LSEwB bDZI+WpVvpR1R+UGlx6SU59eNGYnE2xvK/K5tsFLzQGAo4gXGVQvAe+1wdKU4+hZqOtD 2kEYT3hg+n5RphfaGUNFQNpLAiYIuMwMDrBNQfq/p7HV+MoC7FVhDhqXXvb7RcYwK8Dv u81qYvWvVGWFlhRtzfOPN1HVGbtZ9UgFHSUMukPHmXvoTBVGtwLydIt5UqoBUkdLnk4S xYMB1tKTgTTUf+KggIbBach1ZADBVFmIGKqlHehTN+TX0mibr8ejFMpiPTMfgX11kQ7g euwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286037; x=1702890837; 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=ZyUUUbIxqiiG4umBh+NSFFGXFuKjw1v2RZdUYXJB6cI=; b=Kd+Jk0HtR5yVx7mVQ7fqF1xQpHhAYbvhoYaM7YkQwO4UvlzZpN/HSA/4uDoQDpKQw0 Fsfmi3kT8Kqoltr6GSoaR6jthbQDKoKtm+Miax/znyhupYONAov57TYH3mx3qo/KNmyt GeMqeqsSNL+2xPysudMVMrFE4xsBrG8p4OQpaglHYOgKQJj3Y3grndboK4q8xu+tkZXu dimz9eFB4OdHdLAeMkzNaGCw43Sz1wCvPRt+nESa6PxmF+7itmJLgwlfStBjnMLTYj3W IqjQgsGlAv0VucwITvGHsvTfqSPU9K2j6xS/32IIva+B/y6gkFXXDT+6xQ3vja+PIaro hbxQ== X-Gm-Message-State: AOJu0YzExZSlASbD6I5H0IilZ4ZmUCKbCZD0hFeN56eEVOJwp4iHn1TO XrGG7vFVHy+1h3R+5VWhyaz1UQ== X-Received: by 2002:adf:f60f:0:b0:332:dfeb:76ab with SMTP id t15-20020adff60f000000b00332dfeb76abmr997353wrp.60.1702286036736; Mon, 11 Dec 2023 01:13:56 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id b18-20020adfe652000000b003333f5f5fd7sm8073340wrn.31.2023.12.11.01.13.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:13:51 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 14DA15FBF2; Mon, 11 Dec 2023 09:13:47 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 11/16] replay: stop us hanging in rr_wait_io_event Date: Mon, 11 Dec 2023 09:13:40 +0000 Message-Id: <20231211091346.14616-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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 Signed-off-by: Alex Bennée Cc: Pavel Dovgalyuk Reviewed-by: Richard Henderson --- v2 - report failure with replay_sync_error --- include/sysemu/replay.h | 5 +++++ accel/tcg/tcg-accel-ops-rr.c | 2 +- replay/replay.c | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index 08aae5869f..83995ae4bd 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); +/** + * replay_can_wait: check if we should pause for wait-io + */ +bool replay_can_wait(void); + /* Processing clocks and other time sources */ /*! Save the specified clock */ diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index 611932f3c3..825e35b3dc 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; - 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 3ab6360cfa..665dbb34fb 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -449,6 +449,27 @@ void replay_start(void) replay_enable_events(); } +/* + * For none/record the answer is yes. + */ +bool replay_can_wait(void) +{ + if (replay_mode == 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 == 0 && replay_state.has_unread_data) { + return false; + } else { + replay_sync_error("Playback shouldn't have to iowait"); + } + } + return true; +} + + void replay_finish(void) { if (replay_mode == REPLAY_MODE_NONE) { From patchwork Mon Dec 11 09:13:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752518 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1199818wrs; Mon, 11 Dec 2023 01:21:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjQ+9kn8ySF2YoINkBew5rHF9qmzDTK2KIYhimltSH1QacO1n2kO5ExAnZ9166Q5rVc5RA X-Received: by 2002:a05:6214:d6e:b0:67a:4835:f907 with SMTP id 14-20020a0562140d6e00b0067a4835f907mr7702849qvs.21.1702286515207; Mon, 11 Dec 2023 01:21:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286515; cv=none; d=google.com; s=arc-20160816; b=SkyntcREcJIgLkZRLuwvLMOxin5tyFWhIxDV6TFgP8tSZ/+h/S6a01/v/b3r7Z2o4E XZuPzGdP4fuENXrz8yFzruRdewWoTX0TxoswHvDk11Pa9qt7+1w0J/nLuNXi0qOnizu0 tTWefUf0cJHLTs1wwzO3H4MrBXZizUI+b/w13gHv6iMTdXc94uW7PgGRCyhg5YJHWnaD poPDDOXxo6tZ20qajtZP3U63f24MWd3SCsen7UlN9GvY52XP6v5Fs1nXrCo1kZMaUuMV ymeCnL0HpLL19rRnLIsEp5PBt4hez0XlO/cGhELlFvlE/ggZIgIGgIt+MOpwpEPfVX3V HhuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Aqd0pfIovAzzjPlAx4oEmpXI090Lp7qY6On7DWG3S3w=; fh=f1WUYuFnVBAEIncgxZ+HIUkw3mzwzJ7NOR6vwyn/FI0=; b=MOXQB/YJc3hFlEbtOxI2vnZI65EYew0Lg7f/o1bbtxt9/KUILZNdU4Mh2+DuzHv2jH nSKjfRDEMux6RdtP8PPZXrUSd8jTQfh9YesHfsNZrgr7T0by+KXBMtQFyJQCYc4c9z3j KFNtpoY9ZQat+yj/JgZOR2LZdPEANFmxmVn7Z5wNIImpwfj6DNMnDdFOANxPm7rRm2CM oUnXYRhoLwxcchfrPMmmt8RBTUxlyOnxcSbn1gnMExuh6yYRFG+sdFW8I8CIj6BDQWhF jZ2H00ISj6UZ0AKRF/nbo4VB82wm3oXjL3LsbnU+yOme0y2Rgane0zI1CHNZoSEgV1fX 8Zzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UKCmXlgX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id em16-20020ad44f90000000b0067a9ff8b199si7675916qvb.261.2023.12.11.01.21.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:21:55 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UKCmXlgX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcTW-0000Gh-7g; Mon, 11 Dec 2023 04:21:18 -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 1rCcTU-0000GA-E1 for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:16 -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 1rCcTE-0005vK-Qy for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:16 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40c38e292c8so11093495e9.0 for ; Mon, 11 Dec 2023 01:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286457; x=1702891257; 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=Aqd0pfIovAzzjPlAx4oEmpXI090Lp7qY6On7DWG3S3w=; b=UKCmXlgXsAK0g99t71Sm2+ADEWaZvCCg57pdSE+P7pQGOcrhHVgiBG7EAbpRI14Hud k4mEzvx9HYwhDB6U42b5PdQo1Y+jq++/AViXn7YD1qMcbJH/TT2mQyc6jdq2iahXB+D2 xDNHumvNzbwr/CafwDcS3srLGXt7O7wz63dGyyQuePPccglYrW1aHVSIm7p3nOrvWHbP SporDZrAff7E0x0pB/pWa5GEfANY0Ric/ghPuHyIpYbce5p2F4kMNoxckweHlHvTPmTl zG9NjU7gm/uHB56/+OIrt4p0lWIfedigW5KX1Ucb+4mzUp2e49rOnpiYBAwSaBUqA83K aixQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286457; x=1702891257; 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=Aqd0pfIovAzzjPlAx4oEmpXI090Lp7qY6On7DWG3S3w=; b=ALS7IcIlpn/Uv2h9X2OA+cT8+tr3imOl1vWXWhPAokK3Cywe6nng1Nlti2bWvombmX ZOK68rNZ2/OXii4ezXoOlSj0KP4eRFyYvsHDPG+6/zSZw0MZtEiVv2wTYuot/5jdY7VO d9ZQpk71PTe3Y56wzLEWtT7teB38+PiVMjBRflOH6sFhwihiqN/sJdY56pbD4qu3q7Kg XI/35FC65TyPqJ1GqBYRGX4wkfguouGE3rWOwIcl3GHpHPNr8GdwytKDy8VKf3EvUFsm yIqZ58sVoSlREtPckb47sw5G3Re+t6SkeaO5qiLmFhs8tWbHMefl7mck8C636UwX8hXr FXOA== X-Gm-Message-State: AOJu0YyCjjgrcJTYa0i2RXL3r65gvOjICgacpoh6tzc+CKkTo2miev+h MqH1O1krmrsDmkthW0gBo1+LyA== X-Received: by 2002:a05:600c:3d1b:b0:40b:5e56:7b6e with SMTP id bh27-20020a05600c3d1b00b0040b5e567b6emr1926390wmb.183.1702286457498; Mon, 11 Dec 2023 01:20:57 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id o5-20020a05600c510500b0040c1d2c6331sm12343122wms.32.2023.12.11.01.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:20:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2AA165FBD3; Mon, 11 Dec 2023 09:13:47 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= , Pavel Dovgalyuk Subject: [PATCH v2 12/16] chardev: force write all when recording replay logs Date: Mon, 11 Dec 2023 09:13:41 +0000 Message-Id: <20231211091346.14616-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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 Message-Id: <20231205204106.95531-11-alex.bennee@linaro.org> Acked-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - add explicit if REPLAY_MODE_RECORD leg with comment. --- chardev/char.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/chardev/char.c b/chardev/char.c index 996a024c7a..48f28881c2 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; } + if (replay_mode == 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 = true; + } + res = qemu_chr_write_buffer(s, buf, len, &offset, write_all); if (qemu_chr_replay(s) && replay_mode == REPLAY_MODE_RECORD) { From patchwork Mon Dec 11 09:13:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752516 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1199795wrs; Mon, 11 Dec 2023 01:21:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGv7DYJqFVVYL52QxaQDiFAEctk3ETlc5pl34JPpQCsxMUosTew+uwSzwnFzJglb7aaFWTV X-Received: by 2002:a0c:d849:0:b0:67e:b7ce:9668 with SMTP id i9-20020a0cd849000000b0067eb7ce9668mr1863259qvj.23.1702286508347; Mon, 11 Dec 2023 01:21:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286508; cv=none; d=google.com; s=arc-20160816; b=p8QMhcqJPFVpdkZPJPBStrbaEHF3PNKV08ndFxpjAAsFLwfBY6/nMy+AKiZYhGnGVC h6ApmXj/n35+Tzxy41np6SGI3ar2STk+Bs11zuObweFqBYYNIKkjIfCgxfRPwNmbibY0 xwT1eCj4GYOLho42BO/Y2AevqyxnJfO49zwZUdM6/4AgIBhrj/XDUrERKVdNBgytp6FY oV0XaqoV5mYbVENgNX6Ub4y4n2y6c05FbcpP2ltTlQlqbmlW7aprtW1kPXvo8PxgTrN+ rcLAirwrjl4il7okWrXPH5UAg4GszoK4dwTEbM0dLTI/kIr8StXMw9CVOeWnS+B10em7 uiWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=E4pFkSXz9xicXqLvtDSbJYeh1UqesG/1K3uV1P6+ZNM=; fh=f1WUYuFnVBAEIncgxZ+HIUkw3mzwzJ7NOR6vwyn/FI0=; b=T3p6qHU4Z6WjsVLfdqsDI5bN7gcxmE/lneyvFzHBGF2DEDMgbgG4VdAQ/0BhoDthU+ Vy9W2DlUDIR186R4uqFnmoPcy9/El+nLg22ql6nfZf2lG0qoYTE+msCfMcaBIU4hVaeE c/LPIJ8bDe15at5Fd/0RLlh5kCCWoyVdz2Y+37ciHUWjfWOphtuTAorB2Ys1Pwsmzbrw jLep5KQg2L/4BtrbQEPiyaTSo5632DWSLZULEX9laxS/94T1khsvRo0U/gqIFo3YApfT o+bVEU7m8Ws/MGiK442MlsxGpbWf6lTHEUg8BQqgvTIfNT+rT+8EV+M048WuE1Q0VhJB KhOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rQlUDDYq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id qb6-20020ad44706000000b0067a19d399f3si7604839qvb.590.2023.12.11.01.21.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:21:48 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rQlUDDYq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcTO-0000FH-Ee; Mon, 11 Dec 2023 04:21: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 1rCcTL-0000Dq-Ns for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:08 -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 1rCcTE-0005vS-S5 for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:07 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3332efd75c9so3888834f8f.2 for ; Mon, 11 Dec 2023 01:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286459; x=1702891259; 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=E4pFkSXz9xicXqLvtDSbJYeh1UqesG/1K3uV1P6+ZNM=; b=rQlUDDYqwW055fGeROZzlDQ+CM1anTQhjIH89698QMmKMj+nIW8gwRF8LjQSPws/iU NeoVq7MsWrj7AjGiIQXJCp3fRojkLWPLmCe6+qL/5EEthbpvT0+WOe21JzHMmZPjkDWa QiTPDJn23qm5VwdZlD6Ul3VTRK2BXLTVoTTAq3J2EEux8KA0YDuWWal02IPWu3horx+L D/YWAgj3OSEWyLEk/Tnc0k+o5TizNbra0S1HIJagAS74mr9rVk7P/1LJF4SC5dTRkzdE VIz4wB5Pm0077aegCZwOPhAjH6JOXSFRYtXsYCJr2pPWj0A7hiRHrDiQO/Dj4U7yoWjW je4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286459; x=1702891259; 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=E4pFkSXz9xicXqLvtDSbJYeh1UqesG/1K3uV1P6+ZNM=; b=N1slzirxBj0RpzdCYl0wFyNnhxrnh8RK6M83Rzul7VUH4Wi2sNGcujze02y7eF6anV MS6D4B+aRbXsyzSzeftblhsFYbhZ97nW08EMnsuDWtI1Dpwo0rTY6YFiVQinVus1diVG R/AnQlp9MBTaf1fjUBK6Mzt45vApmn8p6D3xek6X6YOWgZev/OrgrojTTxtC4+tF5PhL 9yXOSC+oPNUHj3U2VOZ0IsFCFzhhMFMeeGHM9UmM2yY98ujR3zuUNrV2qyG2xS4Mhzh9 +QxlckYWvrIKkwaB1URWp5n4TtA2Ps6j/AbnE/zh+9Jp9eb1p4FungAMuhnw6BCaJalJ et8g== X-Gm-Message-State: AOJu0Yw1Ge2r46jimKYIMoxQH2HHXmMgIvEsX7MYGWD5MfPYS4hMWLBK YiDF9/xb34uTq/k1SS6n3pdXaQ== X-Received: by 2002:a05:6000:906:b0:333:92b:5f51 with SMTP id cw6-20020a056000090600b00333092b5f51mr845164wrb.70.1702286459122; Mon, 11 Dec 2023 01:20:59 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l19-20020a5d5273000000b0033331f83907sm8074954wrc.65.2023.12.11.01.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:20:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 4210E5FBF4; Mon, 11 Dec 2023 09:13:47 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= , Pavel Dovgalyuk Subject: [PATCH v2 13/16] tests/avocado: remove skips from replay_kernel Date: Mon, 11 Dec 2023 09:13:42 +0000 Message-Id: <20231211091346.14616-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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. Message-Id: <20231205204106.95531-12-alex.bennee@linaro.org> Acked-by: Pavel Dovgalyuk Signed-off-by: Alex Bennée --- v2 - also drop flaky tags --- tests/avocado/replay_kernel.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py index 1eaa36444c..6fdcbd6ac3 100644 --- a/tests/avocado/replay_kernel.py +++ b/tests/avocado/replay_kernel.py @@ -98,13 +98,10 @@ def test_i386_pc(self): self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5) - # See https://gitlab.com/qemu-project/qemu/-/issues/2010 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test sometimes gets stuck') def test_x86_64_pc(self): """ :avocado: tags=arch:x86_64 :avocado: tags=machine:pc - :avocado: tags=flaky """ kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora' '/linux/releases/29/Everything/x86_64/os/images/pxeboot' @@ -135,8 +132,6 @@ def test_mips_malta(self): self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5) - # See https://gitlab.com/qemu-project/qemu/-/issues/2013 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') 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): :avocado: tags=arch:mips64el :avocado: tags=machine:malta - :avocado: tags=flaky """ deb_url = ('http://snapshot.debian.org/archive/debian/' '20130217T032700Z/pool/main/l/linux-2.6/' @@ -200,13 +194,10 @@ def test_arm_virt(self): self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1) - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_arm_cubieboard_initrd(self): """ :avocado: tags=arch:arm :avocado: tags=machine:cubieboard - :avocado: tags=flaky """ deb_url = ('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 = self.fetch_asset(tar_url, asset_hash=tar_hash) self.do_test_advcal_2018(file_path, 'sanity-clause.elf') - @skip("Test currently broken") # Console stuck as of 5.2-rc1 def test_microblaze_s3adsp1800(self): """ :avocado: tags=arch:microblaze @@ -389,7 +379,6 @@ def test_or1k_sim(self): file_path = self.fetch_asset(tar_url, asset_hash=tar_hash) self.do_test_advcal_2018(file_path, 'vmlinux') - @skip("nios2 emulation is buggy under record/replay") def test_nios2_10m50(self): """ :avocado: tags=arch:nios2 From patchwork Mon Dec 11 09:13:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752519 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1199937wrs; Mon, 11 Dec 2023 01:22:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8WDhM7rxz8DxCboTv34Zyb2slzi3u2CUzAZhH9zuaR89VvbyFwIqE+dQln9i5y+FZk5zK X-Received: by 2002:a5b:7d0:0:b0:dbc:50df:b9bd with SMTP id t16-20020a5b07d0000000b00dbc50dfb9bdmr1962567ybq.51.1702286535061; Mon, 11 Dec 2023 01:22:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286535; cv=none; d=google.com; s=arc-20160816; b=dE0o7pYZLHhevFT+UgRND80UACPzvagLdqKPiSkKSlJs1ftHaGholZ49tjTTxtfcp0 eRgei9K2QZi46CtFDgWJQAOqoovSHJrdhaf3fGFNKWIxr/KwY+FGlAcmc/9s4Sm5LRVo UzHCXaMIcfJJ+oqi4Vk/+2hNS2WzSLMehRAmPWsQekZN9AqYlsrhd7fsYySn7hOwYXq+ VPzsQPH7bTfp0NU4z+KUM/mgLkgFDLxOJVN6I7ilciWDFf8xsk7wQgOOBIzAs1BmkhOw G6vntOQfRzR02EL+cMeGj+gXRW7JnJMIb260T8YUKvlR8Sy27S6sEnNAjSmt7s77EOq9 oWNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mSr3GvPnKq8aUa4IaKiJbjvKp2+Gjt/QBooUG8s8u+M=; fh=5P/wIgpI0FmPL++m2PNNQNTrejW6t3h7Ix4gz+ehGxw=; b=PgnZgShPdgSl2MoAkybkpkztEAF1vNyK/WlZ/lUVQKAioFNLx3ZDPLFThk0Wrdaf5b fvB+rV4+7JHt5JmRDnzjgCjPQOJQcAkKLGWpVu5rgBcU1dtqYxPoTxN7DvDDiyZCxZ6J eBB1qPBuQ5YZbtjS5k3RQMAW6fpdKlcwMxR6jxvYuHwgRFedGBk+p1o/QVGWiUvDTWqa Tw1AR5AhEkVAMc8lGz8WvkiLJr9KgAlYb2gcn8oRZJSTot9njpDqwXMvZA0O5pb7vlys 9tKzLJ2IE7PXJNWdTdNiGAqvz9Wqw7yIfWLknyOFHOYHDteAcU6otTTk3PXVDN/o1Ki5 PBDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xS2jIeZ0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s21-20020a05620a29d500b0077f037924e1si8033087qkp.689.2023.12.11.01.22.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:22:15 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xS2jIeZ0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcTI-0000CW-HM; Mon, 11 Dec 2023 04:21: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 1rCcTG-0000C8-PP for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:03 -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 1rCcTE-0005vH-DF for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:02 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40c38e292c8so11093435e9.0 for ; Mon, 11 Dec 2023 01:20:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286457; x=1702891257; 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=mSr3GvPnKq8aUa4IaKiJbjvKp2+Gjt/QBooUG8s8u+M=; b=xS2jIeZ0ahmKMgrtLAcBPxhDieYM6PBFQ3EeeJ4c4xWyYorUd9SEH/9X3Tw2Cr1cY6 0chJuhXDj5v2jX1k8zXYIl0BM8qScaxoRSk9f1RgaHobrBfkCtF0guVHk+U62hwElqAU CYfApFhYBV3iAgaxUNpqaKyM8wQf9aQkwAPu6dkXScWJgLG3OvbHuU3eWoQU/RkaAUKa 2uitxPfWehJn9l/G2OxhTdUSB8KbdUWXF2bd4UTzWCfrCrkKoQozIlcx8fMar5N6h/y9 C2AkZWdUZDpPl9vecjRB5sQDcDYLBxSSMbJwkKBd7M9N1YYV0tToSFRKe174NrhXyMxX pmmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286457; x=1702891257; 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=mSr3GvPnKq8aUa4IaKiJbjvKp2+Gjt/QBooUG8s8u+M=; b=Y8rrIYAAIjqrhCNQYWuVaeqgUp4QfVuWd0srqY3UZ63LlSXET0fxNswrpSsINfeKX5 jXNtDTahO81TlMdOXrxCiUpgF9WGKazZlAzdf8VY1cNs4utpU0HMBIAqAWZrSREfvmLh 3u2LVEvRwibO2yhw6iSmwfKqFQ9OhQAuXa98f7t36fQLa5OT5ha/qJSkutwUXR0PR5Xz X79bKQOMDWTwMEOiL9STz14wX9VpT9y9ds04Fz9zp+QB4Al9xHYlawJdW4R6NhSDh/17 MzERybRIkKgpMt1q095eezwuXZR//1UYqc3HnoNj4JYMxg+dNQijUOSBkUMLE58gHOMN QTPA== X-Gm-Message-State: AOJu0YwVAcNchEdH7di7URh+sMyNtkqcAbKWaAwfeanqAjOl4S5ur8jo 4/4FOQOWHc3UcMDUx3HP2KNpHg== X-Received: by 2002:a05:600c:1819:b0:40b:5e4a:2367 with SMTP id n25-20020a05600c181900b0040b5e4a2367mr368882wmp.105.1702286457098; Mon, 11 Dec 2023 01:20:57 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p1-20020a05600c1d8100b0040b47c69d08sm14638319wms.18.2023.12.11.01.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:20:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 55D7A5FBF6; Mon, 11 Dec 2023 09:13:47 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 14/16] accel/tcg: define tlb_fill as a trace point Date: Mon, 11 Dec 2023 09:13:43 +0000 Message-Id: <20231211091346.14616-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While we do have a bunch of debugging we can turn on in cputlb there is an argument for making tlb_fill a generally available trace point. Any fault (via probe or access) will have to be preceded by a tlb_fill for the address in question. We don't bother logging the return address as that will be a host address associated with translation and therefor can move around with ASLR. In my particular case I'm trying to track down a difference in memory fault exception patterns between record and replay phases. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/tcg/cputlb.c | 2 ++ accel/tcg/trace-events | 1 + 2 files changed, 3 insertions(+) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index db3f93fda9..c35df27caf 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1308,6 +1308,8 @@ static void tlb_fill(CPUState *cpu, vaddr addr, int size, { bool ok; + trace_tlb_fill(addr, size, access_type, mmu_idx); + /* * This is not a probe, so only valid return is success; failure * should result in exception + longjmp to the cpu loop. diff --git a/accel/tcg/trace-events b/accel/tcg/trace-events index 4e9b450520..31dda01c12 100644 --- a/accel/tcg/trace-events +++ b/accel/tcg/trace-events @@ -9,6 +9,7 @@ exec_tb_exit(void *last_tb, unsigned int flags) "tb:%p flags=0x%x" # cputlb.c memory_notdirty_write_access(uint64_t vaddr, uint64_t ram_addr, unsigned size) "0x%" PRIx64 " ram_addr 0x%" PRIx64 " size %u" memory_notdirty_set_dirty(uint64_t vaddr) "0x%" PRIx64 +tlb_fill(uint64_t vaddr, int size, int access_type, int mmu_idx) "0x%" PRIx64 "/%d %d %d" # translate-all.c translate_block(void *tb, uintptr_t pc, const void *tb_code) "tb:%p, pc:0x%"PRIxPTR", tb_code:%p" From patchwork Mon Dec 11 09:13:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752515 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1199694wrs; Mon, 11 Dec 2023 01:21:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9ZmBqxNdiMW2/FRzhzvMBNAD+jZAYZ31+tFN2Id5nBvLDl5V62Fs19b8g1yR+R2gfpf1m X-Received: by 2002:a81:5253:0:b0:5de:9066:1bd1 with SMTP id g80-20020a815253000000b005de90661bd1mr3305211ywb.69.1702286487797; Mon, 11 Dec 2023 01:21:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286487; cv=none; d=google.com; s=arc-20160816; b=hf+IQXeBV3bgfJno+EUqyO7S6bbOSO/hVfNRc+3QgqU5tRbZJ2wkm0/nSz+MSV3EC9 mpOfGAAWogZ3Xf4Gtvg/oggA6dcba2KKTWUmfoVHzuslHCUqzmbR7Uiz4MEXmS7/aS8Z HWbRlOwsAwNTnBSOXJEJif8YcOSobqhwmxc8MEretrCLzbwcciNR0dZZ1PHNgNXWoDBZ KHbqlu9PE+2NqWU84ybHc9HwojHZiKtlrLnChL1JTg7YCfA5Y3pCF9WbvbY4v6Ff0VbT hKKUTVmvmuof805L096QQ0EIg5cW7QIq3ouUiDNrleV90uShDOnfuRwcxsz/JE7Jj3bt hjAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZD5ABaQViFbHONtQO6M9d3Q2YykqwBMH8lb8WaRZX4k=; fh=5P/wIgpI0FmPL++m2PNNQNTrejW6t3h7Ix4gz+ehGxw=; b=G2RtT2HPwMLH3dmYzvQgHzOUOV+AYjfrCPCM6I263LlehVZYhFSfre/UAw1vkQTxom 6Z/FOXxVLq283sDDp9GDc/xRo9t2Q/cjnQ9X42EJ9iGpEu2ClpY/fD2L1rqqMWYgkrNN g6kz+iVLH+Xx/TAvX07D27UhqDjGOFQ5e52OI2nvzwfq+D8cXh/DMbTplPH38tcaCR/s bOV8RjWfQJi0R38LvOkBlQlyiHEoxt2rrC7vp+fNuhWzH40bexWuTCr+6adwDU++xx3h SJlmoQlC10Di47W3RegMv8RUJ7irrm/gYjWyfuL/WOJ5LSsj6vvLiaLxrpUSu3E4RfoM GrrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jo6bf3pD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id cx11-20020a056214188b00b0067a9a386788si7918320qvb.338.2023.12.11.01.21.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:21:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jo6bf3pD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcTK-0000DX-TG; Mon, 11 Dec 2023 04:21: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 1rCcTI-0000CO-2z for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:04 -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 1rCcTF-0005vX-4R for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:03 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3332f1512e8so4010551f8f.2 for ; Mon, 11 Dec 2023 01:21:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286459; x=1702891259; 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=ZD5ABaQViFbHONtQO6M9d3Q2YykqwBMH8lb8WaRZX4k=; b=jo6bf3pD2C2c/A6G+jnpG6QujJdX+prBT381+gl93tQFLUaJFS5bB21/MRK6nu+9RS EcIJIjiYF62xsz48ZsVdL9yAHJRoObmrAkBwJrIqFXRNdX0Nzk/CJMeuBcdiaoyZEJwf CzDjjVuUQ2wFm+dVSsa8evzhBCJRRRJs8CokUo4h3TsNa2IbxrBofro7A5P5RjBP38b7 SRn33tmvbavCarkmJhikBMnKLFsmYzO1BR3ksf8yf0Dd/Bzv0Nfr4nBJtmsA7xRe1D7P ta4CQFA5+xLBJ41neEjfRbYckmRQV8+TaBaLG1/XuhCRIZv1fhS1SIyIsGTZBmqsNw2n AtbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286459; x=1702891259; 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=ZD5ABaQViFbHONtQO6M9d3Q2YykqwBMH8lb8WaRZX4k=; b=cNyMkNJRtXP5l72qFHytiXTliQwzywpYb8+z2lOH6aPQgrs1G3EZO5XO9cbHAUoIth xH9Io0+10/RghsDQoV9G5Db0te0QnyJyhEjxXBmb8r7C/tArFk6Oc+1+DkKDRUJP4oYt 8hL0AA9Fr3/+ALd7yipGlMsc4GPeX9WfE/YHud5EVYQm489I+E9lNaGXngVyps6waHg4 MIAG6X3naXBJlVHbE4w3GXYVa1ISSWo9hHgq77MD0HL40Eli/l+qpiSojk4KyhEBUqnd WNX912/pGhOWvEL0I2OltfgDNcPUJM8ZT/qpBt6ul7Zy6CzKFLFPEvUx5spa6j2atLJ5 nixA== X-Gm-Message-State: AOJu0Yzu5ZULPnbnb9YZsUS1SsL7HZ1qQDd6mz1ijEozWIOOvcZ9vRk0 P+gkxfa/y7UUbz616Z5C27kV0A== X-Received: by 2002:a1c:7417:0:b0:40b:5e59:e9ea with SMTP id p23-20020a1c7417000000b0040b5e59e9eamr1966848wmc.137.1702286459320; Mon, 11 Dec 2023 01:20:59 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id c15-20020adfe74f000000b0033335644478sm8081493wrn.114.2023.12.11.01.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:20:57 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6A3EC5FBF8; Mon, 11 Dec 2023 09:13:47 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 15/16] accel/tcg: add trace_tlb_resize trace point Date: Mon, 11 Dec 2023 09:13:44 +0000 Message-Id: <20231211091346.14616-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org I wondered if the discrepancy I was seeing in fill patterns was due to some sort of non-deterministic resize being triggered. In theory we could resize away at any point which might account for the difference. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/tcg/cputlb.c | 2 ++ accel/tcg/trace-events | 1 + 2 files changed, 3 insertions(+) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index c35df27caf..63f2a23709 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -201,6 +201,8 @@ static void tlb_mmu_resize_locked(CPUTLBDesc *desc, CPUTLBDescFast *fast, return; } + trace_tlb_resize(old_size, new_size); + g_free(fast->table); g_free(desc->fulltlb); diff --git a/accel/tcg/trace-events b/accel/tcg/trace-events index 31dda01c12..11b49a63f1 100644 --- a/accel/tcg/trace-events +++ b/accel/tcg/trace-events @@ -10,6 +10,7 @@ exec_tb_exit(void *last_tb, unsigned int flags) "tb:%p flags=0x%x" memory_notdirty_write_access(uint64_t vaddr, uint64_t ram_addr, unsigned size) "0x%" PRIx64 " ram_addr 0x%" PRIx64 " size %u" memory_notdirty_set_dirty(uint64_t vaddr) "0x%" PRIx64 tlb_fill(uint64_t vaddr, int size, int access_type, int mmu_idx) "0x%" PRIx64 "/%d %d %d" +tlb_resize(size_t old, size_t new) "%zu -> %zu" # translate-all.c translate_block(void *tb, uintptr_t pc, const void *tb_code) "tb:%p, pc:0x%"PRIxPTR", tb_code:%p" From patchwork Mon Dec 11 09:13:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 752517 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1199802wrs; Mon, 11 Dec 2023 01:21:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiXCu9djjS2f8YTDnezFQ6XwUGq90/uZPXlWb9GaTSjF+UhQ6dNk5pzIOo2IINHUcuTUYO X-Received: by 2002:a0c:d844:0:b0:67a:cb1a:ad63 with SMTP id i4-20020a0cd844000000b0067acb1aad63mr3949448qvj.16.1702286509647; Mon, 11 Dec 2023 01:21:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702286509; cv=none; d=google.com; s=arc-20160816; b=q5E7DbgLSWo+B/KVYiiH0p25c9LcFtZfTsAJEN3rU/39nFPO+vLEkGG6OJt2fjFWgo 34Ss2jPYh3+RUqFiBL8TOg+HyWtTjy3HQ33Peg7rRhIBcDkvhxSdrUWvXevfD1Aho6Ux PP0vJI15lOROZT1IwdT82djwRoexLq4s3HCdId7CU8a6+0BRCFfsk93kNN2Q18CATP0G +eim3IUe6KSlKAMNo0SmYXWxYj18qey9TYsFaqDmvXEqj7RDWStT1XA/Wz17ac/zETA0 E1tCQ851sTVRdHO58zxGUHpKxcFQkhBAQ71ZAwUluZZx4DPPXrzPQNwa20O88BpnpZgf cw7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=djPxrJrlceejDSikdH1s/unMablwdP1SJY1GE8A/HP8=; fh=5P/wIgpI0FmPL++m2PNNQNTrejW6t3h7Ix4gz+ehGxw=; b=MRFxTQrVl139/oeX74BmEfcN0zDlOKVRdJXTmoNewgsauJ2ENqfDMFxiwBMtGDJOhO T9A7Pa0ja6VkdWsNB1kCxk3OqGfHavw+h50jWkacsERWxGZYlX+LqdKrObvD5ZckqkOC 2IijMA2da7dzpzTMZh0+k2SXu0l/BSL5OvBNVIfnNAu6rGNAqXENKY//1W4hDEJYZgz8 TkOUO3cmJ0Fkq7GEj/be873loGG1r3L9QlOeiA2RZuOdvnEmCnHqnPIPz7FpYWOaNQxE ZxgyRVE+zIDN83FwhBUAwWIyXKcy9eGHpxPsGV81DMqhcwXv0Xk7sUZnrqwpWtGZThzc G8kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ESWnbTPT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ml2-20020a056214584200b0067abe0ce0d7si8048498qvb.587.2023.12.11.01.21.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Dec 2023 01:21:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ESWnbTPT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCcTL-0000Dh-Id; Mon, 11 Dec 2023 04:21:07 -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 1rCcTJ-0000Cm-Cz for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:05 -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 1rCcTE-0005vI-Ci for qemu-devel@nongnu.org; Mon, 11 Dec 2023 04:21:05 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-336223afe64so521725f8f.0 for ; Mon, 11 Dec 2023 01:20:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702286457; x=1702891257; 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=djPxrJrlceejDSikdH1s/unMablwdP1SJY1GE8A/HP8=; b=ESWnbTPTA/e3HA0NImMaifftJdpRargnNUqzIDKrgCawsaCiWdgA8lq+vqc7zR2kG6 uJOyE5w2oMJr/Cl8HWRQDrCZDhUd/U+wc31jZhtS9V8kfg2/JMEVEJeQGsNMinENnyNr HcXHnj8gnIdF/WH/PkWIn7WSw7nS1sXgn8QKYJeWs+lIkCj8dmRG/OEftnE2gzvdElSN ZxeiXsciZrm1qOqZ08iKlMJ24wjOtJKz34kGhNrxdhT/gTq/khchVtrlE7MX8/cAUMJl HVwCIYrXChwoNlhLad7Mw+1AZ/Nj8192g0lpN/C4tXXxJrAdzSxY8MIvKhknE8cQM/Lb oBGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702286457; x=1702891257; 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=djPxrJrlceejDSikdH1s/unMablwdP1SJY1GE8A/HP8=; b=TonNVePWKy4E2vQKeuQW4EW3eYOfVlA9l9Tf+ThaCMauSpNRQ6Alloo8etOKeT1gSR 2hQxwfWSxkvjHcdQ2UvYo6fP/WAvEu+8aya6EZ4ZMIUEeOwtbgGhx/0nB1kjZsUyKIcC hZxBheALdKA7t1eA4JmFobJmHEDGvWT4CWJPMWV2PSwPruLgqYoYeR/FG+l6zgvVX/Xi Fo+EwnVTOYtgxx6m6Z7jHFMRAc77kuFKFg8T4SDQt3DvBIQ1gup1wFZ+LiVaqp30L8X6 jATiAD6VC6ixY9h9PM1NC2uWj0wTn+hBlTX5Y75ATj9pmUuKoG5VRKG5IjzklsWjFA++ Rzww== X-Gm-Message-State: AOJu0YzdIU/VhzsOs5GU1T91y9vDQxTqdqMaCiqzOl0f6EptwQBIuDq/ EvcPgJCsUGJgXFHAipwqTwV69w== X-Received: by 2002:a05:6000:110a:b0:333:5258:68ef with SMTP id z10-20020a056000110a00b00333525868efmr2461607wrw.68.1702286457301; Mon, 11 Dec 2023 01:20:57 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id o13-20020a5d670d000000b00334b35754bdsm8087864wru.24.2023.12.11.01.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 01:20:56 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 7D44C5FBFA; Mon, 11 Dec 2023 09:13:47 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: John Snow , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paolo Bonzini , Wainer dos Santos Moschetta , Cleber Rosa , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Beraldo Leal , Richard Henderson , Pavel Dovgalyuk , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 16/16] replay: report sync error when no exception in log (!DEBUG INVESTIGATION) Date: Mon, 11 Dec 2023 09:13:45 +0000 Message-Id: <20231211091346.14616-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211091346.14616-1-alex.bennee@linaro.org> References: <20231211091346.14616-1-alex.bennee@linaro.org> MIME-Version: 1.0 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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org If replay_exception returns false we can only trigger an exit from the main loop and hope something unwinds to something we can process. This seems to be the point where execution diverges in the replay_linux tests case. DISCUSSION: Maybe this should be tightened up to check the remaining instruction count? Signed-off-by: Alex Bennée --- replay/replay.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/replay/replay.c b/replay/replay.c index 665dbb34fb..d283c1353d 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -209,11 +209,12 @@ bool replay_exception(void) return true; } else if (replay_mode == REPLAY_MODE_PLAY) { g_assert(replay_mutex_locked()); - bool res = replay_has_exception(); - if (res) { + if (replay_has_exception()) { replay_finish_event(); + return true; + } else { + replay_sync_error("Exception not in log"); } - return res; } return true;