From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634350116998.9907479207293; Thu, 13 Feb 2020 14:52:30 -0800 (PST) Received: from localhost ([::1]:60318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NLQ-0006FU-Di for importer@patchew.org; Thu, 13 Feb 2020 17:52:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39393) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKE-0004b2-OW for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKD-0003ZT-PU for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:14 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:36136) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKD-0003Xp-Ix for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:13 -0500 Received: by mail-wm1-x334.google.com with SMTP id p17so8612945wma.1 for ; Thu, 13 Feb 2020 14:51:13 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g17sm4841694wru.13.2020.02.13.14.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:10 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B5E7B1FF8C; Thu, 13 Feb 2020 22:51:09 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aRRamzMzvjTZar30SD38wYqoFHYtaZyfi67Aj7iN5oE=; b=LdQ2tRiBHrDfXBpumJ1UphwGxoAJogYZB7mi6IWCgo+aSs3PjTJ2WA9xU2W3SJdmXu CkA6Cky4tGs0EWwsS3UJAZVIiUbL8+deqR/fOgDKqBs7cZMGacTGo4RWMGgB/s4vrGcJ OMPBzl7ugengzbSU8FeIh6rKobOf3Va00CQq4KgDJAZtT9z6PKYxGT0vGXFKCKOvjFw8 u1i44yQf3u4QtOcVZCeAqAyji/bpIwK4zV99aG1bbXnCk9Fz5+y/6cPHmdRtMVy3DPjG KdqSNxaa4kcqbedaPQrVn3+Q8FN2yfAsL/4eqYxyfKTtjptTMOypliEmdtY58EQor0dz 8ISg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aRRamzMzvjTZar30SD38wYqoFHYtaZyfi67Aj7iN5oE=; b=d2lnvXSmv3tEhxosVrrdKBv/7GVbgIguu0JgwROdrHqx/0CH2NkxczIWrSTXvMDVsl 13RKa5GlgC2NPNJ2DYb58AeUhc5s90WP+x6gX+l/klwtxvved5AliBE7e03DBDhRSqhu 8OxyyQ6TCVddr+bNErw2bReQFY7ghdWseGClrDY6UWDnJuwWU2MFURXCRmYvOjKz0MnK rps3IeCAuAojccDS4m5OwpfBcGGvjpfhxSqGT3LIvmED22g6pXu3Mt0oDu77qEW9zLV9 E4iCPQLYlZ7fHzmiAUz+zwr7nX2vrsK+9zOucgRIjPHAxHMNwKHRMS2ksRO9+zvdPElL a8pQ== X-Gm-Message-State: APjAAAWVi8K2iaW13aFyXagc0RgXe+pHVhLvAhUavAD43C/PbFiqQxP4 GzSTP3fmBCBDlODWVRDp/JgIwQ== X-Google-Smtp-Source: APXvYqwwjTtUKcO/iA1vaMG2OJ6wJpu6R+2tmUENN5pWQ3a+K2SPrScwJZit2CyOo4C+tvYgaC9gSA== X-Received: by 2002:a1c:1d09:: with SMTP id d9mr312058wmd.91.1581634272467; Thu, 13 Feb 2020 14:51:12 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 01/19] tests/tcg: include a skip runner for pauth3 with plugins Date: Thu, 13 Feb 2020 22:50:51 +0000 Message-Id: <20200213225109.13120-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Peter Maydell , berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, "open list:ARM TCG CPUs" , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) If we have plugins enabled we still need to have built the test to be able to run it. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Robert Foley --- tests/tcg/aarch64/Makefile.softmmu-target | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/= Makefile.softmmu-target index d2299b98b76..71f72cfbe34 100644 --- a/tests/tcg/aarch64/Makefile.softmmu-target +++ b/tests/tcg/aarch64/Makefile.softmmu-target @@ -70,4 +70,6 @@ pauth-3: $(call skip-test, "BUILD of $@", "missing compiler support") run-pauth-3: $(call skip-test, "RUN of pauth-3", "not built") +run-plugin-pauth-3-with-%: + $(call skip-test, "RUN of pauth-3 ($*)", "not built") endif --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634357991574.6930844141663; Thu, 13 Feb 2020 14:52:37 -0800 (PST) Received: from localhost ([::1]:60328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NLY-0006SE-Ey for importer@patchew.org; Thu, 13 Feb 2020 17:52:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39460) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKG-0004bJ-1O for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKF-0003cT-1r for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:15 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:45983) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKE-0003aU-PD for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:14 -0500 Received: by mail-wr1-x444.google.com with SMTP id g3so8725903wrs.12 for ; Thu, 13 Feb 2020 14:51:14 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v14sm4658025wrm.28.2020.02.13.14.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:10 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CB8001FF8F; Thu, 13 Feb 2020 22:51:09 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FlL6Bcf4soitUd0txOakm4oS8jrNtXcuMA7Ur/DGB9o=; b=UqbgT5UcJMg8gqiYdnNyvLuonIVm3I7KCiblCyhikQXRHI0L/NQXo+JVpaY8WhNZr1 /UgDkSBmYODIPshL+IB1ssT108wG1mn2qOcJdQd+N0yqQZipptF17T23Jhjv52HC+Agr sZUHtIVos4frw3xjngqEyMhMMhwmUCV/Ig0i0Adus18NiYZXbfljjJVFW4Ge4nBXy6Ks kzfPhRyxRlX0bc6BVafq6l5RzLHDGssGLHWz4jkyXfk+GtCWUBjpFc7BID7qbBkvzGBK VeaXw3D22OQA5TPkuQxeTEfm7DylPLDJ2ZMJuxgdNsspXWm55PxDOVaHXpdd8hCA2k6L WOEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FlL6Bcf4soitUd0txOakm4oS8jrNtXcuMA7Ur/DGB9o=; b=KiFeSNdhHb8d9ZsbJdz2R4B21xbe2QChZ5fFdltw9WSIKq8SNMd+3oU9+yh7K+W1UV VomHuooLI/38uU4p24qlSIJnGvLBuffMxnwSGD6JwpjO98MOOiR838+T8TR54ksbaZ4P ddGxoyhkDbMFrZYkHpACgYHyRDl21UzThL8gJW+hu8TnE+WLIi2QQR8bq/Lmk2rTcrqI QGe1e/qGFQPJ8rppPulsAOnYltDAV1RY8VzBcZvCQqB1KbrJ4fuRrewacClJ1TcxLsJT RqXpH9HZlPxnY9YGYIumz0wUbEb7lTe66cjMki4RGEaj9XJxOwgYeslelphjKGrXv/TJ g7lA== X-Gm-Message-State: APjAAAXeqXsBwSYtoWAxY8eJCSgndgh7Mx7gOyLzzWU5NiV/xk7i/scL ObYEYloAmAujH5JaeCXiHYdUrQ== X-Google-Smtp-Source: APXvYqy0izTN/wPfLGl+wfo65ZFSgUe8SDkd6ng1aLdO/DFglVyd0GfNib4S6ZbkNHxVtTgV6E5CWw== X-Received: by 2002:adf:e6cb:: with SMTP id y11mr24035955wrm.59.1581634273674; Thu, 13 Feb 2020 14:51:13 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 02/19] tests/rcutorture: update usage hint Date: Thu, 13 Feb 2020 22:50:52 +0000 Message-Id: <20200213225109.13120-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Although documented in the comments we don't display all the various invocations we can in the usage. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/rcutorture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/rcutorture.c b/tests/rcutorture.c index 49311c82ea4..e8b2169e7dd 100644 --- a/tests/rcutorture.c +++ b/tests/rcutorture.c @@ -413,7 +413,8 @@ static void gtest_stress_10_5(void) =20 static void usage(int argc, char *argv[]) { - fprintf(stderr, "Usage: %s [nreaders [ perf | stress ] ]\n", argv[0]); + fprintf(stderr, "Usage: %s [nreaders [ [r|u]perf | stress [duration]]\= n", + argv[0]); exit(-1); } =20 --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634485782559.1916149759884; Thu, 13 Feb 2020 14:54:45 -0800 (PST) Received: from localhost ([::1]:60384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NNc-0001w0-8g for importer@patchew.org; Thu, 13 Feb 2020 17:54:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39532) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKH-0004dH-Or for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKG-0003gU-N3 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:17 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:53456) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKG-0003eD-HM for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:16 -0500 Received: by mail-wm1-x342.google.com with SMTP id s10so8061213wmh.3 for ; Thu, 13 Feb 2020 14:51:16 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x14sm4753745wmj.42.2020.02.13.14.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:13 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DF7711FF90; Thu, 13 Feb 2020 22:51:09 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V4YbJuHMHTKZppvspX7lYfndG26GXtbu1NuW0h2HVeE=; b=KLe/bGVBvPm8isgWPAVPHM5oSTWD5CeeAi+60HnDmHOsABIrSO582YnKMq/c4eWdI+ 5HAN3ZFukntEWg92EoiWUOHZZBoG9nAyAS2LQjzbhbnmsJppYf7IwMsKm+LcuKabBQXH dZL/NmjPCDG8N0eb58+nwLyC3poEjVNWm0OrX4gvWKDTYgpkW0FZ9Xl/4Iu0pdowwRHW rIO0kDlghWSDPYrMKqr/UDo0IB486bGDRDe1aaoXeTLm7x7NDfFq2MIAL6rseYmwHuJj DgiyXy/IuTNgzOx99Y+wdZCprdUptPXt5o8MKi7+iRn3YuEkIdw1UV6MD+Qa/mJjGGMg tp1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V4YbJuHMHTKZppvspX7lYfndG26GXtbu1NuW0h2HVeE=; b=XwokRkDb87ykg4C9BW+zQPhMXBj/PTqy6iPsmk1Oebbeys8z4FF3x3UVJRuHNQQsqI Rfzjs5NuZjgA6LOTVD+k6TflJ3nd5aayi0E1+B7WTdGqaJwKEnMv0c+CCnzDoBD0uAx0 sGzlbr3mTtxR2G8/XUM3515o13gP1hYWn+mQQ8EjG4QRlJZjLGKn0CBqw2xFH8Ti0Wza qu3OzadxKI/lQEYBCcFlwI6CXS1hFFrK6pVGextPcfq3P2AxKy1XDNXsU/BhrfX3fG+4 fbTzU1hnIhq4oy76FkEsGCfTkZrLGWPXAZepTdh9N9NhY0kEX3msziVOAMFa2iHZhttd s83w== X-Gm-Message-State: APjAAAXxnsRiXc3OzI6l3AkWhZ1us+cv6uDcuAMULEqBcXxoUFfGDilS 0Z9MNhbduulbLZDpuDG0ySOBjA== X-Google-Smtp-Source: APXvYqyEwMhtzPyHjDRZ7z6eYNtlegfxYMH5pBb0ztJREu7summCryspAf/p07NpNkOq4RTO5Tnl+A== X-Received: by 2002:a1c:1d8d:: with SMTP id d135mr328313wmd.92.1581634275415; Thu, 13 Feb 2020 14:51:15 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 03/19] tests/rcutorture: better document locking of stats Date: Thu, 13 Feb 2020 22:50:53 +0000 Message-Id: <20200213225109.13120-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This is pure code motion with no functional effect. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/rcutorture.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/rcutorture.c b/tests/rcutorture.c index e8b2169e7dd..256d24ed5ba 100644 --- a/tests/rcutorture.c +++ b/tests/rcutorture.c @@ -65,8 +65,6 @@ #include "qemu/rcu.h" #include "qemu/thread.h" =20 -long long n_reads =3D 0LL; -long n_updates =3D 0L; int nthreadsrunning; =20 #define GOFLAG_INIT 0 @@ -78,11 +76,20 @@ static volatile int goflag =3D GOFLAG_INIT; #define RCU_READ_RUN 1000 =20 #define NR_THREADS 100 -static QemuMutex counts_mutex; static QemuThread threads[NR_THREADS]; static struct rcu_reader_data *data[NR_THREADS]; static int n_threads; =20 +/* + * Statistical counts + * + * These are the sum of local counters at the end of a run. + * Updates are protected by a mutex. + */ +static QemuMutex counts_mutex; +long long n_reads =3D 0LL; +long n_updates =3D 0L; + static void create_thread(void *(*func)(void *)) { if (n_threads >=3D NR_THREADS) { @@ -230,8 +237,9 @@ struct rcu_stress { struct rcu_stress rcu_stress_array[RCU_STRESS_PIPE_LEN] =3D { { 0 } }; struct rcu_stress *rcu_stress_current; int rcu_stress_idx; - int n_mberror; + +/* Updates protected by counts_mutex */ long long rcu_stress_count[RCU_STRESS_PIPE_LEN + 1]; =20 =20 --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15816344764971001.9084908517452; Thu, 13 Feb 2020 14:54:36 -0800 (PST) Received: from localhost ([::1]:60376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NNS-0001hZ-Ux for importer@patchew.org; Thu, 13 Feb 2020 17:54:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39681) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKL-0004kL-0i for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKJ-0003mz-U4 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:20 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:40369) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKJ-0003kY-M2 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:19 -0500 Received: by mail-wr1-x441.google.com with SMTP id t3so8743312wru.7 for ; Thu, 13 Feb 2020 14:51:19 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n3sm4841916wmc.27.2020.02.13.14.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:13 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F3F8F1FF91; Thu, 13 Feb 2020 22:51:09 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dX/a2gresk53+psqLbyuBofhTGzw6h0OJ4TRN4KF5Rs=; b=IQtepx4vfMTvVFOK9Y6UxzAtq0SHyHWQqFQ8JI7tMZMn0QV+8Pd9bQxmtz+H9RONrL qSY9GCRkAYjQrCkd6Ic4oJsGvEDLeMqk6tZR15G+3/3n96moR1AMtwSOb0p5A/lgYVBe b/pN1oUsSpcdC8iKaPNv6o07d5ar0IDhD4ROL1+idItbz2+HCkPNqgvhnL8sZmC0mNFM sW7Cosw+jQdHUCMNCUdJOOuZeXZZXlMzroxcWW0x8UgBQYuZH4NX659rVNRFX6ut4hAt 8X309SO6JINTqM4tV5UpynLmITd5N0WCqLw2f0T6WrBtM/+BlwP22xNTJaWEAY6dsm8t /m7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dX/a2gresk53+psqLbyuBofhTGzw6h0OJ4TRN4KF5Rs=; b=hhqp1AfKa8BCWz2IoQ4TVZjXR6Oquy76f1IYx8RTGuMf1oDXmZsh4OA1Vdg1Y051ow JA/BnRjne3y/R4rIuqgV5lSCVpWEL2MalhqzJglBvsOvF+OKG+DgPyGGKtN3TsrA/GQM 6TudN2t/5jpLoNQAFtKdfwB+bYm3i72xHCNhQapIq9EF8UbJFSrxGtAwLAtu0Zh4A7iD k0lukPT/ZTcQ7h33ZJrHNC9BnchHmypQmGoA1EmRbdQAYnqK7mNw17KaeebE+ZaMOehI wI+7tGEeBishAkIJZLWjBTHMbZ2Y8moxqRKVx49kvFI2kYlS8XKNNtkf0Gp2Oj3oNb2C EQRQ== X-Gm-Message-State: APjAAAX0dFv36Ult3A+d1tegBZuXT0i9sGYtICQCOU4Gax/evkRcRh1T lg+BbJRIL/6Lc28bBKfgMirQKQ== X-Google-Smtp-Source: APXvYqxVlNOwSuluIVpSUIJTp1bpxZcIZMGZ5qLV6QfBdiWGN5qMo9fUTAq6tVcIQsBJFXkM8Hhq6w== X-Received: by 2002:a05:6000:124b:: with SMTP id j11mr22157353wrx.285.1581634278278; Thu, 13 Feb 2020 14:51:18 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 04/19] tests/rcutorture: mild documenting refactor of update thread Date: Thu, 13 Feb 2020 22:50:54 +0000 Message-Id: <20200213225109.13120-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This is mainly to help with reasoning what the test is trying to do. We can move rcu_stress_idx to a local variable as there is only ever one updater thread. I've also added an assert to catch the case where we end up updating the current structure to itself which is the only way I can see the mberror cases we are seeing on Travis. We shall see if the rcutorture test failures go away now. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Paolo Bonzini --- tests/rcutorture.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/tests/rcutorture.c b/tests/rcutorture.c index 256d24ed5ba..9559f13cd1f 100644 --- a/tests/rcutorture.c +++ b/tests/rcutorture.c @@ -236,7 +236,6 @@ struct rcu_stress { =20 struct rcu_stress rcu_stress_array[RCU_STRESS_PIPE_LEN] =3D { { 0 } }; struct rcu_stress *rcu_stress_current; -int rcu_stress_idx; int n_mberror; =20 /* Updates protected by counts_mutex */ @@ -288,29 +287,48 @@ static void *rcu_read_stress_test(void *arg) return NULL; } =20 +/* + * Stress Test Updater + * + * The updater cycles around updating rcu_stress_current to point at + * one of the rcu_stress_array_entries and resets it's pipe_count. It + * then increments pipe_count of all the other entries. The pipe_count + * will be read under an rcu_read_lock() and distribution of values + * calculated. The final result gives an indication of how many + * previously current rcu_stress entries are in flight until the RCU + * cycle complete. + */ static void *rcu_update_stress_test(void *arg) { - int i; - struct rcu_stress *p; + int i, rcu_stress_idx =3D 0; + struct rcu_stress *cp =3D atomic_read(&rcu_stress_current); =20 rcu_register_thread(); - *(struct rcu_reader_data **)arg =3D &rcu_reader; + while (goflag =3D=3D GOFLAG_INIT) { g_usleep(1000); } + while (goflag =3D=3D GOFLAG_RUN) { - i =3D rcu_stress_idx + 1; - if (i >=3D RCU_STRESS_PIPE_LEN) { - i =3D 0; + struct rcu_stress *p; + rcu_stress_idx++; + if (rcu_stress_idx >=3D RCU_STRESS_PIPE_LEN) { + rcu_stress_idx =3D 0; } - p =3D &rcu_stress_array[i]; + p =3D &rcu_stress_array[rcu_stress_idx]; + /* catching up with ourselves would be a bug */ + assert(p !=3D cp); p->mbtest =3D 0; smp_mb(); p->pipe_count =3D 0; p->mbtest =3D 1; atomic_rcu_set(&rcu_stress_current, p); - rcu_stress_idx =3D i; + cp =3D p; + /* + * New RCU structure is now live, update pipe counts on old + * ones. + */ for (i =3D 0; i < RCU_STRESS_PIPE_LEN; i++) { if (i !=3D rcu_stress_idx) { rcu_stress_array[i].pipe_count++; --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634607187780.0561531666368; Thu, 13 Feb 2020 14:56:47 -0800 (PST) Received: from localhost ([::1]:60436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NPZ-0004eF-UL for importer@patchew.org; Thu, 13 Feb 2020 17:56:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39574) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKI-0004fb-MY for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKH-0003iO-Mi for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:18 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:37297) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKH-0003ge-C4 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:17 -0500 Received: by mail-wm1-x330.google.com with SMTP id a6so8631829wme.2 for ; Thu, 13 Feb 2020 14:51:17 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a16sm4574682wrt.30.2020.02.13.14.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:13 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 150151FF92; Thu, 13 Feb 2020 22:51:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mRJBG/zc2GQpI0clN99w+344ScpJbk+vuaXsTd83iMo=; b=FBbVtg0B2DtHIda3Y16/vX49BMh0/hFDiAFf3H6iP8zj9TOi6IuWuGSjXOWdVBtDNT ibvl5q9JJltl62tVn1yLCo1z9AYydV86k9c0oK9QsjHKEiizGihoSYNte2fyMpoIw3Om 8wegrkdFhlNjgDlvNAQ+6MqtgmuHHT6an7u+dwBmxFvh9//FTX5hTLA0vj5KxU84m0Dj T7532m+E2xMCoqDz23adm1BHdcd8Va8GbqhL5KhEjxmAPvBM2EymicUt8R4dtZ8/VIS6 /D+5kJOhJk4zJeWyXWfLrVl+XNY1CfMS7PX+H7VPCmJuf+SfSF80dgIKaZw7wPqroj0q c9ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mRJBG/zc2GQpI0clN99w+344ScpJbk+vuaXsTd83iMo=; b=AghUQe7slmrsP/KqrR5uuCXI4JvcVfQFhYZG7+gGVfqK4m6MLauET2eft5Un5m5kNc XjLR3B0xC9cyRhDHc5GwKJeHz43dGcYoFAM/Wpj3QxD24klOyu+V8VGZKScQrT3fz2ad AdtvCuCzen/Jn7gKiaTkCAAEe8VNDh7nWeSo5/8NhrbLZRRkoiZmB5oC1t0uAdDvozwM NEaWawNnV0A0p4WgN68XzPMBdWtPsqZcoeVD9wCj1pET92luLZWb+0diLHTtRmXYYFLz Jt9+zdrHe/8ZWS0GqabGgws8aFKKM9vGMwqY0XGut23Da29E9i13z+RvUsxvdg7qLBOn Lr6g== X-Gm-Message-State: APjAAAW+AxiTEAFumRF+QzRQmDA7IZLDEPvK0pE9jfhukgv5b5RBUiEA HJXfRPHGLG4cqTzf8wEJAq1iEw== X-Google-Smtp-Source: APXvYqynCNmkW4jS9MOXirlbbMMtt8nDRPORg7lrwtr18L2aQ1wi07FeVgLTIqy8rJN3vvjLfilJSg== X-Received: by 2002:a1c:7907:: with SMTP id l7mr299383wme.37.1581634276342; Thu, 13 Feb 2020 14:51:16 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 05/19] travis.yml: Test the s390-ccw build, too Date: Thu, 13 Feb 2020 22:50:55 +0000 Message-Id: <20200213225109.13120-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::330 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, "open list:S390 general arch..." , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cornelia Huck , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Thomas Huth Since we can now use a s390x host on Travis, we can also build and test the s390-ccw bios images there. For this we have to make sure that roms/SLOF is checked out, too, and then move the generated *.img files to the right location before running the tests. Signed-off-by: Thomas Huth Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Cornelia Huck Message-Id: <20200206202543.7085-1-thuth@redhat.com> --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis.yml b/.travis.yml index 58870559515..ea13e071795 100644 --- a/.travis.yml +++ b/.travis.yml @@ -509,6 +509,16 @@ matrix: env: - TEST_CMD=3D"make check check-tcg V=3D1" - CONFIG=3D"--disable-containers --target-list=3D${MAIN_SOFTMMU_TA= RGETS},s390x-linux-user" + script: + - ( cd ${SRC_DIR} ; git submodule update --init roms/SLOF ) + - BUILD_RC=3D0 && make -j${JOBS} || BUILD_RC=3D$? + - | + if [ "$BUILD_RC" -eq 0 ] ; then + mv pc-bios/s390-ccw/*.img pc-bios/ ; + ${TEST_CMD} ; + else + $(exit $BUILD_RC); + fi =20 # Release builds # The make-release script expect a QEMU version, so our tag must start= with a 'v'. --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634361772485.53731768753744; Thu, 13 Feb 2020 14:52:41 -0800 (PST) Received: from localhost ([::1]:60322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NLc-0006Ra-HW for importer@patchew.org; Thu, 13 Feb 2020 17:52:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39617) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKJ-0004hB-P8 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKI-0003kT-Mv for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:19 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:35387) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKI-0003im-G2 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:18 -0500 Received: by mail-wr1-x42a.google.com with SMTP id w12so8750696wrt.2 for ; Thu, 13 Feb 2020 14:51:18 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a22sm4940111wmd.20.2020.02.13.14.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:13 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 293031FF93; Thu, 13 Feb 2020 22:51:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xk2650h3wDm/dF48W9ZCLpoRo1e5nZQvUV6vRqejydc=; b=eH7t+n1eFb0+y+a7SHsE01/f2K8cdBjpxqOAV8O18/rfxRHFc2hVVQwM8dWQHElvxI qJ2FDoaS73kF2LYsN7H+2UTd1mW4d4grXgzW1LEHDjk2tHIqT7wj96sOba+7Cg/ai02m Wf9+SDglzqXlq6NcCpMaAOFTIlfPjEZX7IgKgfUGv/x5jjSH+7wZ7iHesMXrZ9vRLk87 GxpjvmFVImdeEDFVdu3umK/uerXmQzQqhcz9y6JXnBzP1UchnOI37AOuMC7RNL98Tn1T tBGovp1ov4a+qS65LPs9IWvav/+MHaCxQ769HPauefcwtdij6PARjMTqHohM+imu+CUU CaLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xk2650h3wDm/dF48W9ZCLpoRo1e5nZQvUV6vRqejydc=; b=a3XUALx268dR6M1O/aFxAiWh/rMUJtJI/OBAXZPOX8rYQNCY8DlQQImFnw3c1oS0g8 BKXzrzcUwD37DjaUeRKx9KwlVab9BxAaTC4HrSAQ1GxCRQYErSBbhRK7MEIsmp08N3Aw P3wQq2mf5+AT8Ipah98e3rPIEO9dGT9RI2uc+ZAwAJFAAhXuVaGQ29aDgx3FnCTQ69c8 AQCyf2Jpm+L4vKQMK4R47VBtvYjiskMH9rwGxJS6ZMJ6siVwRWEvlFY5z0mao4WruQ+J 96eAyCPniQEAN7/wyFbuEO/5gkZgjmt4TuxVm+1uCv/m81pYtDrIx0Uq65w/CfYgKse1 iZvw== X-Gm-Message-State: APjAAAXQRyaMdeV8X16m6uEk9Nb64S5uKAV2nW1Ksw3h/3witfJoCt3U hvAtCcLDlr2EZK7GazSli6SIOg== X-Google-Smtp-Source: APXvYqzJOe77pFpjrlEz89yVOZGhXXfIH84ndzVvrVax18jPyP6IqgKZAeGS6Ml8/v+lF+VWsmcTmQ== X-Received: by 2002:a5d:6390:: with SMTP id p16mr25132679wru.170.1581634277331; Thu, 13 Feb 2020 14:51:17 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 06/19] travis.yml: Fix Travis YAML configuration warnings Date: Thu, 13 Feb 2020 22:50:56 +0000 Message-Id: <20200213225109.13120-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42a X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, Wainer dos Santos Moschetta , stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Wainer dos Santos Moschetta This fixes the following warnings Travis has detected on the YAML configuration: - 'on root: missing os, using the default "linux"' - 'on root: the key matrix is an alias for jobs, using jobs' - 'on jobs.include.python: unexpected sequence, using the first value (3.5)' - 'on jobs.include.python: unexpected sequence, using the first value (3.6)' Signed-off-by: Wainer dos Santos Moschetta Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200207210124.141119-2-wainersm@redhat.com> --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index ea13e071795..0612998958b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ # The current Travis default is a VM based 16.04 Xenial on GCE # Additional builds with specific requirements for a full VM need to # be added as additional matrix: entries later on +os: linux dist: xenial language: c compiler: @@ -113,7 +114,7 @@ after_script: - if command -v ccache ; then ccache --show-stats ; fi =20 =20 -matrix: +jobs: include: - name: "GCC static (user)" env: @@ -297,8 +298,7 @@ matrix: - CONFIG=3D"--target-list=3Dx86_64-softmmu" - CACHE_NAME=3D"${TRAVIS_BRANCH}-linux-gcc-default" language: python - python: - - "3.5" + python: 3.5 =20 =20 - name: "GCC Python 3.6 (x86_64-softmmu)" @@ -306,8 +306,7 @@ matrix: - CONFIG=3D"--target-list=3Dx86_64-softmmu" - CACHE_NAME=3D"${TRAVIS_BRANCH}-linux-gcc-default" language: python - python: - - "3.6" + python: 3.6 =20 =20 # Acceptance (Functional) tests --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634536920448.88564960551; Thu, 13 Feb 2020 14:55:36 -0800 (PST) Received: from localhost ([::1]:60388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NOR-00036C-LM for importer@patchew.org; Thu, 13 Feb 2020 17:55:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39797) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKN-0004py-KX for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKL-0003qx-Kp for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:23 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:55063) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKL-0003oz-Dr for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:21 -0500 Received: by mail-wm1-x341.google.com with SMTP id g1so8045555wmh.4 for ; Thu, 13 Feb 2020 14:51:21 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n3sm4608557wrs.8.2020.02.13.14.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:13 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3E8D11FF96; Thu, 13 Feb 2020 22:51:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VpwFpiMNotiifqERZwrlUS7tMztF4zpdV9YKBtMwAzQ=; b=ZyRQE6MFUXogmCv7BXm5vq3qJTVllCYg50LkwvGBzIL427iRM2MbIUwYgS+XzgBr7x NiIwBvZzVJUPhjoRLRNvSAxwq+nwcPlFBmPnq360D+uIb4JKqzrHs9b77bLmsJAFE+Df APVrOzZ22gYxZ8FlPBZvRzwPk3VHq3277gWI3YfeQ21IclmDVqTFiV1+kqZu3O8EYDVT Vb6Qa32c5MXCC78OgkopuPKcU+IdBRwBufQQ9fQ2m5qoxIwABHmEOztBovYZkb/liGxh eiS20XzeiII1Tv0PmwelA2lXYiCVgtAh9vt1XxatN5XUe/iEvpXBa0coWoLY5Y/ghmxi NCqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VpwFpiMNotiifqERZwrlUS7tMztF4zpdV9YKBtMwAzQ=; b=owNnm0pP0LZJ25FcSB7aGbgdUXjL7yTTOneP+j6Hl0CR62Uq2PINEBLFAdW+SZo3+i YjS8L/EjhWxSaViDnDhbLxDATIkJ9NuSQPCcLcF3iOtEM9FrbxcLvkafbN6hFVce/sO6 exbo8Yowb6U89Z+dNdLyE8NUNHZw+B0FPfqE1gKZjwMaccpILlZrYRyOV1OONogUwIaY g6jzaILbCyo1MCqIjGOJ6PcN8DUW0/TBJN+RpiDw/CjLyxhID0eTmcpgm5XB2BZPF+Su QXhwSfXmk08eNQ5i9fHnAvNZNKdkDHbLTMVA7tl4jaGcSch33EGc5nNGaXSeim6wI32J ONwQ== X-Gm-Message-State: APjAAAUiRfY1FU2aQr4P2OcSndwZcF4ddyD+NBTjBjANMeHZphcSlkP6 BuORjooHPwno33VPQmeDPKijbQ== X-Google-Smtp-Source: APXvYqxAs6IXhXlxAR2sJ+fJIOZW2l6tuGG+RCLLhhZK2Rugs51Gxz9cUIJDX/q/4wqWphshnSYaRw== X-Received: by 2002:a7b:c94a:: with SMTP id i10mr325935wml.88.1581634280400; Thu, 13 Feb 2020 14:51:20 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 07/19] travis.yml: single-thread build-tcg stages Date: Thu, 13 Feb 2020 22:50:57 +0000 Message-Id: <20200213225109.13120-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This still seems to be a problem for Travis. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0612998958b..f4020dcc6c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -400,7 +400,7 @@ jobs: - name: "GCC check-tcg (some-softmmu)" env: - CONFIG=3D"--enable-debug-tcg --target-list=3Dxtensa-softmmu,arm-= softmmu,aarch64-softmmu,alpha-softmmu" - - TEST_BUILD_CMD=3D"make -j${JOBS} build-tcg" + - TEST_BUILD_CMD=3D"make build-tcg" - TEST_CMD=3D"make check-tcg" - CACHE_NAME=3D"${TRAVIS_BRANCH}-linux-gcc-debug-tcg" =20 @@ -409,7 +409,7 @@ jobs: - name: "GCC plugins check-tcg (some-softmmu)" env: - CONFIG=3D"--enable-plugins --enable-debug-tcg --target-list=3Dxt= ensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu" - - TEST_BUILD_CMD=3D"make -j${JOBS} build-tcg" + - TEST_BUILD_CMD=3D"make build-tcg" - TEST_CMD=3D"make check-tcg" - CACHE_NAME=3D"${TRAVIS_BRANCH}-linux-gcc-debug-tcg" =20 --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634640593409.24175988038894; Thu, 13 Feb 2020 14:57:20 -0800 (PST) Received: from localhost ([::1]:60440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NQ7-0005J7-Ci for importer@patchew.org; Thu, 13 Feb 2020 17:57:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39717) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKL-0004mo-Pd for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKK-0003p8-Q8 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:21 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:46656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKK-0003mt-G3 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:20 -0500 Received: by mail-wr1-x443.google.com with SMTP id z7so8724211wrl.13 for ; Thu, 13 Feb 2020 14:51:20 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t12sm4446150wrq.97.2020.02.13.14.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:13 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 532851FF98; Thu, 13 Feb 2020 22:51:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qYrx6G8+J0oij9Dy1s5nRsl6vpAyTX2kML2yVNSLhuM=; b=niIgQPui7NAxYOQJiLcjx7TnRxkZpFyCqQatN0LoVfQCb0MXPj5C3YJByjCx0lgyJI 6dZ4BbSXewrPQ3uAsO893PsPfc9Vtk04CH9lkeXHwEyZT2RFt9FTpVJvzVijqywQrQD+ xrJ015peFr1YdP2X32vb4o9SfxMiJSCkN+u4rN5UXmNBiJaufPv+nwwnOv4wbzNAxJUj WhQNAfzaEcFK+DZqW7DP4YwvcP4TcoR+LEhJODph0UFBm2j/L8JpmqOII7YttIiflYiK lLiLB4Fh7h/2QQhw+anvB6HIm0HSSBo4bJlGdUxPTMEx0SmAA7BW4CnDa3tIQH6ebZzi FXvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qYrx6G8+J0oij9Dy1s5nRsl6vpAyTX2kML2yVNSLhuM=; b=bl1XijWVXsixl5UfI26xGowKs5Z5tYexLvJWQ0qc1VkUgpMztJ/KI6+nYLqJqbN/WA qQKx5i2+kQfbANtUCYnZR9ou8DDfqnWfe0juSXUnAEzeYUXomqQPuJ6PtfV7RnsWTWwd 8gSm3M46aTiteSQxvQGPBDcHEwtfvcwDRnJWma2GSL5WzbYY2ImwIgk3VcerTZfzYcfo eFWCKZamNCys2Nr4bZFOoyTgM1fitvAFnmyVEkYONQ5MvBp72ao0VK5TokHCAlKAj5VM mtEyP55A2bVleFPXBERiR0vq4m7P5qCA8mEtHwCLjIPk52Zdp/z+Q8li/nFFy1zzHWPH 9seg== X-Gm-Message-State: APjAAAWH3iILoHYUKFDEaB/3NQpz0xKJu6h2uxXcoJlNkilB/rTnCe/6 TBKp6jq4Et22zIv/d0p9nSk74A== X-Google-Smtp-Source: APXvYqyOowDUAhA5GGlS5+UfE6RHgUsUBzb9MatMsM+U61SwKCOwoaQAdQnxU8IUp6hdDMq7myk2Rw== X-Received: by 2002:adf:e8ca:: with SMTP id k10mr22532315wrn.50.1581634279427; Thu, 13 Feb 2020 14:51:19 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 08/19] tests/iotests: be a little more forgiving on the size test Date: Thu, 13 Feb 2020 22:50:58 +0000 Message-Id: <20200213225109.13120-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Kevin Wolf , berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, Max Reitz , marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, "open list:Block layer core" , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) At least on ZFS this was failing as 512 was less than or equal to 512. I suspect the reason is additional compression done by ZFS and however qemu-img gets the actual size. Loosen the criteria to make sure after is not bigger than before and also dump the values in the report. Signed-off-by: Alex Benn=C3=A9e --- tests/qemu-iotests/214 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/214 b/tests/qemu-iotests/214 index 3500e0c47a2..6d1324cd157 100755 --- a/tests/qemu-iotests/214 +++ b/tests/qemu-iotests/214 @@ -125,9 +125,9 @@ $QEMU_IO -c "write -P 0xcc $offset $data_size" "json:{\ sizeB=3D$($QEMU_IMG info --output=3Djson "$TEST_IMG" | sed -n '/"actual-size":/ s/[^0-9]//gp') =20 -if [ $sizeA -le $sizeB ] +if [ $sizeA -lt $sizeB ] then - echo "Compression ERROR" + echo "Compression ERROR ($sizeA vs $sizeB)" fi =20 $QEMU_IMG check --output=3Djson "$TEST_IMG" | --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634864678620.66481199318; Thu, 13 Feb 2020 15:01:04 -0800 (PST) Received: from localhost ([::1]:60522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NTj-00026M-Av for importer@patchew.org; Thu, 13 Feb 2020 18:01:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40098) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKT-00054V-Qb for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKS-00045k-Nz for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:29 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:40373) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKS-00044J-Hv for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:28 -0500 Received: by mail-wr1-x441.google.com with SMTP id t3so8743687wru.7 for ; Thu, 13 Feb 2020 14:51:28 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s15sm4309836wrp.4.2020.02.13.14.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:20 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6BBD91FF99; Thu, 13 Feb 2020 22:51:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xiuLr2bgSRxDP5CJng9ok5G0lC9iDI/XVskdjRAUAgg=; b=agxIFFq7U6KXmq8jycm7mz8QZkjoKJOFtMkI+LTnroDyl3sQ+GWdwG/UpMaER6zmdt DzsgFWvRZeVmUuVLyReyGX37X9+poCJELXx8R7ZC1aUpqgNY71mxSOR83KdjZlnofQ9S Z1VKVeVDynaNviHwk8NzGb9z9q+Mgfq62eQMb0+8EjyRPSbGR5LVrhId69XfPbdOkQJT oEHTUihWmfQSKmFfv7VdotOJJVL7r4WyCDvMRgDtgQePozKo7AWbJAq4/YUEO5e3M9xU zGJDzMHE+kiKC3q/fRdDT4jJWgyi5q+/XQURahNyLhZ8VkKqmWo5DpKp8kWdhecfRj+D MwGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xiuLr2bgSRxDP5CJng9ok5G0lC9iDI/XVskdjRAUAgg=; b=G4YUQzFgVtPmwF0xq8+OZxfzShkrCIYj54i57lAviy1oNh8r9Q2s9OWeTLCseNJtWZ ThzCK5GAFqOUUatUyN23EuqVd6ldwkA8Is5kILwk2ekODV/G7sFt3q6fvc7V+W508Y/C etvaRj4GL+0SLgosFns9O9hOY9HRemjKcP7bJQKJY0g1HkkRaEiaq6D5GP3SPf1lnDSi AuB6voLt/r8pKm01MwK78eOIYZKTCvhiI6QAX6UbI11FKrQCVHZRBIDtxvbHe0+Y/WCf b+PFH3zLG6NmxsL5F5ZXt1trUt6CEFQdwS238woVW47trfJ/qlTjAEqsVFqnX2xYeMcy AgxQ== X-Gm-Message-State: APjAAAXNwFhl7fEQLrEmbtgpBaPf/FYCwQ+zg4yfrNb/FjTDxD4KkNCp QzRJncSqvz1ERiArG+OWc/y0SA== X-Google-Smtp-Source: APXvYqxgr+UUnwT3gcqjY1JqNXbb3ODr7reC59cjxIhx4KMQRI4qRpi/KJ7xNYRLorHWAlydlt6WJA== X-Received: by 2002:adf:ca07:: with SMTP id o7mr23308629wrh.49.1581634287601; Thu, 13 Feb 2020 14:51:27 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 09/19] tracing: only allow -trace to override -D if set Date: Thu, 13 Feb 2020 22:50:59 +0000 Message-Id: <20200213225109.13120-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Otherwise any -D settings the user may have made get ignored. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Robert Foley --- trace/control.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/trace/control.c b/trace/control.c index 6c775e68eba..2ffe0008184 100644 --- a/trace/control.c +++ b/trace/control.c @@ -226,10 +226,15 @@ void trace_init_file(const char *file) #ifdef CONFIG_TRACE_SIMPLE st_set_trace_file(file); #elif defined CONFIG_TRACE_LOG - /* If both the simple and the log backends are enabled, "--trace file" - * only applies to the simple backend; use "-D" for the log backend. + /* + * If both the simple and the log backends are enabled, "--trace file" + * only applies to the simple backend; use "-D" for the log + * backend. However we should only override -D if we actually have + * something to override it with. */ - qemu_set_log_filename(file, &error_fatal); + if (file) { + qemu_set_log_filename(file, &error_fatal); + } #else if (file) { fprintf(stderr, "error: --trace file=3D...: " --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15816346925871018.6530749415589; Thu, 13 Feb 2020 14:58:12 -0800 (PST) Received: from localhost ([::1]:60460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NQw-0006h2-64 for importer@patchew.org; Thu, 13 Feb 2020 17:58:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39943) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKR-0004z0-3R for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKP-0003yj-M7 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:26 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:55730) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKP-0003wz-G9 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:25 -0500 Received: by mail-wm1-x344.google.com with SMTP id q9so8048988wmj.5 for ; Thu, 13 Feb 2020 14:51:25 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l132sm4922715wmf.16.2020.02.13.14.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:20 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7FC8E1FF9A; Thu, 13 Feb 2020 22:51:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4d2JrUPmJz37MvIYKDE4vOLfs/ja0Fe0BZeISYiAcVI=; b=su5TYmbTV8EqVUvI5Rbzg++xTc3zln8HoL8+32e74qkFtxFme3rZfFMUwB/bqqArwH zeQxSZhMgsuIr17uoNkk/20cAJMM6CH5UnQ19MBBZmnDq0Lg3gL+fHJT+75eCJxeFwxO PIhowZcu76IyzM9NsrvaWdy8r27lcM3VBUgUMv3MTHiGHzyFbIyI9WvZjUwlpke7r5jj kWw26qdmvjevrml5wdm8ANmhvBQUNTSxUmuto9Ve7a2aKBMZUDAfUm8VFiKVhi+Tc6WX xdLZOBrFWT/WSC3NUM/8aoiCauYCbOd2v6Rb36iYPohrByQhXtHPFBMl4Bml/qCGlsTh kG0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4d2JrUPmJz37MvIYKDE4vOLfs/ja0Fe0BZeISYiAcVI=; b=YQH13jI1GsuZPpmKfnem/Ie1yup1PT6ucVWNxRydMH7enAce/oT9drM3qAdbN5PTJc kno/RZaI1Njkt1vAk4U+F6hAQN/C0/LTzOWn0LNczg9ly01/lLir+jmWHcWholtzFQ52 Hm41oIyTtCgkZywS5mrRPsRKQoGdGrckuS2L05t47hPTUyI2jmb9EbP0KpvBtVUjxcb7 ROwA+TSn7Qx93nQJuEOLM0fmJrCubBvwxrtFH3fr4tJcAZiH8cOXxWRTSqbcNHhaUE/G buz81o+TfgmIcDIc/SadOuTH1++ZboiHSsXek50ZSf2zKTgbFw6AWAMY+bAz6n2IsgYb /mSg== X-Gm-Message-State: APjAAAVzUa36OO/SgxQD77HbHs63irtKrJf9oOSYhj1DfknF9pqmhH64 Lki2th2slAeOl8YXV5jlmkHjDg== X-Google-Smtp-Source: APXvYqyIlGEVz8lwt+iG+rKsHv3uASXqYYYTgX9jLrt1lS2pAlGaccGZda8LAL5AvITmv7GSkEBUjQ== X-Received: by 2002:a05:600c:2207:: with SMTP id z7mr322928wml.138.1581634284473; Thu, 13 Feb 2020 14:51:24 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 10/19] docs/devel: document query handle lifetimes Date: Thu, 13 Feb 2020 22:51:00 +0000 Message-Id: <20200213225109.13120-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) I forgot to document the lifetime of handles in the developer documentation. Do so now. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Robert Foley Reviewed-by: Robert Foley --- docs/devel/tcg-plugins.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 718eef00f22..a05990906cc 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -51,8 +51,17 @@ about how QEMU's translation works to the plugins. While= there are conceptions such as translation time and translation blocks the details are opaque to plugins. The plugin is able to query select details of instructions and system configuration only through the -exported *qemu_plugin* functions. The types used to describe -instructions and events are opaque to the plugins themselves. +exported *qemu_plugin* functions. + +Query Handle Lifetime +--------------------- + +Each callback provides an opaque anonymous information handle which +can usually be further queried to find out information about a +translation, instruction or operation. The handles themselves are only +valid during the lifetime of the callback so it is important that any +information that is needed is extracted during the callback and saved +by the plugin. =20 Usage =3D=3D=3D=3D=3D --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634477970456.30152383927555; Thu, 13 Feb 2020 14:54:37 -0800 (PST) Received: from localhost ([::1]:60380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NNT-0001m8-Jl for importer@patchew.org; Thu, 13 Feb 2020 17:54:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40093) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKT-00054F-Na for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKR-00043o-Pz for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:29 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:45039) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKR-000410-Je for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:27 -0500 Received: by mail-wr1-x442.google.com with SMTP id m16so8716391wrx.11 for ; Thu, 13 Feb 2020 14:51:27 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z6sm4611285wrw.36.2020.02.13.14.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:20 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 946081FF9B; Thu, 13 Feb 2020 22:51:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+sU2DOJAy5PrRToddoYHzVOWw5lnsV1Rabg6J0Rymgg=; b=nPFWXlMiqA3G6Z05P112WIl+VveRrtQyHQN19D33o06FaBW3+VWDOZT/EhepXV5pXr 3SJxI/XrY1GBI943dAPusxk7oAaB2myge3DyBQNJdqYLakTmfMiuOkNC53iCXvESlG7B Ae4U4FXuwYbECD6QiS2TjfjGFmgABkA7s0WDi6i0ZmjtwAcjS5Lx2C+3IhB8VjvLf1Iw yuGVoIwDA2xnyBSQBTaIZ2txCn//DH5+ldehUHHTWbOGpXwWMQiw2MtDh0HWaokM60lE tKhHhcnz9GXXV/KiOfRGUiQEnXacs5zno/eg+k0/QynOxmaJeIZc5grjfMUsGHVzDli2 J8tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+sU2DOJAy5PrRToddoYHzVOWw5lnsV1Rabg6J0Rymgg=; b=gGvbmpLgx5KGLNxfqwbUa4YuGMn6XodfvEvBShiLDOzDEwDoadrdNfYxvn291bZQUk +UvddNoI6wjF4i4b7luJ7FrTf5sClwqVZ+sLrNVoK2qYsE3/F+FUp4/KChrGsLAOKR5A +ZhxfRalGUw6vezcYQ4/PWV/QN2iJ0LOQtKzjn335N7Hzt/U3nuwlznasIv57WJlS1c1 yB5JPR0GQNjG8b7S+rD82+DdN/Lkd1uvtCjFPtcGvoaKITUkT/WcwMjiz9+muwzo+a+F HX2kW/uFQB33w4ma030RsgQs8iqFRriUXJPR/tBnUhf/Zar/4a6VxY0LzfrUpK6BMyLu zDXw== X-Gm-Message-State: APjAAAVUOyHX9TP2YY3zRyhdNnPLHvTXNhzaXBp0THxzfi6VaB5vYic5 dW28yFdi0DzhEvw6Ofscx0s25A== X-Google-Smtp-Source: APXvYqwQDutcdza2g0qp3QKKlQM3/CSA3joG8w6AcNnzc4NExvYpCPn42L1EHV5VMUXU5dJ+/uLGig== X-Received: by 2002:a5d:5221:: with SMTP id i1mr22355745wra.44.1581634286598; Thu, 13 Feb 2020 14:51:26 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 11/19] plugins/core: add missing break in cb_to_tcg_flags Date: Thu, 13 Feb 2020 22:51:01 +0000 Message-Id: <20200213225109.13120-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, qemu-stable@nongnu.org, marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: "Emilio G. Cota" Reported-by: Robert Henry Signed-off-by: Emilio G. Cota Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-Id: <20200105072940.32204-1-cota@braap.org> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- plugins/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/core.c b/plugins/core.c index 9e1b9e7a915..ed863011baf 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -286,6 +286,7 @@ static inline uint32_t cb_to_tcg_flags(enum qemu_plugin= _cb_flags flags) switch (flags) { case QEMU_PLUGIN_CB_RW_REGS: ret =3D 0; + break; case QEMU_PLUGIN_CB_R_REGS: ret =3D TCG_CALL_NO_WG; break; --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158163501096926.811855445102992; Thu, 13 Feb 2020 15:03:30 -0800 (PST) Received: from localhost ([::1]:60614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NW5-0005yi-MD for importer@patchew.org; Thu, 13 Feb 2020 18:03:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40059) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKT-00052q-9j for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKR-00042G-8o for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:28 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:55728) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKQ-0003zK-W2 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:27 -0500 Received: by mail-wm1-x341.google.com with SMTP id q9so8049030wmj.5 for ; Thu, 13 Feb 2020 14:51:26 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w15sm4698048wrs.80.2020.02.13.14.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:20 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AAAE51FF9C; Thu, 13 Feb 2020 22:51:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PR3MIDvz3PtDDaollGFXmkX1Ue3lMr6ulNQeQQNdSxU=; b=HGy8wIBTjh4t+t0UcTdaF4nKqSFidG8Nzy8TP43VSwJ7xA3QuJwKqzhfg0tOlb+td1 RhzwZ+hVAHoz7hV2mntzn4VR5vk6q7NLN72XjpUbrmx1sEkQ5Hx8NhHc/VaL5fmMI76i FZMlLlSSdCeM4WTi26riXAe5p7rYxa+Gx4LLFOO9XJv+3bCnXbNbwakjLDpoMilcTSkM 0cxA3f3QnQFq/l8QJmaxls/yeHRS0miiJpLDfzU2PHdDawb8K27y+16taT0X2w8I6wbT XWMLXBFXI6GEiAHDNiJrak3o84kR7ZRhTUR2PsnKfFsB/b+FT6KW2W3AnKOq6baH1DjD mmYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PR3MIDvz3PtDDaollGFXmkX1Ue3lMr6ulNQeQQNdSxU=; b=tK6uE3UhUbF9W2FALvPHoa2RXxQ+fRe/uYzYFgJ4JnuPD0uXCBKdVC1ju2McSBdBdB EhBrzwz0SvZk2IzIU7AaNlIOCRJp0hjzllynDah7Gx/N8G48oD3J4LYSPkOoZ7M+1Z07 o/y5uHEnO8Lc3e/Be9u/+DVlVC1vbXejcDdOeFq5rZk8ISpwsvi0PKb/WIpRKgrb2IIg 4HNZ1N8YayFSovLpLqold34oGvRm4n07ArajkTz7RPqvQSdrp7hsbycJtsSWqqUoNHkB WAkIn0VWp/PcZBHVg3eCU2CJLxvpyDTYNfQo32KByWEZPqgpE2NCsS8Wmb/l/5Uui0L9 u2bA== X-Gm-Message-State: APjAAAWgj05n401qn5YURZMXI5UZalw69gKAFgNBRI0Ki6TVurRMnPjm w8zIkmcMoM4lTO79qqUtkCEj1Q== X-Google-Smtp-Source: APXvYqxTgiN1o3Q+dQ0mTQfcNpsXh9e+wirhn5EeQL4LcPZiT8+4V4WR27RCBlqDCv3vYRViWcqJ7g== X-Received: by 2002:a1c:df09:: with SMTP id w9mr276099wmg.143.1581634285619; Thu, 13 Feb 2020 14:51:25 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 12/19] tests/plugin: prevent uninitialized warning Date: Thu, 13 Feb 2020 22:51:02 +0000 Message-Id: <20200213225109.13120-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Euler Robot , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Chen Qun According to the glibc function requirements, we need initialise the variable. Otherwise there will be compilation warnings: glib-autocleanups.h:28:3: warning: =E2=80=98out=E2=80=99 may be used uninitialized in this function [-Wmaybe-uninitialized] g_free (*pp); ^~~~~~~~~~~~ Reported-by: Euler Robot Signed-off-by: Chen Qun Reviewed-by: Thomas Huth Message-Id: <20200206093238.203984-1-kuhn.chenqun@huawei.com> [AJB: uses Thomas's single line allocation] Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson --- tests/plugin/bb.c | 6 +++--- tests/plugin/insn.c | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/plugin/bb.c b/tests/plugin/bb.c index f30bea08dcc..df19fd359df 100644 --- a/tests/plugin/bb.c +++ b/tests/plugin/bb.c @@ -22,9 +22,9 @@ static bool do_inline; =20 static void plugin_exit(qemu_plugin_id_t id, void *p) { - g_autofree gchar *out; - out =3D g_strdup_printf("bb's: %" PRIu64", insns: %" PRIu64 "\n", - bb_count, insn_count); + g_autofree gchar *out =3D g_strdup_printf( + "bb's: %" PRIu64", insns: %" PRIu64 "\n", + bb_count, insn_count); qemu_plugin_outs(out); } =20 diff --git a/tests/plugin/insn.c b/tests/plugin/insn.c index 0a8f5a0000e..a9a6e412373 100644 --- a/tests/plugin/insn.c +++ b/tests/plugin/insn.c @@ -44,8 +44,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qem= u_plugin_tb *tb) =20 static void plugin_exit(qemu_plugin_id_t id, void *p) { - g_autofree gchar *out; - out =3D g_strdup_printf("insns: %" PRIu64 "\n", insn_count); + g_autofree gchar *out =3D g_strdup_printf("insns: %" PRIu64 "\n", insn= _count); qemu_plugin_outs(out); } =20 --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634736951424.52267681197213; Thu, 13 Feb 2020 14:58:56 -0800 (PST) Received: from localhost ([::1]:60470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NRe-0007I8-Kh for importer@patchew.org; Thu, 13 Feb 2020 17:58:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39859) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKP-0004uO-7e for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKO-0003vM-24 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:25 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:40769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKN-0003tQ-Ri for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:23 -0500 Received: by mail-wm1-x343.google.com with SMTP id t14so8602003wmi.5 for ; Thu, 13 Feb 2020 14:51:23 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 133sm5011722wme.32.2020.02.13.14.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:20 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C1CC41FF9D; Thu, 13 Feb 2020 22:51:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pTDgnQcfNCGcBS0F93StqkN1izWdDQLZMDSB8zlG3xk=; b=wAupu8999iU8ZRq1G6J3JcmKXOduih0GNkOBGU3ni68xoP8+uPPS5+YSa8E3zPgXnm otIcsd1RLkFtjO/WQgTGFQ87JgkQKDON13YYXpWczg4flAvw6siU2do8bIaK0pvzyd+H eE4qnH6HBb+26NabTWniFZtwsuc0GHBXEocjvVrvZKKv4LynsAKHEWi39slHJva7JX9p PukP2w9xK/vhMBzTY6kUK3fLKdAJfb92dtyufGPSSi7bwsVJYfTKescrR66MzuFK2+gV CvXRry5q2gtf/P2+nWZKJLRMQcYIhdPKAvxx8avZMgWCGfyMd6uaYR8eS8IqePKYkqA3 Mbzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pTDgnQcfNCGcBS0F93StqkN1izWdDQLZMDSB8zlG3xk=; b=rWNItzBjqvBWAYl425myw6qG8v8ZSbQB2BRT9G43UUVm7nqmY6qe/61kY5v5LyK4S3 MI6dq5ZpkTdTDfyya20KXxZvqAXEpsTNIaJGX/5Ca/6q3CpWURhj7KTTe4XcDCe772Zs khZFKkf7t7KeVNdBQua7qzAi7THTIe/jfauSZpVsXQr8vp4Q/Jkl4r5UWDW5k4XhJiRn NEUPpru2CZPiqbhDacHQ1Je4qybZEKkScqiYQWKGPnLNH31esg9n43tMC+kLvow9M/bK xn0SKwNFSSPcbW6eJY4eGFYH6CfyldaN7nxCiBW7DT7KRTLFx5slSAEar8GbJUUYlNFf OVYg== X-Gm-Message-State: APjAAAXoO5YQ3znXTaPpLc3nd0OLGFefDqB0q7GaCCdEsU+Uc8Nz5d31 5dWdJwAwRGXQ8JN1RkaEHyxG/g== X-Google-Smtp-Source: APXvYqwgtsD4C/qMAzlD6Qq+4hHlQGwZzNIJhFqoau0B7jU+a9htWXmkqS8AvidQJfBKutSotbzq9w== X-Received: by 2002:a1c:688a:: with SMTP id d132mr304265wmc.189.1581634282829; Thu, 13 Feb 2020 14:51:22 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 13/19] qemu/bitops.h: Add extract8 and extract16 Date: Thu, 13 Feb 2020 22:51:03 +0000 Message-Id: <20200213225109.13120-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, Yoshinori Sato , =?UTF-8?q?Alex=20Benn=C3=A9e?= , marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Yoshinori Sato Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190607091116.49044-10-ysato@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200212130311.127515-3-ysato@users.sourceforge.jp> --- include/qemu/bitops.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 02c1ce6a5d4..f55ce8b320b 100644 --- a/include/qemu/bitops.h +++ b/include/qemu/bitops.h @@ -301,6 +301,44 @@ static inline uint32_t extract32(uint32_t value, int s= tart, int length) return (value >> start) & (~0U >> (32 - length)); } =20 +/** + * extract8: + * @value: the value to extract the bit field from + * @start: the lowest bit in the bit field (numbered from 0) + * @length: the length of the bit field + * + * Extract from the 8 bit input @value the bit field specified by the + * @start and @length parameters, and return it. The bit field must + * lie entirely within the 8 bit word. It is valid to request that + * all 8 bits are returned (ie @length 8 and @start 0). + * + * Returns: the value of the bit field extracted from the input value. + */ +static inline uint8_t extract8(uint8_t value, int start, int length) +{ + assert(start >=3D 0 && length > 0 && length <=3D 8 - start); + return extract32(value, start, length); +} + +/** + * extract16: + * @value: the value to extract the bit field from + * @start: the lowest bit in the bit field (numbered from 0) + * @length: the length of the bit field + * + * Extract from the 16 bit input @value the bit field specified by the + * @start and @length parameters, and return it. The bit field must + * lie entirely within the 16 bit word. It is valid to request that + * all 16 bits are returned (ie @length 16 and @start 0). + * + * Returns: the value of the bit field extracted from the input value. + */ +static inline uint16_t extract16(uint16_t value, int start, int length) +{ + assert(start >=3D 0 && length > 0 && length <=3D 16 - start); + return extract32(value, start, length); +} + /** * extract64: * @value: the value to extract the bit field from --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581635356214545.6905797651119; Thu, 13 Feb 2020 15:09:16 -0800 (PST) Received: from localhost ([::1]:60728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2Nbe-0004av-UE for importer@patchew.org; Thu, 13 Feb 2020 18:09:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55401) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NTW-0002Rr-LU for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NTU-0002UX-S0 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:50 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:39525) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NTU-0002SN-JA for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:48 -0500 Received: by mail-wm1-x343.google.com with SMTP id c84so8644677wme.4 for ; Thu, 13 Feb 2020 15:00:48 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a8sm4904539wmc.20.2020.02.13.15.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 15:00:45 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D7EF01FF9E; Thu, 13 Feb 2020 22:51:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eMpV6oHUHsBouYuIbNXi5ILIhk0UHtJDCsWgmHAo3NA=; b=yWYuM7YLKyGrZb4442dJsx+3FP9M68tyeTgoIjDsy/KBHCLHqV5KYl2OB82ZG8T2z3 0irZnQLeJS0D71zNnIvuzHviUrfkUqRX538O+rbr6YTDR6XuoCGeBkNYmLc3WoOyshrp ydVvsSCAQyTSe3g0/skIhHY9ydPWVmFTlTGXutOFH+uo2ukrrP6z2EvWcOZawJd9ZAiL GhM3O62anngurZ8Fnea3fLmm1CRTyj/boxu5G3bjwogyTKh8CTOgryh3ApMOwg72jdbG HKy/bomz7fWgvyVK6bDmhG0lq1mSc7kwjYvaJUeToNAX+WiabNf9Z4r+rJ3SvHCQ+9D1 /V3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eMpV6oHUHsBouYuIbNXi5ILIhk0UHtJDCsWgmHAo3NA=; b=BEfLq2wBIc6LNvr10Z+JJUHkpo8TizEpLQx6Mmj5XZ3YXaQm7wjNXU7Ay2OGFmALMg XBUYOJjhtXqoSBb49ILygaVTEF7BUJ05Wzr8YWDvBEvQvYek3Hcoq2tsK4K8HE1W+T1I V1c1Uyb2IeMMe3nx9mprvqfDk3IrRDJDMD/3VoC1gVQk5vckeCu++QmyZvfEVli/sNZr epJnBAW0g4aAP+Zi3VJ0yc7KYgnN6Ug12gZA84/nJyNDrlIQC110JXGFResMCCFo16nE bjaTl6sgbDmQ3O5TxGyHjQyGLWPHHkpS0UKFWO/EUKLHlGF4MXjJK/FABByWR37ffC4m IExg== X-Gm-Message-State: APjAAAUA4zs67DTaQMjqNbJmTU+BYHM0NawON0NPwTVJ6ywLn3/ycbz6 EBW+yRMWTa4Fad7QNEDkFzhLVA== X-Google-Smtp-Source: APXvYqxFAebULEpqCErB+HkrKEnxog72/GKAQavzWaKmoa154Lgl0JBqMji0ONGsAf1ar5TMlUqbsg== X-Received: by 2002:a1c:4c13:: with SMTP id z19mr322801wmf.75.1581634847347; Thu, 13 Feb 2020 15:00:47 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 14/19] target/riscv: progressively load the instruction during decode Date: Thu, 13 Feb 2020 22:51:04 +0000 Message-Id: <20200213225109.13120-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Sagar Karandikar , Alistair Francis , "open list:RISC-V TCG CPUs" , stefanb@linux.vnet.ibm.com, aaron@os.amperecomputing.com, cota@braap.org, marcandre.lureau@redhat.com, robert.foley@linaro.org, richard.henderson@linaro.org, stefanha@redhat.com, peter.puhov@linaro.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , berrange@redhat.com, Bastian Koppelmann , f4bug@amsat.org, robhenry@microsoft.com, Palmer Dabbelt , pbonzini@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The plugin system would throw up a harmless warning when it detected that a disassembly of an instruction didn't use all it's bytes. Fix the riscv decoder to only load the instruction bytes it needs as it needs them. This drops opcode from the ctx in favour if passing the appropriately sized opcode down a few levels of the decode. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: Robert Foley --- v2 - use extract16 for uint16_t opcodes squash! target/riscv: progressively load the instruction during decode --- target/riscv/instmap.h | 8 ++++---- target/riscv/translate.c | 40 +++++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/target/riscv/instmap.h b/target/riscv/instmap.h index f8ad7d60fd5..40b6d2b64de 100644 --- a/target/riscv/instmap.h +++ b/target/riscv/instmap.h @@ -344,8 +344,8 @@ enum { #define GET_C_LW_IMM(inst) ((extract32(inst, 6, 1) << 2) \ | (extract32(inst, 10, 3) << 3) \ | (extract32(inst, 5, 1) << 6)) -#define GET_C_LD_IMM(inst) ((extract32(inst, 10, 3) << 3) \ - | (extract32(inst, 5, 2) << 6)) +#define GET_C_LD_IMM(inst) ((extract16(inst, 10, 3) << 3) \ + | (extract16(inst, 5, 2) << 6)) #define GET_C_J_IMM(inst) ((extract32(inst, 3, 3) << 1) \ | (extract32(inst, 11, 1) << 4) \ | (extract32(inst, 2, 1) << 5) \ @@ -363,7 +363,7 @@ enum { #define GET_C_RD(inst) GET_RD(inst) #define GET_C_RS1(inst) GET_RD(inst) #define GET_C_RS2(inst) extract32(inst, 2, 5) -#define GET_C_RS1S(inst) (8 + extract32(inst, 7, 3)) -#define GET_C_RS2S(inst) (8 + extract32(inst, 2, 3)) +#define GET_C_RS1S(inst) (8 + extract16(inst, 7, 3)) +#define GET_C_RS2S(inst) (8 + extract16(inst, 2, 3)) =20 #endif diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 14dc71156be..d5de7f468a7 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -44,7 +44,6 @@ typedef struct DisasContext { /* pc_succ_insn points to the instruction following base.pc_next */ target_ulong pc_succ_insn; target_ulong priv_ver; - uint32_t opcode; uint32_t mstatus_fs; uint32_t misa; uint32_t mem_idx; @@ -492,45 +491,45 @@ static void gen_set_rm(DisasContext *ctx, int rm) tcg_temp_free_i32(t0); } =20 -static void decode_RV32_64C0(DisasContext *ctx) +static void decode_RV32_64C0(DisasContext *ctx, uint16_t opcode) { - uint8_t funct3 =3D extract32(ctx->opcode, 13, 3); - uint8_t rd_rs2 =3D GET_C_RS2S(ctx->opcode); - uint8_t rs1s =3D GET_C_RS1S(ctx->opcode); + uint8_t funct3 =3D extract16(opcode, 13, 3); + uint8_t rd_rs2 =3D GET_C_RS2S(opcode); + uint8_t rs1s =3D GET_C_RS1S(opcode); =20 switch (funct3) { case 3: #if defined(TARGET_RISCV64) /* C.LD(RV64/128) -> ld rd', offset[7:3](rs1')*/ gen_load_c(ctx, OPC_RISC_LD, rd_rs2, rs1s, - GET_C_LD_IMM(ctx->opcode)); + GET_C_LD_IMM(opcode)); #else /* C.FLW (RV32) -> flw rd', offset[6:2](rs1')*/ gen_fp_load(ctx, OPC_RISC_FLW, rd_rs2, rs1s, - GET_C_LW_IMM(ctx->opcode)); + GET_C_LW_IMM(opcode)); #endif break; case 7: #if defined(TARGET_RISCV64) /* C.SD (RV64/128) -> sd rs2', offset[7:3](rs1')*/ gen_store_c(ctx, OPC_RISC_SD, rs1s, rd_rs2, - GET_C_LD_IMM(ctx->opcode)); + GET_C_LD_IMM(opcode)); #else /* C.FSW (RV32) -> fsw rs2', offset[6:2](rs1')*/ gen_fp_store(ctx, OPC_RISC_FSW, rs1s, rd_rs2, - GET_C_LW_IMM(ctx->opcode)); + GET_C_LW_IMM(opcode)); #endif break; } } =20 -static void decode_RV32_64C(DisasContext *ctx) +static void decode_RV32_64C(DisasContext *ctx, uint16_t opcode) { - uint8_t op =3D extract32(ctx->opcode, 0, 2); + uint8_t op =3D extract16(opcode, 0, 2); =20 switch (op) { case 0: - decode_RV32_64C0(ctx); + decode_RV32_64C0(ctx, opcode); break; } } @@ -709,22 +708,25 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, /* Include the auto-generated decoder for 16 bit insn */ #include "decode_insn16.inc.c" =20 -static void decode_opc(DisasContext *ctx) +static void decode_opc(CPURISCVState *env, DisasContext *ctx, uint16_t opc= ode) { /* check for compressed insn */ - if (extract32(ctx->opcode, 0, 2) !=3D 3) { + if (extract16(opcode, 0, 2) !=3D 3) { if (!has_ext(ctx, RVC)) { gen_exception_illegal(ctx); } else { ctx->pc_succ_insn =3D ctx->base.pc_next + 2; - if (!decode_insn16(ctx, ctx->opcode)) { + if (!decode_insn16(ctx, opcode)) { /* fall back to old decoder */ - decode_RV32_64C(ctx); + decode_RV32_64C(ctx, opcode); } } } else { + uint32_t opcode32 =3D opcode; + opcode32 =3D deposit32(opcode32, 16, 16, + translator_lduw(env, ctx->base.pc_next + 2)); ctx->pc_succ_insn =3D ctx->base.pc_next + 4; - if (!decode_insn32(ctx, ctx->opcode)) { + if (!decode_insn32(ctx, opcode32)) { gen_exception_illegal(ctx); } } @@ -776,9 +778,9 @@ static void riscv_tr_translate_insn(DisasContextBase *d= cbase, CPUState *cpu) { DisasContext *ctx =3D container_of(dcbase, DisasContext, base); CPURISCVState *env =3D cpu->env_ptr; + uint16_t opcode16 =3D translator_lduw(env, ctx->base.pc_next); =20 - ctx->opcode =3D translator_ldl(env, ctx->base.pc_next); - decode_opc(ctx); + decode_opc(env, ctx, opcode16); ctx->base.pc_next =3D ctx->pc_succ_insn; =20 if (ctx->base.is_jmp =3D=3D DISAS_NEXT) { --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634949074888.2796308286588; Thu, 13 Feb 2020 15:02:29 -0800 (PST) Received: from localhost ([::1]:60600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NV5-0004TA-Ku for importer@patchew.org; Thu, 13 Feb 2020 18:02:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55333) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NTV-0002PN-Jg for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NTU-0002T2-4v for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:49 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:56142) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NTT-0002Qg-TZ for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:48 -0500 Received: by mail-wm1-x32b.google.com with SMTP id q9so8070047wmj.5 for ; Thu, 13 Feb 2020 15:00:47 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a9sm4612064wmm.15.2020.02.13.15.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 15:00:45 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ED62F1FF9F; Thu, 13 Feb 2020 22:51:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=py9bcDZz909NEUPFg69hhSHq8thghQZDr3PiUGhEcOg=; b=HETjkqaCsZnbseyYwDHmOQypUJuhl3zS5WaQLTWTJL5QazZy0NBdJRmUtTpAkewGaK SVUbV9uNQlt8Z+AOsDo/ZJ9DFRASPWFWjILsSZo7u98tWhCLn0yLg0OKUsgP4lriIh+8 Xf1CAwBF9Q4b3X3Vo/C8OIXRoT6Cn1iFi9IO455MxPKYN1sJfD6AuYuZ4W6ipwUqr0y/ 7MhQFyN2B31x/uoRr2MiPaop/7YZ6UzxsR6YoIQNLwH4DjfGc/hGIxUcgjxIvHnLE6LW lXimG0kez3PmHttEOXn4GYM36yigxqoLvOE/0ebbQqGlnOpgod8e7bo8Dh08qObk+jUK hu0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=py9bcDZz909NEUPFg69hhSHq8thghQZDr3PiUGhEcOg=; b=RaAZDwE/f3HaPANDJlTTUSIxbB8EG2zpPRyFb3CmIutQSAWOm9c042gm2Ktw2yfy8l njg3cjb5FyzA0Zq12W/1wvmS9hvJoZwVuszPsyp+Gi9Ym/9vw3aBu/JsMlya/4+TtNLm qM8wwSGqioZGvO2RbPIRoEIbQ4ek94Sl1DqfmpK5N3Y2otzKX14w7w84EwNqEVPS43mq aCJEFKEOQ1ybNRZY0BGCILI3q7NiNspwPoaGsyLen91H3P5IhBpsbr2jzcKcbuHZBQ8/ 7kME+flc94+w4GjFmDOH/T6ApTX9OixGGsYl4uP89AJImCNr7xjxBUaEZswxPGmTaN6K J9WQ== X-Gm-Message-State: APjAAAXKQwnd/7EuBAcmaPWB6fPaHWW+TRKmwzCa8O7vw8MATo6e5xOB GLiWBjGZ/Fqg9xt0MfS0c8HFfw== X-Google-Smtp-Source: APXvYqzRizH25M2LRBGja+qk2XzA6wzbXAaCCmIxS9okVyW+WFRMLBLei6/2ls+4gBGcELD9LySPeQ== X-Received: by 2002:a7b:c3d1:: with SMTP id t17mr337769wmj.27.1581634846542; Thu, 13 Feb 2020 15:00:46 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 15/19] tests/plugins: make howvec clean-up after itself. Date: Thu, 13 Feb 2020 22:51:05 +0000 Message-Id: <20200213225109.13120-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32b X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) TCG plugins are responsible for their own memory usage and although the plugin_exit is tied to the end of execution in this case it is still poor practice. Ensure we delete the hash table and related data when we are done to be a good plugin citizen. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Robert Foley Reviewed-by: Richard Henderson --- v2 - re-use counts for g_list_sort() as it modifies list - drop it list squash! tests/plugins: make howvec clean-up after itself. --- tests/plugin/howvec.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/plugin/howvec.c b/tests/plugin/howvec.c index 4ca555e1239..3b9a6939f23 100644 --- a/tests/plugin/howvec.c +++ b/tests/plugin/howvec.c @@ -163,6 +163,13 @@ static gint cmp_exec_count(gconstpointer a, gconstpoin= ter b) return ea->count > eb->count ? -1 : 1; } =20 +static void free_record(gpointer data) +{ + InsnExecCount *rec =3D (InsnExecCount *) data; + g_free(rec->insn); + g_free(rec); +} + static void plugin_exit(qemu_plugin_id_t id, void *p) { g_autoptr(GString) report =3D g_string_new("Instruction Classes:\n"); @@ -195,30 +202,31 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) =20 counts =3D g_hash_table_get_values(insns); if (counts && g_list_next(counts)) { - GList *it; - g_string_append_printf(report,"Individual Instructions:\n"); + counts =3D g_list_sort(counts, cmp_exec_count); =20 - it =3D g_list_sort(counts, cmp_exec_count); - - for (i =3D 0; i < limit && it->next; i++, it =3D it->next) { - InsnExecCount *rec =3D (InsnExecCount *) it->data; - g_string_append_printf(report, "Instr: %-24s\t(%ld hits)\t(op= =3D%#08x/%s)\n", + for (i =3D 0; i < limit && g_list_next(counts); + i++, counts =3D g_list_next(counts)) { + InsnExecCount *rec =3D (InsnExecCount *) counts->data; + g_string_append_printf(report, + "Instr: %-24s\t(%ld hits)\t(op=3D%#08x/= %s)\n", rec->insn, rec->count, rec->opcode, rec->class ? rec->class->class : "un-categorised"); } - g_list_free(it); + g_list_free(counts); } =20 + g_hash_table_destroy(insns); + qemu_plugin_outs(report->str); } =20 static void plugin_init(void) { - insns =3D g_hash_table_new(NULL, g_direct_equal); + insns =3D g_hash_table_new_full(NULL, g_direct_equal, NULL, &free_reco= rd); } =20 static void vcpu_insn_exec_before(unsigned int cpu_index, void *udata) --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581635257601666.0904291517023; Thu, 13 Feb 2020 15:07:37 -0800 (PST) Received: from localhost ([::1]:60698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2Na4-0002my-E3 for importer@patchew.org; Thu, 13 Feb 2020 18:07:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55436) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NTY-0002To-3P for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NTW-0002Yc-KK for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:51 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:44158) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NTW-0002WQ-BJ for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:50 -0500 Received: by mail-wr1-x441.google.com with SMTP id m16so8737636wrx.11 for ; Thu, 13 Feb 2020 15:00:50 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b10sm4571268wrt.90.2020.02.13.15.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 15:00:45 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0D7FB1FFA5; Thu, 13 Feb 2020 22:51:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=780TgO1890Xq9etwy5Wkm9rG0nDBsWFiY9YYDt6ZXB0=; b=yUZ23rKNfHcb/7+jje5nJei7gtfYWb9MwbECCovDifWWM1ElS1b8RSoEX8aYqYYcfS wg5VEE5nN0RzGsitWjPpJ8Gf0kyhRYjG0c+snGdKBMDFUjeMybPHAhIbgYT7Kv/Ylctn DxCqfh+ITlOfZ2e+6Jo8dsHAWerimBI66k4tb2BbetiaXmnHqCb5/r0SUgO3VcxX1oG+ hdfIseZjPHsX1mI61kIUihGcuhQflj9aC+twGJbZgmUnLr4QQSYUNzKHl1PM1hGNVC/n qIgHdffQDrvnC4Z2h+YM9PWpqayrkOYTDpCmPIitTts6hSCot0pr9YIBY8X+3LK5JW82 Hlww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=780TgO1890Xq9etwy5Wkm9rG0nDBsWFiY9YYDt6ZXB0=; b=GWqMCSkaHM1B3VLbw8Tf6TIkWhiQRPcW/P0tt6+5hwFCObxKNMBfCW8zArr9gGLiKJ 2GAdRTEeV73HdTyJTTPXMHf6BcmxzDtvG9Pw1piP+l8nKz3YKgd9vYGKqXbVazLclcwE 2XcPt2gZMzVaqTc+eZ8dKGIBjHlnfo3p+oC9MADfHQUnhaLBGxKMLiacEy2gI/ZcesMy u3oU2hZ23jCfT8X2Aw0jSnHHjT5a2QKW+1+GwRo2clcKCz21b/YTT/UlWubwUxC7d3DX sm/MhUVwlZxginORHPUizqLm92JAop9qRO4l//CSKZw6vlAgn/mCsz044AtEY6wZW3jt r5pA== X-Gm-Message-State: APjAAAUVKfzGIeUvneWcUYqqC5m4/MnYXpd0HFrcCSvyMVo8Xbp8DoZE Y29ebvnbfHfHlMUu1fm1j0gSuQ== X-Google-Smtp-Source: APXvYqytrUaEPTqgIHaJh5Yp21xAKlW8FM8L/ZeVEfLmRIPBS1Rjv6NZsskn6ffp3uDk2DDrPC1hrw== X-Received: by 2002:adf:f401:: with SMTP id g1mr23420846wro.129.1581634849229; Thu, 13 Feb 2020 15:00:49 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 16/19] tests/tcg: give debug builds a little bit longer Date: Thu, 13 Feb 2020 22:51:06 +0000 Message-Id: <20200213225109.13120-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) When combined with heavy plugins we occasionally hit the timeouts. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/Makefile.target | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index 3c7421a356e..b3cff3cad1a 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -79,7 +79,7 @@ QEMU_OPTS=3D =20 # If TCG debugging is enabled things are a lot slower ifeq ($(CONFIG_DEBUG_TCG),y) -TIMEOUT=3D45 +TIMEOUT=3D60 else TIMEOUT=3D15 endif @@ -137,7 +137,7 @@ PLUGINS=3D$(notdir $(wildcard $(PLUGIN_DIR)/*.so)) $(foreach p,$(PLUGINS), \ $(foreach t,$(TESTS),\ $(eval run-plugin-$(t)-with-$(p): $t $p) \ - $(eval run-plugin-$(t)-with-$(p): TIMEOUT=3D30) \ + $(eval run-plugin-$(t)-with-$(p): TIMEOUT=3D60) \ $(eval RUN_TESTS+=3Drun-plugin-$(t)-with-$(p)))) endif =20 --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581635105837425.12462747553025; Thu, 13 Feb 2020 15:05:05 -0800 (PST) Received: from localhost ([::1]:60652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NXc-000894-Jd for importer@patchew.org; Thu, 13 Feb 2020 18:05:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40177) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NKV-00058V-4C for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NKT-00048a-QG for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:31 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:35928) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NKT-00046A-In for qemu-devel@nongnu.org; Thu, 13 Feb 2020 17:51:29 -0500 Received: by mail-wm1-x343.google.com with SMTP id p17so8613500wma.1 for ; Thu, 13 Feb 2020 14:51:29 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f12sm4702437wmj.10.2020.02.13.14.51.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 14:51:20 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 223FB1FFA6; Thu, 13 Feb 2020 22:51:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KXMngXIFaO7CsnyCy/hFBjzW3N8yM4HjBEk1iXtE1Sc=; b=hjLNs/VKAMUlMkReH7wRf1oxOUGeghpQBm9N2Hz8Mh4RmPFZGmz8ve/7deldGMwvWJ Y31gXGXoApTbx+/j7vnJSLtHn6Unkm6h1vWTY2zs4NrMWge6i6rxbU2Cow7eyH9ivIFe c+4jPnNJGjNqpc/i6AV+sJQFxeNuvJDWzRRflNE5Bh0DVUf655aKQs0iHASXt+LuJ4nQ SJqluhI0Hm4ra8vtzmknMo0JyNGHy66GcGi2FlWdqPjSiF3nrStJzPnkQzCCHqJGkBOT CQyKRmjN0F4iEtTgr7xcIUz3fcRLBrSNzavhmFyiy1iIfHlHuPdVQYdXtcp+5HuBS/lM fTKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KXMngXIFaO7CsnyCy/hFBjzW3N8yM4HjBEk1iXtE1Sc=; b=mUQ+K3awauo0kKqk9uvWjopLACZsUembMMa8gLpCssPi5mwX19RaKJ7BPSv+ifWrUJ 5j7vgY64B4uUFaQ4wg6+n0V4/d1M1Nq5IWF68EO/6EMT+9ZVofUkQWTPHGNZRInH5ogo NyY5BZ3GKlXNk4cs4nZSKhmU5l5mA9O71NHp4dzbq6KHyRq7KXIZqy6fHagIhJjO1Lpc YNumf0DldMK4S1kmWY+Ol4EMwCJG9AiNwjHKVt6FbznHZVPnbiYlxuwZEUXj7QfsLXyp IZu/t/nWt9KfgJgGTE5XCOYuloRcPcT3slJcjuV1byxGjffejkqaSsRpIXk1Mercrsw5 lLbg== X-Gm-Message-State: APjAAAVU7k6GdzxizQeY5yZRWFYvrWNy8B9tmArb7R91wRyCzBnEPJBH HCdQ8iycmKdzdBSLyqaWjv8hHw== X-Google-Smtp-Source: APXvYqzHK9ao6abtRObDnx63YVtYorm55G9DyZX8ipG9JSezk1MYyZzHSd977GhJblg7cVIRmYrnLQ== X-Received: by 2002:a7b:ce98:: with SMTP id q24mr297673wmj.41.1581634288590; Thu, 13 Feb 2020 14:51:28 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 17/19] tcg: save vaddr temp for plugin usage Date: Thu, 13 Feb 2020 22:51:07 +0000 Message-Id: <20200213225109.13120-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, qemu-stable@nongnu.org, marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net, Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Richard Henderson While do_gen_mem_cb does copy (via extu_tl_i64) vaddr into a new temp this won't help if the vaddr temp gets clobbered by the actual load/store op. To avoid this clobbering we explicitly copy vaddr before the op to ensure it is live my the time we do the instrumentation. Suggested-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Cc: qemu-stable@nongnu.org Reviewed-by: Emilio G. Cota Reviewed-by: Richard Henderson --- tcg/tcg-op.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c index 7d782002e3f..e2e25ebf7db 100644 --- a/tcg/tcg-op.c +++ b/tcg/tcg-op.c @@ -2794,13 +2794,26 @@ static void tcg_gen_req_mo(TCGBar type) } } =20 +static inline TCGv plugin_prep_mem_callbacks(TCGv vaddr) +{ +#ifdef CONFIG_PLUGIN + if (tcg_ctx->plugin_insn !=3D NULL) { + /* Save a copy of the vaddr for use after a load. */ + TCGv temp =3D tcg_temp_new(); + tcg_gen_mov_tl(temp, vaddr); + return temp; + } +#endif + return vaddr; +} + static inline void plugin_gen_mem_callbacks(TCGv vaddr, uint16_t info) { #ifdef CONFIG_PLUGIN - if (tcg_ctx->plugin_insn =3D=3D NULL) { - return; + if (tcg_ctx->plugin_insn !=3D NULL) { + plugin_gen_empty_mem_callback(vaddr, info); + tcg_temp_free(vaddr); } - plugin_gen_empty_mem_callback(vaddr, info); #endif } =20 @@ -2822,6 +2835,7 @@ void tcg_gen_qemu_ld_i32(TCGv_i32 val, TCGv addr, TCG= Arg idx, MemOp memop) } } =20 + addr =3D plugin_prep_mem_callbacks(addr); gen_ldst_i32(INDEX_op_qemu_ld_i32, val, addr, memop, idx); plugin_gen_mem_callbacks(addr, info); =20 @@ -2868,6 +2882,7 @@ void tcg_gen_qemu_st_i32(TCGv_i32 val, TCGv addr, TCG= Arg idx, MemOp memop) memop &=3D ~MO_BSWAP; } =20 + addr =3D plugin_prep_mem_callbacks(addr); gen_ldst_i32(INDEX_op_qemu_st_i32, val, addr, memop, idx); plugin_gen_mem_callbacks(addr, info); =20 @@ -2905,6 +2920,7 @@ void tcg_gen_qemu_ld_i64(TCGv_i64 val, TCGv addr, TCG= Arg idx, MemOp memop) } } =20 + addr =3D plugin_prep_mem_callbacks(addr); gen_ldst_i64(INDEX_op_qemu_ld_i64, val, addr, memop, idx); plugin_gen_mem_callbacks(addr, info); =20 @@ -2967,6 +2983,7 @@ void tcg_gen_qemu_st_i64(TCGv_i64 val, TCGv addr, TCG= Arg idx, MemOp memop) memop &=3D ~MO_BSWAP; } =20 + addr =3D plugin_prep_mem_callbacks(addr); gen_ldst_i64(INDEX_op_qemu_st_i64, val, addr, memop, idx); plugin_gen_mem_callbacks(addr, info); =20 --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581634961995302.44224870969117; Thu, 13 Feb 2020 15:02:41 -0800 (PST) Received: from localhost ([::1]:60610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NVI-0004nb-Kw for importer@patchew.org; Thu, 13 Feb 2020 18:02:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55409) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NTW-0002SW-Mk for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NTV-0002WN-Ja for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:50 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:51791) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NTV-0002U1-BQ for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:49 -0500 Received: by mail-wm1-x331.google.com with SMTP id t23so8082417wmi.1 for ; Thu, 13 Feb 2020 15:00:49 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e17sm4722373wrn.62.2020.02.13.15.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 15:00:45 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 36C4F1FFA9; Thu, 13 Feb 2020 22:51:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XyWMlP9lSq+SHEuFrUXA9vT/NjMQXbVZXYjMIeFpuFk=; b=BE+uE/QzmzIMit3y/U2+UjFQso1IN3d6c1aebqTkkHEK4r8hOBziUWkSJUXO2H9ANH 125hHcbkVqXkaxGXTuVgT+Xj/K6lj7Dlokr/BXAABM/AZiDZg0sGZXyH1PWJhId7ZoE9 FNXpmok+GI6Mt2ikFlVpdDioYE/4Mm2N+dOilRBw9s/Zo+aNl/ut6FBETUr+WQEvPtuy XCYl+RM2UQbpEAmxaPbTeQ5mhbqCGivIM+QH2P3E+t3jVvk1S2baQ1ZR91aR6NE8UOsA cpUMKgitoW4/K0r8jzD7Gh6NFmh8jA9KsqFk7NIh55JLqCxkQ3DBf9YoppOZ7LU5VL4w 6TeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XyWMlP9lSq+SHEuFrUXA9vT/NjMQXbVZXYjMIeFpuFk=; b=iCkmSc/VmKkdaMfmmmk4q54L41tGn3oS703BDUe3mLl2fTm6acm5ng3XZEIzK5qQI0 juuZQBTOCWOpqX6m0oN5tBVnh0+4g1NxDqsGa4CSIw9MT6aE12vG30ZrMI4JB0w1Nw4X eyhVOd3EZY3GVV3hjBBh3n9sIj6T819Ll7kmoojmMVRfpjFcixgxGffAb9vCI9Dzxqe4 0Tv5CcPN+ocqWKfPALOgeV3ewDz3fvW9tQUn4j/p8aFOT3c6X5rZmB2eZIrG7p1oR/1s UV41elOTpkadLpOxCaYH7twHIMF5r8cP6BmDk966cZZl0lhbZvXLQSS2QpeSZM0Kl1q2 8PRA== X-Gm-Message-State: APjAAAUXbFd+15fIIn35O5PZw7NItY8U9q0xpPiFKZLUDvhYJ0LxzASq up3GV0SBNErjKJ6zTfNEOO+qGA== X-Google-Smtp-Source: APXvYqxs9bpll6gQGd3PXZ6P9mqHQhmANao0vOGL1LIvg4DFQVm+k+hPh8ybusWgtw5FS66DT1kmXw== X-Received: by 2002:a1c:9e89:: with SMTP id h131mr313898wme.161.1581634848250; Thu, 13 Feb 2020 15:00:48 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 18/19] tests/tcg: fix typo in configure.sh test for v8.3 Date: Thu, 13 Feb 2020 22:51:08 +0000 Message-Id: <20200213225109.13120-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::331 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Although most people use the docker images this can trip up on developer systems with actual valid cross-compilers! Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- tests/tcg/configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 9eb6ba3b7ea..eaaaff6233a 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -228,7 +228,7 @@ for target in $target_list; do echo "CROSS_CC_HAS_SVE=3Dy" >> $config_target_mak fi if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=3D-march=3Darmv8.3-a -o $TMPE $TMPC; then + -march=3Darmv8.3-a -o $TMPE $TMPC; then echo "CROSS_CC_HAS_ARMV8_3=3Dy" >> $config_target_mak fi ;; --=20 2.20.1 From nobody Fri Mar 29 06:43:30 2024 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581635391330183.66430152466296; Thu, 13 Feb 2020 15:09:51 -0800 (PST) Received: from localhost ([::1]:60733 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NcD-0005Mu-OJ for importer@patchew.org; Thu, 13 Feb 2020 18:09:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55494) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2NTZ-0002Y9-PR for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2NTY-0002cN-G8 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:53 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:37339) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2NTY-0002Yr-4n for qemu-devel@nongnu.org; Thu, 13 Feb 2020 18:00:52 -0500 Received: by mail-wm1-x331.google.com with SMTP id a6so8652046wme.2 for ; Thu, 13 Feb 2020 15:00:51 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g15sm4363854wro.65.2020.02.13.15.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 15:00:45 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4B08F1FFAA; Thu, 13 Feb 2020 22:51:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LM7CKlGDQQ+uKXRKtjMMvs0F+UsijFwZIGBIi2qQw/Q=; b=qfVW2oUzLqRug/aLV6Y9TNPG2a5TkiHjAHWnpxNSLz56sNjjDscu/WsAQp13sji8V9 E8bJAgsrTnpjozDWbzCw3VRopqX0xuCFlo8b3WjBSwAeLWcVrv4Fyj9yQfZVGA7ff3fu 9Cva+Df/8rx6xOwVq1uhrEm0dNbTXNqEJSX3Xy7DD8f5sUs8nWct3+lw5gbS/BqexWfQ n0BMedHsC8kx/asNpCshF5LLbv0XLaMEN73l1svNbY/0Bp2YF2gVFaGm3s9y4fHW9oNZ CyX03PUQoMm79c/MJFCZsWdC7E6IYTQlRiS44Ylm33CrHuQmlejAIDD4f1nu5IostMBH py/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LM7CKlGDQQ+uKXRKtjMMvs0F+UsijFwZIGBIi2qQw/Q=; b=VwFZdl2k99zPE2ggOtt/JSgrokvwfNUtFpEpL+1fngdnAmcTELsYzzRDb2K9SUww7C TonHcudg60Yt4z5/FdWuA/l40YCgklt9J5ly0FdC9nw9M7LNS16SM+yCeXYDCpr7QZU1 E7a6SlLgF3EXWaW/qOexmKgcYPUh0o+1LQD/6YIyyQSlDwWcip2rB+p3rtx61CR2ppv2 pdui+BmjoJeQswF5oIyaTbgHUndb2G3LWfVVw8u6+uo8F0B/F9F+3kl/pOCHHgBE3VVw oGtUV9JDE5wKlQ8AqbTz24I02qSi/5Ncx+5HEIxRpbGnO9iD4vhIpTzQwLUNMfBiSW/j MUGQ== X-Gm-Message-State: APjAAAWgLTbScCgEcQrk4pp5KGaMXo55afRwXlwT69wKuRhUEu0dz/9F WbXo8r3aGraI52LbI0cwq2aVmg== X-Google-Smtp-Source: APXvYqy3FM1UHxkksxLUjLHga8c0vG8IxJhnXVTnC6gu4TEOl9s6AhuymItty/lTFFqo3SW0hZIywA== X-Received: by 2002:a05:600c:214a:: with SMTP id v10mr358086wml.182.1581634850234; Thu, 13 Feb 2020 15:00:50 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 19/19] tests/tcg: take into account expected clashes pauth-4 Date: Thu, 13 Feb 2020 22:51:09 +0000 Message-Id: <20200213225109.13120-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213225109.13120-1-alex.bennee@linaro.org> References: <20200213225109.13120-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::331 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Peter Maydell , berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, marcandre.lureau@redhat.com, aaron@os.amperecomputing.com, cota@braap.org, stefanha@redhat.com, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, "open list:ARM TCG CPUs" , aurelien@aurel32.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Pointer authentication isn't perfect so measure the percentage of failed checks. As we want to vary the pointer that is authenticated we recurse down the stack. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Reviewed-by: Robert Foley --- tests/tcg/aarch64/pauth-4.c | 54 +++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/tests/tcg/aarch64/pauth-4.c b/tests/tcg/aarch64/pauth-4.c index 1040e92aec3..24a639e36ca 100644 --- a/tests/tcg/aarch64/pauth-4.c +++ b/tests/tcg/aarch64/pauth-4.c @@ -1,25 +1,45 @@ #include #include +#include +#include + +#define TESTS 1000 =20 int main() { - uintptr_t x, y; + int i, count =3D 0; + float perc; + void *base =3D malloc(TESTS); + + for (i =3D 0; i < TESTS; i++) { + uintptr_t in, x, y; + + in =3D i + (uintptr_t) base; + + asm("mov %0, %[in]\n\t" + "pacia %0, sp\n\t" /* sigill if pauth not supported */ + "eor %0, %0, #4\n\t" /* corrupt single bit */ + "mov %1, %0\n\t" + "autia %1, sp\n\t" /* validate corrupted pointer */ + "xpaci %0\n\t" /* strip pac from corrupted pointer = */ + : /* out */ "=3Dr"(x), "=3Dr"(y) + : /* in */ [in] "r" (in) + : /* clobbers */); =20 - asm("mov %0, lr\n\t" - "pacia %0, sp\n\t" /* sigill if pauth not supported */ - "eor %0, %0, #4\n\t" /* corrupt single bit */ - "mov %1, %0\n\t" - "autia %1, sp\n\t" /* validate corrupted pointer */ - "xpaci %0\n\t" /* strip pac from corrupted pointer */ - : "=3Dr"(x), "=3Dr"(y)); + /* + * Once stripped, the corrupted pointer is of the form 0x0000...wx= yz. + * We expect the autia to indicate failure, producing a pointer of= the + * form 0x000e....wxyz. Use xpaci and !=3D for the test, rather t= han + * extracting explicit bits from the top, because the location of = the + * error code "e" depends on the configuration of virtual memory. + */ + if (x !=3D y) { + count++; + } =20 - /* - * Once stripped, the corrupted pointer is of the form 0x0000...wxyz. - * We expect the autia to indicate failure, producing a pointer of the - * form 0x000e....wxyz. Use xpaci and !=3D for the test, rather than - * extracting explicit bits from the top, because the location of the - * error code "e" depends on the configuration of virtual memory. - */ - assert(x !=3D y); - return 0; + } + perc =3D (float) count / (float) TESTS; + printf("Checks Passed: %0.2f%%", perc * 100.0); + assert(perc > 0.95); + return 0; } --=20 2.20.1