From nobody Wed Nov 27 02:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701808976; cv=none; d=zohomail.com; s=zohoarc; b=IduN9MSRVHO01KtgOiUvJhp1/ijFNCsSK/Lokk6BMdsqCLzBzp9cga84vBqyxirae0lNegYWr2un2ChTeaJ1vZRAkYvtc78gzurUes1A2Y6COcHyEWgdxoK3wJdTiMw+SHbSCzEKL2dUFUkVEOhwmnQwuufNk293qxN0Capr1o4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701808976; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dc4DC6j7/1Sz+Ur/zdr+xWcs+c/Czka+caIepOUIoFE=; b=aTIqjQR48CQ/X+d4fYPigXsJ9hmiFhAo/K8nlu7p6/fWW1w8DWjVn6V+g1EC1+UVkU0srebdI7TNG75PLFtsPaHQCR7MCMs7rUQAnW5RBoRe+TEpnJSB5lk4arjk/kKGjYgwc9rJEz8uI2mkVGKyaeEG4enDEemC5Du9VEjd4po= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701808976388418.99661965159464; Tue, 5 Dec 2023 12:42:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcEC-0007Nx-2B; Tue, 05 Dec 2023 15:41:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAcEA-0007NF-5o for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:10 -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 1rAcE8-0002E3-CL for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:09 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-33349b3f99aso76837f8f.0 for ; Tue, 05 Dec 2023 12:41:07 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j1-20020a5d5641000000b0033349de2622sm6333379wrw.94.2023.12.05.12.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:06 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2678D5FBB8; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808867; x=1702413667; 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=dc4DC6j7/1Sz+Ur/zdr+xWcs+c/Czka+caIepOUIoFE=; b=qoifM3vmWlx6eNJ0e5Ix//uFhEquDcc42gmLS+7MU4COBOVWT0fC2InFmOLTdbU+uq Iagmrd/i12vuBrWL+5kDYT1mSw/kRlU/Pm+8SW6etWvMFwDpvvSn2S4es9obCFw6wXIL 8F1VfVG9C3yaPEwvUyCQmlJS7qD0wKwONErSvnJQobN8wfUpTdVu4SooasboOL43QsX1 gxuZoeVA5vGxRL06uQ4ncggvYNjkcFPYg6Pyse2OZpmyoYrMKH9Kblk9J0aq8d8vX2ZX LuTBJeXgx1TIvikTwJqg6rUmgxL6OdtVFGCjHaKjb7lRoNHFA7aXOkzieOipcIap7sdo DOQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808867; x=1702413667; 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=dc4DC6j7/1Sz+Ur/zdr+xWcs+c/Czka+caIepOUIoFE=; b=t9zU2Bja1dQok1HMOCNKSZv0qN8/8r6ncFuDL47PP8XhxuWnphju571YnjJ3qDrQFo UPQoqPv2rxLFw+e6UmyexZW2eEeNSyno20N0eapoI+3w7BMMSpF9qCTr9Nv1YOQ6ROag 8JjptMFw6SILSBSa9SFfj4T3YBXgunh4Ji9XwF/fre6uCpwXzTC8tb8g9QAu/e2RT81q nWl5ZOk3d4+qs2QTTajP09GYDS2VVNH/jzx4wOql1+FOvM6XjZzidfvHGFCi4xZ1YjRM SAiTqV9b0DrKr0DkLvePN33W92y0auvE+huJ78+KPfq7OCnweWIKKQ45Hk+VTT8EnaeR HzSg== X-Gm-Message-State: AOJu0YzFjMgSbloRv/rnyOWDu99XC4wB4kCPzPEtBB5nc+diV39ptgSu M3oZ/ec1UtNdBJPQswPhoJDBtg== X-Google-Smtp-Source: AGHT+IE+ViipkQvP/0pMQKe5dVUxH/76MrbYk2OLv9z+zJ7LQLRa8zzrMuBjy9kY9OPoAQL4MRF9qg== X-Received: by 2002:a5d:67c6:0:b0:333:3cf1:cb84 with SMTP id n6-20020a5d67c6000000b003333cf1cb84mr3314839wrw.139.1701808866828; Tue, 05 Dec 2023 12:41:06 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 01/11] tests/avocado: add a simple i386 replay kernel test Date: Tue, 5 Dec 2023 20:40:56 +0000 Message-Id: <20231205204106.95531-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701808978717100001 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. Signed-off-by: Alex Benn=C3=A9e Acked-by: Pavel Dovgalyuk Acked-by: Richard Henderson --- 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, conso= le_pattern, =20 class ReplayKernelNormal(ReplayKernelBase): =20 + def test_i386_pc(self): + """ + :avocado: tags=3Darch:i386 + :avocado: tags=3Dmachine:pc + """ + kernel_url =3D ('https://storage.tuxboot.com/20230331/i386/bzImage= ') + kernel_hash =3D 'a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb8= 6e277f1b76ed956' + kernel_path =3D self.fetch_asset(kernel_url, + asset_hash=3Dkernel_hash, + algorithm =3D "sha256") + + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' + console_pattern =3D 'VFS: Cannot open root device' + + self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) + # See https://gitlab.com/qemu-project/qemu/-/issues/2010 @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test sometimes gets s= tuck') def test_x86_64_pc(self): --=20 2.39.2 From nobody Wed Nov 27 02:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701808973; cv=none; d=zohomail.com; s=zohoarc; b=C8IP6Wxn4sKRg//lf0Zgv0gfa1BGZRMLfHPcXnb8/piP8MoVGaKz4rxxu3MNDkKHkt7rUTDSVm3uBhvelC+5McTgmKMuhqUNenye593SKezSIlKYUrXRyWNTSX6baiVncdhUs88GOBza1TkLooc5nGUubo91nNTLkszI/TSjLf0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701808973; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=HnFX18BuXkPwEMWcuTq2Q3z2S7wJ2zXOceAR+u2p7TE=; b=FEV+GlAZMv/uGIvNDVDqw7og3+W1h6qRkdvfcETLQonpWBCw5XfQHF1xO8/RfQpL5aCJJnqLXQgUOJkrTX5wkvebGtkaSg2Ly3cqMooGCaakxFcnAmQNAgbYxR20X2zweh+qQMHNgPkOHB9Xl2XCe0NwwcvZvbZxGQM4I5WJLyo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701808973883921.2351685333814; Tue, 5 Dec 2023 12:42:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcED-0007P0-PA; Tue, 05 Dec 2023 15:41:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAcEC-0007O7-6r for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:12 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rAcEA-0002EQ-K9 for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:11 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40c09dfa03cso31556255e9.2 for ; Tue, 05 Dec 2023 12:41:10 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id p11-20020a05600c358b00b0040b360cc65csm19806102wmq.0.2023.12.05.12.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:06 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 380EA5FBBA; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808869; x=1702413669; 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=HnFX18BuXkPwEMWcuTq2Q3z2S7wJ2zXOceAR+u2p7TE=; b=C/zvzn2z68MiVokrTzVTcNKkYTYNW/laIB6VRsVmB5klgvMZGnr2UKyZ9KGxLME3ly 38SRMyU1WsRVQ/d+kODZJ4lqC/T++qFwBgFCw1LNelboQWnOLgC+U8WxuaWWPB/2JJfQ Ye9CQYZ2mo7fSHcZGN5qiLDr/by7/RJ3jAxiPwB6AWrZ9n7a4lyKbZRqmliGTXgx+geG Fy2oExp775UNMYwSevFpGWyzElvuyndSsjCqzEMnybz5Al2huwZb18Z5MfUM7EXGL/N7 13sHWYW8eY3UcG/GmfNL/5EWP6nCvtZAeS45t9NJJmE3gKRaGmMPbyPuXFZpoxgW/m/x ZTOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808869; x=1702413669; 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=HnFX18BuXkPwEMWcuTq2Q3z2S7wJ2zXOceAR+u2p7TE=; b=f0J7b32a5DdzCp2fUDGPnACfHR8xTQ1HM2NiPfMXUxAoG3xoyDbBvWeEWUGx0AezY+ 22X0n8nBZXsgkxAIe2stjn8UQxyBiIB09991A1U9zIOUoKimuk/DvR36FoBqXfJlS5YV RptQLwrVHDiyUSUgdAiaWsevm7Ov61bp/Cn/FhgVH1TYSFRuB851dlXlf+DN6QbAC6oP xl5GVd4M+8d+izEgP/c5lAAlJ+PbMf2PUIW3drbKTLHhj30EAxzNN1w4p4+5Af5bKF+H qGlUAl9wczfAAhYBZKBR09g3iEoZELwdQ+tJpLXFC1xIv9Ssx5622shHlJQPCtmEmjku SKIQ== X-Gm-Message-State: AOJu0YyOHKGp9dLig0zV2lU+CVISF9y/nNT4LXtQ5ukRnGdYG0l6EG0/ 6dxI5dm+Bkyz4VwpX2LzylXEjQ== X-Google-Smtp-Source: AGHT+IFJpklvP6g04jJJpb+7+0Oj5B0xCde8nfpqjWCZ/RUUzBniFVUXHJxtFRU3W5onv6ha3ANRUw== X-Received: by 2002:a05:600c:190d:b0:40c:ddd:5758 with SMTP id j13-20020a05600c190d00b0040c0ddd5758mr1018069wmq.12.1701808869333; Tue, 05 Dec 2023 12:41:09 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 02/11] tests/avocado: fix typo in replay_linux Date: Tue, 5 Dec 2023 20:40:57 +0000 Message-Id: <20231205204106.95531-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701808974700100003 Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- 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 =3D time.time() - start_time logger.info('elapsed time %.2f sec' % elapsed) return elapsed --=20 2.39.2 From nobody Wed Nov 27 02:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701808986; cv=none; d=zohomail.com; s=zohoarc; b=jxHgoDZLCOnR/RTrlHgAVvaERfoEbLkji13WBx1FFkb05+93+pDdT6kSXGSOIz1A9IDimEefBSee27Hf/32iXYM+SQ97rdmGlxi9b+eVO4dbJTmbl/FVSk0NdagH9gb3Ye/VIVlvnIjVjzQrbbFO8FDmrI+okot051hVI8BZWls= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701808986; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bOmchX4uNJ3czMjsDLMZ3je7KxzFjicIJgluCE6g86g=; b=Q/1oz+UdKolreJTdPtlR7mhqvLRnVy4uQF52CrE9igl4LlKmLON/u9oj/qseo+BwrJnhpsO+EyOH36zwC2Cp4M/z4U/mDIhuNjnBxIyC/b5Rw8s3diWUBrFIVTNuywlIvkyAOVjMJPlg5d8wVCXIMVoL4K/xqKtkU6MCYGcWLLA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701808986159967.4602241255841; Tue, 5 Dec 2023 12:43:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcED-0007OT-I0; Tue, 05 Dec 2023 15:41:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAcEB-0007Np-Ou for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:11 -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 1rAcE8-0002E6-FJ for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:11 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40a4848c6e1so65989785e9.1 for ; Tue, 05 Dec 2023 12:41:08 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d13-20020a05600c34cd00b0040b540ff0a5sm19913400wmq.19.2023.12.05.12.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:06 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 49C4B5FBBD; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808867; x=1702413667; 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=bOmchX4uNJ3czMjsDLMZ3je7KxzFjicIJgluCE6g86g=; b=soLzwRrME1j0yKYKYsimtYQGAIBOzcwBVvflKgL6JW1VQ58/oy3aCxD38/mVSPG/sb sznfyRW8sYwT/xBhDH5Y5wRzT266iX8sdnRDJBURrnXYiglRKHPnOQnyLMHxz0SpLhy0 li2t+iEQ6Wx/9B0PrvBd6bcaUBLx3ghz+98DGBYxv3Tme5cnUYz3uugbG/dyKoREIOcB Azl6/N2n9Fp3+x7GI7XnPEpIr7wL/Q1WtZqdJ2P1cOgw5aziUis6SakF0aW8d4LkPu8X 2R/2e3iuRdwXWLag9dH1+pzdSqA4sKSYbVWhBjUSnl5WT46ODlPXvRZKg/WSlkOSEcsa rAsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808867; x=1702413667; 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=bOmchX4uNJ3czMjsDLMZ3je7KxzFjicIJgluCE6g86g=; b=ITmrzzEFMwqQMt2mSFkGtqbEsbSCohM52lANtM+phqvPZfSD4+QPoZJc8pT+Fuy1LT wjAtdLsm6VL+qaWe9bP9HAtDE+xfqdUsor22x3vwZOmIm2kvfA3vFP05sCee/+yA/G3B vvVgt4A1C5mH+8kfNyViCexMpO8u7QRvGYqjxlvXjiK+o/cpyGp7HNIobLiLRJ6vOu4k ZibqLqpJjyp/NcWQRiivZz0KVHPAhFaX2VGimtD4MqliH5KnU//hQyzHoawBzCY4f9zX 7rnkBygbobCGcU+Ia48JWcMxHc5ujel1La6iR//UANw2J7Fs8rMxWD3pUg0ucKrSsrpL jQxg== X-Gm-Message-State: AOJu0YwmEE4PUU5QDyhu1Rs3MZdFg02mHsTYgUCDHNz2WEZNPNh5euhf 71fn4okONfnxnRRtFfhZyu//7A== X-Google-Smtp-Source: AGHT+IGSiXqg2McRYBm95evuAeCuKTa+uG/zAgKLXw2xVn+9QnX5+jbp7OLGJkKF1c/2UcHshhNfzQ== X-Received: by 2002:a7b:cb98:0:b0:40b:5e21:bdd6 with SMTP id m24-20020a7bcb98000000b0040b5e21bdd6mr863698wmi.101.1701808867046; Tue, 05 Dec 2023 12:41:07 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 03/11] scripts/replay-dump: update to latest format Date: Tue, 5 Dec 2023 20:40:58 +0000 Message-Id: <20231205204106.95531-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701808986820100001 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. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- scripts/replay-dump.py | 70 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 6 deletions(-) diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py index b89dc29555..8b9f914534 100755 --- a/scripts/replay-dump.py +++ b/scripts/replay-dump.py @@ -115,6 +115,11 @@ def decode_unimp(eid, name, _unused_dumpfile): print("%s not handled - will now stop" % (name)) return False =20 +def decode_plain(eid, name, _unused_dumpfile): + "Plain events without additional data" + print_event(eid, name, "no data") + return True + # Checkpoint decoder def swallow_async_qword(eid, name, dumpfile): "Swallow a qword of data without looking at it" @@ -151,6 +156,12 @@ def decode_instruction(eid, name, dumpfile): print_event(eid, name, "0x%x" % (ins_diff)) return True =20 +def decode_char_write(eid, name, dumpfile): + res =3D read_dword(dumpfile) + offset =3D read_dword(dumpfile) + print_event(eid, name, "%d -> %d" % (offset, res)) + return True + def decode_audio_out(eid, name, dumpfile): audio_data =3D read_dword(dumpfile) print_event(eid, name, "%d" % (audio_data)) @@ -193,10 +204,10 @@ def decode_clock(eid, name, dumpfile): # pre-MTTCG merge v5_event_table =3D [Decoder(0, "EVENT_INSTRUCTION", decode_instruction), Decoder(1, "EVENT_INTERRUPT", decode_interrupt), - Decoder(2, "EVENT_EXCEPTION", decode_unimp), + Decoder(2, "EVENT_EXCEPTION", decode_plain), Decoder(3, "EVENT_ASYNC", decode_async), Decoder(4, "EVENT_SHUTDOWN", decode_unimp), - Decoder(5, "EVENT_CHAR_WRITE", decode_unimp), + Decoder(5, "EVENT_CHAR_WRITE", decode_char_write), Decoder(6, "EVENT_CHAR_READ_ALL", decode_unimp), Decoder(7, "EVENT_CHAR_READ_ALL_ERROR", decode_unimp), Decoder(8, "EVENT_CLOCK_HOST", decode_clock), @@ -215,10 +226,10 @@ def decode_clock(eid, name, dumpfile): # post-MTTCG merge, AUDIO support added v6_event_table =3D [Decoder(0, "EVENT_INSTRUCTION", decode_instruction), Decoder(1, "EVENT_INTERRUPT", decode_interrupt), - Decoder(2, "EVENT_EXCEPTION", decode_unimp), + Decoder(2, "EVENT_EXCEPTION", decode_plain), Decoder(3, "EVENT_ASYNC", decode_async), Decoder(4, "EVENT_SHUTDOWN", decode_unimp), - Decoder(5, "EVENT_CHAR_WRITE", decode_unimp), + Decoder(5, "EVENT_CHAR_WRITE", decode_char_write), Decoder(6, "EVENT_CHAR_READ_ALL", decode_unimp), Decoder(7, "EVENT_CHAR_READ_ALL_ERROR", decode_unimp), Decoder(8, "EVENT_AUDIO_OUT", decode_audio_out), @@ -250,7 +261,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 +279,49 @@ def decode_clock(eid, name, dumpfile): Decoder(28, "EVENT_CP_RESET", decode_checkpoint), ] =20 +# Shutdown cause added +v12_event_table =3D [Decoder(0, "EVENT_INSTRUCTION", decode_instruction), + Decoder(1, "EVENT_INTERRUPT", decode_interrupt), + Decoder(2, "EVENT_EXCEPTION", decode_plain), + Decoder(3, "EVENT_ASYNC", decode_async), + Decoder(4, "EVENT_ASYNC", decode_async), + Decoder(5, "EVENT_ASYNC", decode_async), + Decoder(6, "EVENT_ASYNC", decode_async), + Decoder(6, "EVENT_ASYNC", decode_async), + Decoder(8, "EVENT_ASYNC", decode_async), + Decoder(9, "EVENT_ASYNC", decode_async), + Decoder(10, "EVENT_ASYNC", decode_async), + Decoder(11, "EVENT_SHUTDOWN", decode_unimp), + Decoder(12, "EVENT_SHUTDOWN_HOST_ERR", decode_unimp), + Decoder(13, "EVENT_SHUTDOWN_HOST_QMP_QUIT", decode_unimp= ), + Decoder(14, "EVENT_SHUTDOWN_HOST_QMP_RESET", decode_unim= p), + Decoder(14, "EVENT_SHUTDOWN_HOST_SIGNAL", decode_unimp), + Decoder(15, "EVENT_SHUTDOWN_HOST_UI", decode_unimp), + Decoder(16, "EVENT_SHUTDOWN_GUEST_SHUTDOWN", decode_unim= p), + Decoder(17, "EVENT_SHUTDOWN_GUEST_RESET", decode_unimp), + Decoder(18, "EVENT_SHUTDOWN_GUEST_PANIC", decode_unimp), + Decoder(19, "EVENT_SHUTDOWN_GUEST_SUBSYSTEM_RESET", deco= de_unimp), + Decoder(20, "EVENT_SHUTDOWN_GUEST_SNAPSHOT_LOAD", decode= _unimp), + Decoder(21, "EVENT_SHUTDOWN___MAX", decode_unimp), + Decoder(22, "EVENT_CHAR_WRITE", decode_char_write), + Decoder(23, "EVENT_CHAR_READ_ALL", decode_unimp), + Decoder(24, "EVENT_CHAR_READ_ALL_ERROR", decode_unimp), + Decoder(25, "EVENT_AUDIO_IN", decode_unimp), + Decoder(26, "EVENT_AUDIO_OUT", decode_audio_out), + Decoder(27, "EVENT_RANDOM", decode_unimp), + Decoder(28, "EVENT_CLOCK_HOST", decode_clock), + Decoder(29, "EVENT_CLOCK_VIRTUAL_RT", decode_clock), + Decoder(30, "EVENT_CP_CLOCK_WARP_START", decode_checkpoi= nt), + Decoder(31, "EVENT_CP_CLOCK_WARP_ACCOUNT", decode_checkp= oint), + Decoder(32, "EVENT_CP_RESET_REQUESTED", decode_checkpoin= t), + Decoder(33, "EVENT_CP_SUSPEND_REQUESTED", decode_checkpo= int), + Decoder(34, "EVENT_CP_CLOCK_VIRTUAL", decode_checkpoint), + Decoder(35, "EVENT_CP_CLOCK_HOST", decode_checkpoint), + Decoder(36, "EVENT_CP_CLOCK_VIRTUAL_RT", decode_checkpoi= nt), + Decoder(37, "EVENT_CP_INIT", decode_checkpoint_init), + Decoder(38, "EVENT_CP_RESET", decode_checkpoint), +] + def parse_arguments(): "Grab arguments for script" parser =3D argparse.ArgumentParser() @@ -283,9 +337,13 @@ def decode_file(filename): version =3D read_dword(dumpfile) junk =3D read_qword(dumpfile) =20 + # see REPLAY_VERSION print("HEADER: version 0x%x" % (version)) =20 - if version =3D=3D 0xe02007: + if version =3D=3D 0xe0200c: + event_decode_table =3D v12_event_table + replay_state.checkpoint_start =3D 30 + elif version =3D=3D 0xe02007: event_decode_table =3D v7_event_table replay_state.checkpoint_start =3D 12 elif version =3D=3D 0xe02006: --=20 2.39.2 From nobody Wed Nov 27 02:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701809015; cv=none; d=zohomail.com; s=zohoarc; b=Sttj5nEzqistG4xedqgnX1HM+jRyEGF5qWC+7Ek6O3uwfSsB/PF1tpOnFcGs6igioelSceWukBCeZ1kH2/WQbO8ICQer71+uGKLlz3UW1xQwg59Bw/IdUM7SYVDyR+Yl9hywgDyVmx+jqQyr/g1zrMBLIf5+c75lm/VSasarF50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701809015; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=D71TFDBoZSdjXR+fUZGSwmpZbsB3q4P2AJtXODOh0vA=; b=S9o4zZJrhqJ9SelDAW6aB4ta4690L4VQIVFD/X02fcF962LB42trTPE7vSsw1hFCqHvKL+Pu29b+zol7b8r+OoqfEW+phKZIDvRhejWv6kNswh9VBfBD4M7sSGTZer1gxRSPJvH4KNAXLCcIBljXliZu+ltXtZyGW82ouZsZ6o8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701809015299474.0460829476177; Tue, 5 Dec 2023 12:43:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcED-0007OG-0B; Tue, 05 Dec 2023 15:41:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAcEB-0007Nc-Gh for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:11 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rAcE8-0002EA-PZ for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:11 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40b595bf5d2so65698105e9.2 for ; Tue, 05 Dec 2023 12:41:08 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id h15-20020a05600c314f00b004083a105f27sm23057211wmo.26.2023.12.05.12.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:06 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5BE1A5FBBF; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808867; x=1702413667; 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=D71TFDBoZSdjXR+fUZGSwmpZbsB3q4P2AJtXODOh0vA=; b=CfhvIoLvm6C4u8JYHJkEo9h8OZLpydaCw8nutPNe+2enYO/SVX1MyEdXXGIndiZo3D c60p5g5J3nJSkDaFkjTAoqxTogkIvYjmDBGCs6hdp0xBMACFTg3+LxUs5m0nBHJVI1CH 9QjDVC64ayw5lBIUNiO0piuC2sPMVsJTltSRkY3G7H+CVgP1eFgB5OySXbUHQI1tDu2F kcPhSkNi9UrC0w5J5NGNO/4axHJwOh0lSQtKbgriGmAfjqlq3XtbShHfJC02vPRSReKI i752FpP9OZIGom3GsTmKDft8lrKd2W1GdxkiYnimhroIZKRa0zFe917cTat0B5Khut/x pPKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808867; x=1702413667; 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=D71TFDBoZSdjXR+fUZGSwmpZbsB3q4P2AJtXODOh0vA=; b=riLz9iOMF24sQIKKaNZFIojAQKaJXsBIz0e2EDhLVKqX3GIH2rIibAkWEnfi1FlbR5 AUwFENGC+68mou/FrxbtWwAS1bu8CNVyF7TSBM/WVTdhHMvEkGTIPgfOOWGRtcIZwguY hb53FmzycjN1g3ht476VwDesGy11QPckD7ffyWGZVeuWUwiH7hAjLY+4pa7793npNife zV1FImy5UC6QgntJACtlmoo07027oYAjZGV4UbXm5IfF/3ODm1xC75VrmZcj6GvlqlKb aCeK+MVFwjKdQx+SkYl5Fbg12Gy83MeDkdB8gbOhH4fQ1h9dqDZN/bpO8M0aopkXODXu Bktg== X-Gm-Message-State: AOJu0Yyc3qbDPpwE9R85Cp5aGvBrsK3b7wXvvNLw22UpPCh0ilmQb5jc imc0IRh9HWQXCwY/WW8dIklXJQ== X-Google-Smtp-Source: AGHT+IHxEj5vlrVRGgfPHHAl4A8Z0zJluadJIz8SgvfdQ9SP3Kzygy2jQPUtZdFMLVahlNBmiOh74A== X-Received: by 2002:a05:600c:d7:b0:40c:9d4:4bd9 with SMTP id u23-20020a05600c00d700b0040c09d44bd9mr615321wmm.237.1701808867219; Tue, 05 Dec 2023 12:41:07 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 04/11] scripts/replay_dump: track total number of instructions Date: Tue, 5 Dec 2023 20:40:59 +0000 Message-Id: <20231205204106.95531-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701809017431100001 This will help in tracking where we are in the stream when debugging. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- 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 8b9f914534..2212b09322 100755 --- a/scripts/replay-dump.py +++ b/scripts/replay-dump.py @@ -150,10 +150,13 @@ def decode_async(eid, name, dumpfile): =20 return call_decode(async_decode_table, async_event_kind, dumpfile) =20 +total_insns =3D 0 =20 def decode_instruction(eid, name, dumpfile): + global total_insns ins_diff =3D read_dword(dumpfile) - print_event(eid, name, "0x%x" % (ins_diff)) + total_insns +=3D ins_diff + print_event(eid, name, "+ %d -> %d" % (ins_diff, total_insns)) return True =20 def decode_char_write(eid, name, dumpfile): --=20 2.39.2 From nobody Wed Nov 27 02:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701808910; cv=none; d=zohomail.com; s=zohoarc; b=gblsSTuh8yeVYyJXjxnuu46eXe/yVoTIKO1C8dwpkD4AyT2Ct7/6PodMrvzxZvH1WyFb5dn4wqXShHIFBBHbZ+wdvlk08KrPJ/UvGC4QG2OoN/WsGivslXDBSHHBM56HVl1B8GJ5LBA0+e/vPH1+b9EVfDF5WAqOuSK1THS/Km8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701808910; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ly426yd4H2r3GnJOjRqFYA2jyI3ziXUndZx7DtQI9f8=; b=VRCl9tCflK+k/nacuzK0xq/VPKQMDPA66Ps1UyvB+gZ0a/GqdqLxO7oAxfDqerke4QOB5Yg15LvxLs/jGyev1mM/kG92WgRWDw8mxPeeorCb7XsFbXknpLM5cQZy+4oSL1ozaWkUn0nydAZy0oDE78xypZV8ZwvBRiCVISt20SU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701808910091493.6191023261058; Tue, 5 Dec 2023 12:41:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcEF-0007QK-PT; Tue, 05 Dec 2023 15:41:15 -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 1rAcED-0007OW-Hm for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:13 -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 1rAcEB-0002Et-Ua for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:13 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40c0a0d068bso27203295e9.3 for ; Tue, 05 Dec 2023 12:41:11 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l10-20020a05600c1d0a00b00407460234f9sm19791658wms.21.2023.12.05.12.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6D6425FBC2; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808870; x=1702413670; 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=ly426yd4H2r3GnJOjRqFYA2jyI3ziXUndZx7DtQI9f8=; b=jwLUOVKd8azZJGVlc4Z4x055hX4e0+JfOFbzdynqlF7DfdfIQzIdd7SFPaWoYtU/04 21NjXWzQhA7s3tXvq6DYlq/XrXTuVGRNhLfhgGdAsyb7KWwq5hUeePzlqBFJud8gvsTE o5ShI0cnBQByVy8LhbIbhOEgR4YBE9Fd76QLNgRVlmmc2lwM+mlW34ikQftyEWtuMjBp miTklKYX2TspXZw0UJ+hOI9e3piGc/B/FikitwoDYe4T8IQuirCGMVSnYkuXMCncEWSV VsDA7uz5F+UA6mRORI4MA3WutOddyfKlqERbGWkrO421HTHtxknZxqwWwt1Qju0YqfMZ kPaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808870; x=1702413670; 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=ly426yd4H2r3GnJOjRqFYA2jyI3ziXUndZx7DtQI9f8=; b=m88Ej6GHR5Moxaa8RjNI6eDewv1jujVaE4jeAinpS5MHP8voroTW8vIDcLWnr2mdks Aw6ionX/OLySBPcl7Nk2BnwGtrO7Qd337D+1URNIDN5ATCcirAPPN1DsMV1fmVb2sBpo 2biHRfb6m+ssCG1h2kyBgLbrNOE4y2CZ8LLvBUKiDt/GfdQfCWKmeYguhYsJy2zqFUpA iaq104nzpec+j/Mvknch8A7fSagxEeOtu4HKkEDKqID5tPkeuaujwAbeRyx8wziB44ig 3A3SnD05Xc7+4JuUbaEJmeB1CLwxH0LF0DUhG0pWrELyf31EkUw/HsAmbUK+qIdYEzLs cFWQ== X-Gm-Message-State: AOJu0Yy9JuCRbJ7DztP781VVSfKQ4CG8wi8XoUFn23Yqzbfudr2/mIKS 8oARZx4OjueX+mj7TTWknUa1Ag== X-Google-Smtp-Source: AGHT+IFu8L+rnl5Aam7dFYYPjLH6pFMz9hV2aCyd+qfrCvqecUHlOCfvzgwBfWw1qN/uA6z9EG8oWg== X-Received: by 2002:a05:600c:1382:b0:40b:5e22:956 with SMTP id u2-20020a05600c138200b0040b5e220956mr4563587wmf.69.1701808870402; Tue, 05 Dec 2023 12:41:10 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 05/11] replay: remove host_clock_last Date: Tue, 5 Dec 2023 20:41:00 +0000 Message-Id: <20231205204106.95531-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701808911309100001 Fixes: a02fe2ca70 (replay: Remove host_clock_last) Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- 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; --=20 2.39.2 From nobody Wed Nov 27 02:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701808979; cv=none; d=zohomail.com; s=zohoarc; b=kr6QdR5AEHrfHWd3qHlJBl3q7FfywG5VrktJsccl856DEE0egFbe6Q4s5gVEU1hYeQzEexISyC5nIZ1nt5BuTNUaFD270vL7TaTo7AJL2yiTH2X3LnwI6HMcuZbw5od+Hkxj6XbRbsZrFseHU54qbabxFR4XeRe3QYggy058Phs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701808979; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=WUlXUbQdrj2zN2x2QSDq9TzSC9U/EAD4vSnBXQIoxM8=; b=U1pScJFoBuT1+InF+vMBLBGF9t97M9IlEheRKKja3fze2R1KjQo//POi4TMZe/ZQLCpKv38SWJS8s6c4GJQppofxJns5aoTxOS454zgMqkg2nI26bz3IJJy2+ZN7FDn+ET4gBIRfqHkpg9g8TjltRrrR/8whhqygY5dDm/ZhyvU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701808979347883.4900714634773; Tue, 5 Dec 2023 12:42:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcEO-0007Sg-NB; Tue, 05 Dec 2023 15:41:24 -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 1rAcEG-0007Qz-Sw for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:16 -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 1rAcEF-0002Fg-4b for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:16 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40c0a11a914so28309695e9.2 for ; Tue, 05 Dec 2023 12:41:14 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id i1-20020a05600c354100b0040588d85b3asm23273563wmq.15.2023.12.05.12.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 81A585FBC4; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808872; x=1702413672; 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=WUlXUbQdrj2zN2x2QSDq9TzSC9U/EAD4vSnBXQIoxM8=; b=r77Z25BZR/RG/lIOQIOMsUAymqpIYr6ziT1zA6OZEUrLkyiOYDPQ/QZgzoNXIEh/T6 6YdagoaDAabwxNBsxDzW4O37g4Q6Wew1PGOT5w61optK27JHr/jWPmgiXEXIANVL9oSA NGYHGpLE6x5BoBrmBZgrbgO6TC/RMR5GwZvYLeW3Heaq64+QYT/VY6sC68VNNQ2PvToR CXP9JsJnAubodX2eddVvDvL+30dbjJDlgN1ITSUKMA7wg6yvAs3Y+jKqgfVvIOnj7tHs TEfr3y9CcVAMOxiGdxkalU39Zi6aLOGb5bUwd0f2wwrjXcvTKtr80SKeoRy9yHhdOGxU I4JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808872; x=1702413672; 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=WUlXUbQdrj2zN2x2QSDq9TzSC9U/EAD4vSnBXQIoxM8=; b=RrjivUoEpTxFjaedxKzx44pZcOFHBt3DBUTKJw6dnO4GCn2mCrY20d7qg2KqUW3v4l VDSMz0ugy0UPVqdd73Abhzm9yCJrFXiTNRG0NRnzcEXRKpClpld0L8Tg3muoQnNGRgUu BzNUqQdkN5qLeZODd6viuBzqkl3OKh3hirz0Q9Hb6OVGE6fKwvu70SLGdLLyjnIKGtgS clSmRlGVKsmQyfqx0l4tVET3bQD37cOVq1W4nLeE9qb72dsN3+YaZS3SO8+0zO9lPRGV O6L1VrfjQ5nDkLGSFVjsRz4dCJl6jf1xvRpLxDRO21YrBPLyUoUaqT5qMjzPmOIdK2WM 5kQw== X-Gm-Message-State: AOJu0YwxHKLF3Qg9Mm4OySJkqlpQcrj2i5X6AaBnTOQDfwbiEJPL74XL K/dS79QR674P6tz37lPhrgZXjw== X-Google-Smtp-Source: AGHT+IE+6x8TOdKzl2SgGuAsymv1Nq78tToMCiz4gejngXqHRacjLbfQqJ/L+h44qIa2FKe2NR3W8g== X-Received: by 2002:a05:600c:3512:b0:40b:5e1e:b3b6 with SMTP id h18-20020a05600c351200b0040b5e1eb3b6mr975084wmq.52.1701808872704; Tue, 05 Dec 2023 12:41:12 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 06/11] replay: add proper kdoc for ReplayState Date: Tue, 5 Dec 2023 20:41:01 +0000 Message-Id: <20231205204106.95531-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701808980841100006 Remove the non-standard comment formatting and move the descriptions into a proper kdoc comment. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- replay/replay-internal.h | 27 ++++++++++++++++---------- roms/SLOF | 2 +- tests/tcg/i386/Makefile.softmmu-target | 19 ++++++++++++++++++ 3 files changed, 37 insertions(+), 11 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 }; =20 +/** + * typedef ReplayState - global tracking Replay state + * + * This structure tracks where we are in the current ReplayState + * including the logged events from the recorded replay stream. Some + * of the data is also stored/restored from VMStateDescription when VM + * save/restore events take place. + * + * @cached_clock: Cached clocks values + * @current_icount: number of processed instructions + * @instruction_count: number of instructions until next event + * @data_kind: current event + * @has_unread_data: 1 if event not yet processed + * @file_offset: offset into replay log at replay snapshot + * @block_request_id: current serialised block request id + * @read_event_id: current async read event id + */ typedef struct ReplayState { - /*! Cached clock values. */ int64_t cached_clock[REPLAY_CLOCK_COUNT]; - /*! Current icount - number of processed instructions. */ uint64_t current_icount; - /*! Number of instructions to be executed before other events happen. = */ int instruction_count; - /*! Type of the currently executed event. */ unsigned int data_kind; - /*! Flag which indicates that event is not processed yet. */ unsigned int has_unread_data; - /*! Temporary variable for saving current log offset. */ uint64_t file_offset; - /*! Next block operation id. - This counter is global, because requests from different - block devices should not get overlapping ids. */ uint64_t block_request_id; - /*! Asynchronous event id read from the log */ uint64_t read_event_id; } ReplayState; extern ReplayState replay_state; diff --git a/roms/SLOF b/roms/SLOF index 3a259df244..6b6c16b4b4 160000 --- a/roms/SLOF +++ b/roms/SLOF @@ -1 +1 @@ -Subproject commit 3a259df2449fc4a4e43ab5f33f0b2c66484b4bc3 +Subproject commit 6b6c16b4b40763507cf1f518096f3c3883c5cf2d diff --git a/tests/tcg/i386/Makefile.softmmu-target b/tests/tcg/i386/Makefi= le.softmmu-target index 5266f2335a..b9bef72dcf 100644 --- a/tests/tcg/i386/Makefile.softmmu-target +++ b/tests/tcg/i386/Makefile.softmmu-target @@ -33,5 +33,24 @@ EXTRA_RUNS+=3D$(MULTIARCH_RUNS) =20 memory: CFLAGS+=3D-DCHECK_UNALIGNED=3D1 =20 +# Simple Record/Replay Test +.PHONY: memory-record +run-memory-record: memory-record memory + $(call run-test, $<, \ + $(QEMU) -monitor none -display none \ + -chardev file$(COMMA)path=3D$<.out$(COMMA)id=3Doutput \ + -icount shift=3D5$(COMMA)rr=3Drecord$(COMMA)rrfile=3Drecord.bin \ + $(QEMU_OPTS) memory) + +.PHONY: memory-replay +run-memory-replay: memory-replay run-memory-record + $(call run-test, $<, \ + $(QEMU) -monitor none -display none \ + -chardev file$(COMMA)path=3D$<.out$(COMMA)id=3Doutput \ + -icount shift=3D5$(COMMA)rr=3Dreplay$(COMMA)rrfile=3Drecord.bin \ + $(QEMU_OPTS) memory) + +EXTRA_RUNS+=3Drun-memory-replay + # Running QEMU_OPTS+=3D-device isa-debugcon,chardev=3Doutput -device isa-debug-exit,= iobase=3D0xf4,iosize=3D0x4 -kernel --=20 2.39.2 From nobody Wed Nov 27 02:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701808933; cv=none; d=zohomail.com; s=zohoarc; b=VVs3ZpCULjUVmrDhu+WEpa7wL6yvcvmxjuh0tgsyWmumujkzU2vtd8xS2A419jBxyBii6BvXPvPczoPOx+y8DVy9uqBweuaj8jA2FHUoCL9XfyedMxyvb/h5BGx6rTDIBcBdMYQZLZpK33+dS77H/Y5577T5wq1F/lpYRJO476E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701808933; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Y+OK2n1Fz+j7PdxiFIWkIMZ0hIcv40Fig/K+AFS5+zk=; b=kKEzFGrgRBYqIq8wyZ5igBYNvglghJ3G1129XzLnq5ZVaUDjQfIjBnu760HKZpLtLNaiRfZWPYzWkAT/dg+AY2FLwLy5IAgHuztO2hWqzDNQigDZ+QH6kwW/XMCdMdUoJCcFUoHiAHqfdwp6nVTedIBSHIImYsTdyysl3RHAwaA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701808933684831.2349221775299; Tue, 5 Dec 2023 12:42:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcEF-0007PX-1j; Tue, 05 Dec 2023 15:41:15 -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 1rAcED-0007OL-CR for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:13 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rAcEB-0002Ep-Ky for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:13 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40bda47c489so42985715e9.3 for ; Tue, 05 Dec 2023 12:41:11 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id az33-20020a05600c602100b0040c03c3289bsm13514716wmb.37.2023.12.05.12.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9758C5FBC6; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808870; x=1702413670; 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=Y+OK2n1Fz+j7PdxiFIWkIMZ0hIcv40Fig/K+AFS5+zk=; b=kE/hA+dXIb7p05MtCkoAnZF3DyyT/4/p4qGWNDfDGouMaIBQ1S6vmIk3eJozbxbqDq xs5GLckf0/03g+1jM5L8Fw/3Mvhxc3SPXgwzmefoEus19LaNz84B5PAQR7fl9W9ZQ003 30InIVhtQOKbDkyGncrz5sYwOy1giI7JCZwPnJy8Mvp1mEj2l63x2UT4NFewUoOYJueB I8oz0ayeWY9IdBJGuwDuLRbOj6RUwGWzNu5riOaxaO1MBSbcVf987C6jDex1LI2G5hY8 qsDrawLIBdeV9dTRFAkYUNrHh9hvE+nn0nYFbqRDGSQVLN0FFleX3ntBCrU+4KRTjDhQ lMCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808870; x=1702413670; 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=Y+OK2n1Fz+j7PdxiFIWkIMZ0hIcv40Fig/K+AFS5+zk=; b=slGKLzKRDJ5XS/k1SKPKbwPI5l9/8MyeaCfIimTtvzO1yeQeIOZ5uO+yyFluTGMSMz Xskywz9py0khyRrwLVtF85zulvuNysbRqWK34S7EXkHJt7JWuYx+sTcVumvXlAvaXEOO ae4+QXdiS6I2Tpd6rBPZpQzzqmI4hRoWdbQX1k67YZPuwqKvKvJYPChkpONcw/fGqows rmHlU0zPAm/9qpbMEYIIrZKbE7V2N1V1oLr+ibCgqH+RMf3pYoyGcFwp1JzfuDQVMAvn 0kgANs1w9VSHvVxqMtMaYxZbBZPTaBNlc1/ggCeA157uY3yGEg0D+3alhkrL/5TmJ1L7 XMLw== X-Gm-Message-State: AOJu0Ywi4HMpOs0sM1T0XFVWU7h5FRIfgkozza31yIOGxG27cwbW+k/L tfNtNR1c5gZYK9SGR1TUGphgSw== X-Google-Smtp-Source: AGHT+IE+SYLWCK7eyRcJYpw1Bq3uOrgKxy2QIdPZIrUlG68Ez4zu9nvBvHK4JAr8xBU7VK5uVbBhag== X-Received: by 2002:a05:600c:2491:b0:40b:5e59:c565 with SMTP id 17-20020a05600c249100b0040b5e59c565mr928955wms.143.1701808870068; Tue, 05 Dec 2023 12:41:10 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 07/11] replay: make has_unread_data a bool Date: Tue, 5 Dec 2023 20:41:02 +0000 Message-Id: <20231205204106.95531-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701808935685100002 For clarity given it only has two states. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- 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 =3D replay_get_dword(); } replay_check_error(); - replay_state.has_unread_data =3D 1; + replay_state.has_unread_data =3D true; if (replay_state.data_kind >=3D EVENT_COUNT) { error_report("Replay: unknown event kind %d", replay_state.data_kind); @@ -191,7 +191,7 @@ void replay_fetch_data_kind(void) =20 void replay_finish_event(void) { - replay_state.has_unread_data =3D 0; + replay_state.has_unread_data =3D false; replay_fetch_data_kind(); } =20 diff --git a/replay/replay-snapshot.c b/replay/replay-snapshot.c index 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) =20 static const VMStateDescription vmstate_replay =3D { .name =3D "replay", - .version_id =3D 2, - .minimum_version_id =3D 2, + .version_id =3D 3, + .minimum_version_id =3D 3, .pre_save =3D replay_pre_save, .post_load =3D replay_post_load, .fields =3D (VMStateField[]) { @@ -56,7 +56,7 @@ static const VMStateDescription vmstate_replay =3D { VMSTATE_UINT64(current_icount, ReplayState), VMSTATE_INT32(instruction_count, ReplayState), VMSTATE_UINT32(data_kind, ReplayState), - VMSTATE_UINT32(has_unread_data, ReplayState), + VMSTATE_BOOL(has_unread_data, ReplayState), VMSTATE_UINT64(file_offset, ReplayState), VMSTATE_UINT64(block_request_id, ReplayState), VMSTATE_UINT64(read_event_id, ReplayState), 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 =3D -1; replay_state.instruction_count =3D 0; replay_state.current_icount =3D 0; - replay_state.has_unread_data =3D 0; + replay_state.has_unread_data =3D false; =20 /* skip file header for RECORD and check it for PLAY */ if (replay_mode =3D=3D REPLAY_MODE_RECORD) { --=20 2.39.2 From nobody Wed Nov 27 02:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701808997; cv=none; d=zohomail.com; s=zohoarc; b=mX4UdESGriLYbuFZjI4siyq2wql2w0AQtv3XFkG9VpUSkfKpo+rrBmV2HAIUP2PqBtSb7WI8GYzVwteMadxPdOxhc7a4a8NDGkWbp/oSLfSZDhYyW8rqm2Ko5QD2qfwsSX4F17Uv3McAbYDHkx/cgHpVYSejn5nuTuAWaSBkzc8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701808997; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Nlo6CezYV3r03v3L8dVzCnnygHyr+7WQt60cA9zru2s=; b=mjxDC3SVbi6JFPkbrUtcTN0Gm35SKRnYJV8q/LyQT5+l3Vl/PqNselA+62/K8hK+f9E93VSHqSn1keeRNwbBBnwcTKGYSBJxFJLrDluHdXRUPg4lOlcc1oTaC8X8cu2O8DW5aZ3rFDpsAf3XqvHzzfIGQD820TCx1xbocFcBcFs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701808997866809.8363888269965; Tue, 5 Dec 2023 12:43:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcEM-0007SH-2Z; Tue, 05 Dec 2023 15:41:22 -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 1rAcEG-0007Qn-CB for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:16 -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 1rAcEE-0002Fl-In for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:16 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40c09f4bea8so29022645e9.1 for ; Tue, 05 Dec 2023 12:41:14 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id w18-20020a5d4b52000000b0033334df1259sm11421633wrs.20.2023.12.05.12.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id AC8F25FBC8; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808873; x=1702413673; 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=Nlo6CezYV3r03v3L8dVzCnnygHyr+7WQt60cA9zru2s=; b=Rz5ED1JFG/OHwJhRSuGcoTM00ALIt7PSBeSSE00vybgDWnjfDVgvH3qUAZiagXdpji p3Cu1AK9BOadylYWwqzMajL/y8mZEn663MHVoEZe3k9bP7y/tmBVNBNnxOHYtyP8UkLD 86Ikh0S9MM21/67AHzXnixYD6agtfNNQUL+gOE09kfRvzUgdZcQ5jaLdAToRyYXEbTnd 1hndvUkv8EDS77jgNljgrxjj7bzTJ9kfgqTQJRYYCRnMFTYtEsgs+DXjtzLIL/MK/v0R Gkk/50rt2dQy9BhCtB6RDwMldPqxH9Uooej4Gd/jt8Nr6ind60iAmNF1Qu5rWgGTyEO/ LzoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808873; x=1702413673; 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=Nlo6CezYV3r03v3L8dVzCnnygHyr+7WQt60cA9zru2s=; b=PWJW+9joA90tNsHlrsRObtstIXTktur7m/0oVDbxD+rHwDYNChljEHYRP+Gj2zmMVu 5FOhObl1FLfCl5GTFkmmP1kG18WjsJSZtIfLTPvizstXno/Vu4Q9fdMiEbwW6X6+p7F6 sz+maTHfoSpRN8TrcZM/queoJsyGfISAZ+9VCj6IjpV8b+Yzx2jfduk8Ey28AehnZlW6 HEChJS04nTKHaPwbdMdZ9LkZ7FLIpU5Y4q5An5IMHo2c0/1JpB40lLACaNczX0lFRJ7t Zq5kLrtsVwX5x9DTsdNcYsIXCf2iws09v7StGNZZDHHeiqwhLL27nfMHtGTeDgcov5jz lHWw== X-Gm-Message-State: AOJu0YwGhEjgQ2bz4d51JpCx9AxCtABP1gMub74J+hTd3BZ7a3oLN64F yxMndl/llia/XUKGXvJYjye6Lg== X-Google-Smtp-Source: AGHT+IG7qbfIJ+TeagYqzOdFVQSKN/ifiE+mZzFoLvqx70MC8FR1TBTdVhGxDI1MflXBtvaMlh4fbQ== X-Received: by 2002:a05:600c:1f90:b0:407:7ea1:e9a4 with SMTP id je16-20020a05600c1f9000b004077ea1e9a4mr1011296wmb.5.1701808872877; Tue, 05 Dec 2023 12:41:12 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 08/11] replay: introduce a central report point for sync errors Date: Tue, 5 Dec 2023 20:41:03 +0000 Message-Id: <20231205204106.95531-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701808999078100005 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. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- replay/replay-internal.h | 12 ++++++++++++ replay/replay-char.c | 6 ++---- replay/replay-internal.c | 1 + replay/replay.c | 9 +++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 1bc8fd5086..709e2eb4cb 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -74,6 +74,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 +85,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 +190,16 @@ void replay_event_net_save(void *opaque); /*! Reads network from the file. */ void *replay_event_net_load(void); =20 +/* Diagnostics */ + +/** + * replay_sync_error(): report sync error and exit + * + * When we reach an error condition we want to report it centrally so + * we can also dump some useful information into the logs. + */ +G_NORETURN void replay_sync_error(const char *error); + /* VMState-related functions */ =20 /* Registers replay VMState. diff --git a/replay/replay-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 =3D replay_get_dword(); replay_finish_event(); } else { - error_report("Missing character write event in the replay log"); - exit(1); + replay_sync_error("Missing character write event in the replay log= "); } } =20 @@ -135,8 +134,7 @@ int replay_char_read_all_load(uint8_t *buf) replay_finish_event(); return res; } else { - error_report("Missing character read all event in the replay log"); - exit(1); + replay_sync_error("Missing character read all event in the replay = log"); } } =20 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 =3D replay_get_byte(); + replay_state.current_event++; if (replay_state.data_kind =3D=3D EVENT_INSTRUCTION) { replay_state.instruction_count =3D replay_get_dword(); } diff --git a/replay/replay.c b/replay/replay.c index d729214197..e83c01285c 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -226,6 +226,14 @@ bool replay_has_event(void) return res; } =20 +G_NORETURN void replay_sync_error(const char *error) +{ + error_report("%s (insn total %"PRId64"/%d left, event %u/%u)", error, + replay_state.current_icount, replay_state.instruction_cou= nt, + replay_state.current_event, replay_state.data_kind); + abort(); +} + static void replay_enable(const char *fname, int mode) { const char *fmode =3D NULL; @@ -258,6 +266,7 @@ static void replay_enable(const char *fname, int mode) replay_state.data_kind =3D -1; replay_state.instruction_count =3D 0; replay_state.current_icount =3D 0; + replay_state.current_event =3D 0; replay_state.has_unread_data =3D false; =20 /* skip file header for RECORD and check it for PLAY */ --=20 2.39.2 From nobody Wed Nov 27 02:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701808964; cv=none; d=zohomail.com; s=zohoarc; b=jgvR2qjaN/Ray0YMJ8MsaLkqzA0NvRfyl73IT82zE84nCSBR88kjBd09Kh5N83S9ML3ok6Tu77uOF1+S9JiGX+1nXJ6HyX3sqoHluuswDiKeHVmliEooboiK6MLR7uYlIy0SfIQhY7i5FPmEevYjDA05pP2kT/vNqa7JEA9G8UE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701808964; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=d4GcixrJLz9YAIgU+u8MRbzGUgAv+ZLjiVh41JlVLC0=; b=cXNVUsyEoaEdVwAuoX3T898toI3Q7oi+cpALymYhwL3iM8klTFyY0c/YfK3ww/wUD+b8jJ32sQ+4IL//wunnGJ9FmQLNgdm0YrooHcyIeG75juBzjMruoZq1pbz0bqzuIzNBEqzpp7d8fwpNttnsWJG8XNhDZPLfFfqKqjsB+nQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701808963946371.3988271623732; Tue, 5 Dec 2023 12:42:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcEI-0007RK-Os; Tue, 05 Dec 2023 15:41: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 1rAcEF-0007QO-Mq for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:15 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rAcED-0002FY-TH for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:15 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3316c6e299eso75934f8f.1 for ; Tue, 05 Dec 2023 12:41:13 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j6-20020a5d6046000000b0033326e90496sm14426972wrt.18.2023.12.05.12.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C12755FBB6; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808872; x=1702413672; 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=d4GcixrJLz9YAIgU+u8MRbzGUgAv+ZLjiVh41JlVLC0=; b=ArJAr8CmoGO6mRxH+TVptMJo8H9OPnmrFIB2WlVJN3fr6sESS2yliRHpjHxDRiW2lm lyICFBSJSMPhkHZySZxqUfuvG0D+Dm4i6t129CQ2Ad7mPs25CNr6W4MQhZh5hpI65Ebk jApWmAf0Ws7ybIG/Jc+QrxkH/T2SCZRB1T5Pp3IekMQoQiwm3/1+L5eh3MdSWYdh6OLa 5gnQkl9MLpTwm7lLbLzt1yw1cXLr/v+ShrtDoQ3O5yZlLbzgLRAitB6sd3KkMtHzz3cG XXqD5xSbgq33xTI2UshxywHzlUvEUxZ/wYm4bSrEE83rKqVYmDcGvl8aulspTQi9UCiR 7Emw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808872; x=1702413672; 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=d4GcixrJLz9YAIgU+u8MRbzGUgAv+ZLjiVh41JlVLC0=; b=t4TXet0xhSevsEr/Lx2KKAexPnax4EY6Qi4PETyjZLNpI6OKcztUL0kH8biLJ8758y 57JPZ4jpg0ldkR5gZQuNcSBmhVljOrhq04z1XX1sG/5AghJihHuMqTxt3RnG9npl0Sn7 qvUZCjL404Be5y13Qfl1RyA7Lap1do9ZTH0mkyCZFIs49JcEhAKW6dxKaGoeXbDs4Lgp 62x0QH8Z2FwR91ndcNGXnkH9ialilK/TIUjyS8nUUgbXTWfs+1HDozgYJYlkOOWN2dPt SRPtDgIyk0mArgsJ31lZmYa0BBqZOgYrKy1M6ANUPpeLg+mBAU7Cg4GAdWR2kcnkqN80 PwjA== X-Gm-Message-State: AOJu0Yz+gBpDqa6uiQYwrEVwfMLIdLySYxqZQWeiiU6eBiw0hTI1VEgn NEPZCZ30MysbzNy/AY0V/DnrpA== X-Google-Smtp-Source: AGHT+IG50INnoos3vW7nHMWwz6PcwtMTnR1tTuOZmNIpbs2GBVdbiBiUuCWKsZ1WaE8o5wv/bJPoTA== X-Received: by 2002:a5d:480f:0:b0:333:2fd2:3c02 with SMTP id l15-20020a5d480f000000b003332fd23c02mr3241851wrq.187.1701808872500; Tue, 05 Dec 2023 12:41:12 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 09/11] replay: stop us hanging in rr_wait_io_event Date: Tue, 5 Dec 2023 20:41:04 +0000 Message-Id: <20231205204106.95531-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701808964425100002 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=C3=A9e Cc: Pavel Dovgalyuk --- include/sysemu/replay.h | 5 +++++ accel/tcg/tcg-accel-ops-rr.c | 2 +- replay/replay.c | 24 ++++++++++++++++++++++++ 3 files changed, 30 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); =20 +/** + * replay_can_wait: check if we should pause for wait-io + */ +bool replay_can_wait(void); + /* Processing clocks and other time sources */ =20 /*! Save the specified clock */ diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index 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; =20 - while (all_cpu_threads_idle()) { + while (all_cpu_threads_idle() && replay_can_wait()) { rr_stop_kick_timer(); qemu_cond_wait_iothread(first_cpu->halt_cond); } diff --git a/replay/replay.c b/replay/replay.c index e83c01285c..042a6a9636 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -347,6 +347,30 @@ void replay_start(void) replay_enable_events(); } =20 +/* + * For none/record the answer is yes. + */ +bool replay_can_wait(void) +{ + if (replay_mode =3D=3D REPLAY_MODE_PLAY) { + /* + * For playback we shouldn't ever be at a point we wait. If + * the instruction count has reached zero and we have an + * unconsumed event we should go around again and consume it. + */ + if (replay_state.instruction_count =3D=3D 0 && replay_state.has_un= read_data) { + return false; + } else { + fprintf(stderr, "Error: Invalid replay state\n"); + fprintf(stderr,"instruction_count =3D %d, has =3D %d, event_ki= nd =3D %d\n", + replay_state.instruction_count, replay_state.has_unrea= d_data, replay_state.data_kind); + abort(); + } + } + return true; +} + + void replay_finish(void) { if (replay_mode =3D=3D REPLAY_MODE_NONE) { --=20 2.39.2 From nobody Wed Nov 27 02:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701809021; cv=none; d=zohomail.com; s=zohoarc; b=Jbp51YQobDvCpgpK8MYlMnzEuNPA0Y48IQaZcq0kYBPPWcFTlaHaScwJRxzK9qPf3qHLmDugeFl9AkPnTXwApA5DNqS55xxwD/fVWdUt0p6o+QD+tfEPbzCsFphA2kPWm47ebbAvD2qoeJly9bAi1xD81yeXDG72/JS5ZHuYl28= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701809021; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xzTR452wuPoh7u/eWoDkJGpRh65Bnf4qmyQcBOguNFQ=; b=RVfb/dnPIQeZPF4JFINX/vJeM4Uwy9zXodz5VICldf85xKE2UdNxG2sEXRLJjbQmt5UhLQQdJAOkgKnfqywQnYgFZbQlt7Ke9K0CKpvs4GEQacb96/HWFDBvt9Q5Nmf11AVtjyvQw2iYQjqw7cexTDDmLnRYCzm39hpU5BLAUq0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701809021272117.78268892488416; Tue, 5 Dec 2023 12:43:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcEK-0007SD-Tp; Tue, 05 Dec 2023 15:41:21 -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 1rAcEI-0007RM-Di for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:18 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rAcEG-0002GK-5m for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:17 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40bd5eaa66eso43531445e9.3 for ; Tue, 05 Dec 2023 12:41:15 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d22-20020adfa356000000b0033332df65absm12350639wrb.50.2023.12.05.12.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D2F715FBCC; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808874; x=1702413674; 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=xzTR452wuPoh7u/eWoDkJGpRh65Bnf4qmyQcBOguNFQ=; b=tawdAkP4wGZb6jY5J+FfTqmk5/+hwJKuk9oVf91ADpOdIN89tC72SBwD0QA5aZNIoT 7vU3/Ap8haNaHJyFKuRZ9ft99RT0tM+J9NCRRkSDhkCh01s55UcS4Opij64qR3BKpGFf 3ju9F3k0sjnhmLkTJv39W4lj1EyL5zqYAgiDWXXtkxZi/i28JrOpB3KDdGmuWmM+KTV1 vZzSFE3QBZ+XlQpFhn+vpuGCmQ/cUGAw1WVb1wAsB535nUJfEkgRI8ZCkyNfcb5TOXsR RBMed36HKuScm1E1EwZZtnB6wIBOfTF5tE9bmyx4u4wCPAidNlVak+Aoo/iXNcvj4ZFH Sngw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808874; x=1702413674; 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=xzTR452wuPoh7u/eWoDkJGpRh65Bnf4qmyQcBOguNFQ=; b=niqFmOT+SFq/9/GYSoJXlmGePNoO5InzC2OyLEYFGV81eBcEVM4yTxZfGrZ8hsfJwJ yCYrWIUZyuLjZHpUQIiPj+R8WFP4tBoD+Hy99M5lBl5IfbgfSoCC8Iq+kr+xmDab/7e9 +wQV7+QwtijX6nWKjzZjmow2uIZkJwKXnMj46btauhd0HxR8mgAFW9vDrXSWqjXpleL4 DTioZto8YIR/1px3yIef+CsWc0YI9MIpMR9ZhtPwmlY2KU+A0tx7PJ6deVqXoF6jkjB4 ERP0cEaI4Y5GSj6+wHcI2pqiu4lRMmRzzfC0GXg3Fa9ps0XLcpAmYut9mx5CzjoA6Bbi 8Rwg== X-Gm-Message-State: AOJu0YxDQSbYlEdx5J5E+Vrt9XdTeDHopbDJTY6QmkxaS/F2fnBdiPcx 2+AWCjFiL5a8X+VMxmr5yfDdYg== X-Google-Smtp-Source: AGHT+IHPcOZ8muQoN5EDIB75kf+fvnznTcxJTXaSe2YuvBxWs8kN2dCyeBSyq803Drfhp+Ajx9Ec+Q== X-Received: by 2002:a05:600c:2d4c:b0:40b:5e59:e9ea with SMTP id a12-20020a05600c2d4c00b0040b5e59e9eamr988487wmg.137.1701808874602; Tue, 05 Dec 2023 12:41:14 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 10/11] chardev: force write all when recording replay logs Date: Tue, 5 Dec 2023 20:41:05 +0000 Message-Id: <20231205204106.95531-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701809021574100001 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 causing the log to go out of sync. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2010 Signed-off-by: Alex Benn=C3=A9e Cc: Pavel Dovgalyuk Acked-by: Pavel Dovgalyuk Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- chardev/char.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chardev/char.c b/chardev/char.c index 996a024c7a..6e5b4d7345 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -171,7 +171,8 @@ int qemu_chr_write(Chardev *s, const uint8_t *buf, int = len, bool write_all) return res; } =20 - res =3D qemu_chr_write_buffer(s, buf, len, &offset, write_all); + res =3D qemu_chr_write_buffer(s, buf, len, &offset, + replay_mode =3D=3D REPLAY_MODE_RECORD ? tr= ue : write_all); =20 if (qemu_chr_replay(s) && replay_mode =3D=3D REPLAY_MODE_RECORD) { replay_char_write_event_save(res, offset); --=20 2.39.2 From nobody Wed Nov 27 02:42:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1701808996; cv=none; d=zohomail.com; s=zohoarc; b=OvFKYwOuL5Vvvzhi4gx68SpOPvMfSDpZPgLn3WOznN07cj3UX3MAtsqhRq3QmyuaoJxTeFAYaS1of4isk7ANUUrfp5WA5PdZws7pHHtEMbxHPgi0B/PRoDlICCzfyIwfrf+OwlRY7FT+lWWZV0BSxpPUUriaCnv+vD3f75FPjwg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1701808996; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZO+XHJPkvwBo8PTtuDhgEKDXcm5kj7GqMfllU0coabQ=; b=RNKmURR+7gX78qQaUw5A/GkJIAtVsZx+/Mml+hP/wFaIMc+iDj3Mf2yARBx/JjHYpkrnGEIYFEVYvtzlFTeaSFurPjW3ZwN3K/GPD78UWkMijAvHUUzUGf++9N+7ttv5PvUOncXpRsZOwXttMUQp6/KsDT2TjT/EccC3J4xjWgM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1701808996440248.49767442354448; Tue, 5 Dec 2023 12:43:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAcEE-0007PV-FW; Tue, 05 Dec 2023 15:41:14 -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 1rAcED-0007OK-9a for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:13 -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 1rAcEB-0002Eq-H9 for qemu-devel@nongnu.org; Tue, 05 Dec 2023 15:41:13 -0500 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40c0a11a914so28309195e9.2 for ; Tue, 05 Dec 2023 12:41:11 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id n4-20020a05600c3b8400b0040b40468c98sm23481841wms.10.2023.12.05.12.41.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:41:09 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E47065FBCE; Tue, 5 Dec 2023 20:41:06 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701808870; x=1702413670; 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=ZO+XHJPkvwBo8PTtuDhgEKDXcm5kj7GqMfllU0coabQ=; b=Tzm09t4AZ0BK1ijJXrr4YwigdYfwRumLUAMLAnXdiMWANR8mNIT/LbU9hY51mngl03 neKSD1Ja6RdpuBggbWfC/SSTQ+3Rg0+kdTSDtZQfQS77OEIPvAKgayrNz5Iw0oEo12xH pv5OlIQ/rqNqoHiVRP4OFAo1Qx3muuYWJhKZ8dBAMLLCGvYbkPNfBRtkmNQ8aEsJ4nGq J+F3f1xih6O09RenbKN6To4l7icNRZE0VbLfKpUEsn2GTyltK6a6dRuGnP81ucT7AhzO wXAL2XNWWrhGf5jxCngDijPa/SEX7nBYm15yDGZy54ZZqj1uVHfEaFX9hKHLiI3eN4U7 aURA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701808870; x=1702413670; 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=ZO+XHJPkvwBo8PTtuDhgEKDXcm5kj7GqMfllU0coabQ=; b=tlbYbhBBAzVP0/Z1ucG/lJ2Irp6B4FyrzLKxJLUtX250WXzNyxdtufOZWWCzoCLRZu vO3wAKW2doionpBoQ8fpAzXTEEDpu19l2B7LZMEvmI20jyjpdw9B+ZpVWJwvcH0oSBvL KQaeBAF3inusT/6CS/cU0KtiFn2Wvq+5CKfoG8C40uaeLqN+sPGNW0+OQ+ZiWKoVECWv BLblX/143oLRJuW7gnoGmel9OLmlukZfE7wcSnrcQb4f3GjQSBuM688/hbC2r9VV1GOm yyrElSftWwozCjz9yi8r0rPR3HUG3oHUHDjt8AeU6MedTQg6UTp/p+s/X/2v6LwZI8Nu vlnw== X-Gm-Message-State: AOJu0YxIB+WWlgYqk7exEfA86+ciKNqBG8JpWspQnCOHFJJoLuEOVMLQ 9IiIdoPzUcRjHNXo5nqBANolWA== X-Google-Smtp-Source: AGHT+IEl1EKPZ0Dcx8ON7Xq/2Pnw2jkPAQc9LuG7gm6SYO2Jha9knKrj3xZYLrAGZckT5a1bm8k6MQ== X-Received: by 2002:a05:600c:22d1:b0:40b:5e59:b7a8 with SMTP id 17-20020a05600c22d100b0040b5e59b7a8mr969692wmg.133.1701808870236; Tue, 05 Dec 2023 12:41:10 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Eduardo Habkost , Richard Henderson , Wainer dos Santos Moschetta , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH 11/11] tests/avocado: remove skips from replay_kernel Date: Tue, 5 Dec 2023 20:41:06 +0000 Message-Id: <20231205204106.95531-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231205204106.95531-1-alex.bennee@linaro.org> References: <20231205204106.95531-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1701808997036100001 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. Signed-off-by: Alex Benn=C3=A9e Acked-by: Pavel Dovgalyuk --- tests/avocado/replay_kernel.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py index 1eaa36444c..c54e96c9ff 100644 --- a/tests/avocado/replay_kernel.py +++ b/tests/avocado/replay_kernel.py @@ -98,8 +98,6 @@ def test_i386_pc(self): =20 self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) =20 - # See https://gitlab.com/qemu-project/qemu/-/issues/2010 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test sometimes gets s= tuck') def test_x86_64_pc(self): """ :avocado: tags=3Darch:x86_64 @@ -135,8 +133,6 @@ def test_mips_malta(self): =20 self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) =20 - # See https://gitlab.com/qemu-project/qemu/-/issues/2013 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') def test_mips64el_malta(self): """ This test requires the ar tool to extract "data.tar.gz" from @@ -152,7 +148,6 @@ def test_mips64el_malta(self): =20 :avocado: tags=3Darch:mips64el :avocado: tags=3Dmachine:malta - :avocado: tags=3Dflaky """ deb_url =3D ('http://snapshot.debian.org/archive/debian/' '20130217T032700Z/pool/main/l/linux-2.6/' @@ -200,8 +195,6 @@ def test_arm_virt(self): =20 self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D1) =20 - @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on G= itLab') - def test_arm_cubieboard_initrd(self): """ :avocado: tags=3Darch:arm @@ -354,7 +347,6 @@ def test_m68k_mcf5208evb(self): file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) self.do_test_advcal_2018(file_path, 'sanity-clause.elf') =20 - @skip("Test currently broken") # Console stuck as of 5.2-rc1 def test_microblaze_s3adsp1800(self): """ :avocado: tags=3Darch:microblaze @@ -389,7 +381,6 @@ def test_or1k_sim(self): file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) self.do_test_advcal_2018(file_path, 'vmlinux') =20 - @skip("nios2 emulation is buggy under record/replay") def test_nios2_10m50(self): """ :avocado: tags=3Darch:nios2 --=20 2.39.2