From patchwork Tue Feb 25 12:46:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183835 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1764940ile; Tue, 25 Feb 2020 05:39:54 -0800 (PST) X-Google-Smtp-Source: APXvYqxHuzjLvDHCDrHxsl8npATMV4lYNqIpmTgFxxz5bgUiCeg1Zp8kgwOD6R9caqx5Tv2sOwSl X-Received: by 2002:a0c:e58e:: with SMTP id t14mr48865952qvm.131.1582637994222; Tue, 25 Feb 2020 05:39:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582637994; cv=none; d=google.com; s=arc-20160816; b=EXMVpFE/pgJj4Y9n79bSEkRSbZzBIht8thK6I3laIgUkqxMfX72uIi/+s8VDoROHQC USmWz9DX3sqA/2Ru3Ulw73znSxcNg4gYGnk1yr4L8tQRbszKJVtBoU5UMqaXVvCdIJ02 ape/bicHd5QbN8HyRQJpAX4+7AJaYUpdfc8Yf7sj9tZ5On1uIGiG/OzLPeOJTDlH5fP+ Ryyl/skXpO6IOIddtN9+/56D2lhKvniBVV5c4klWN6JSiRHq8MT1oizyAnIIZf+Nl3T3 /mnEN/voQjs5aBVITK/IFj5O3mtnpVeu8Orye2UBCkqwKj1CxJPszwgTUxp/HmNTB8XG eGtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=GlBEWrYmHPRFA8Vm86nN9N2GJk+iLZ3w8i1wPytFKGY=; b=PXYLtG37v1G2hm9jhLkUGe1VvbUP1XVIFXwGboGNrrtvO/PZspIlFcgASLI8HSiIo6 v1u0SxydFkACqiTZwbLwPPo/yA5jqFGUKMuDtu6hcQnad6W5fZdc3M7vVxtxFCyKT7kl QzyWXlE4AtCxr9JzuftIRj0kDgPIvGlnt4r6vCrKapmSGYCh6O4VYt2J/lU3ZL9YuclP 6kfEpZ3cdiMcQoknkAhq5AmXKclyxauqNuxB6+E+rbDt59hXLO3QCqo5V2ZaqMJkoIzs SwVxwQlzv+gvri3WOjujeVqCrbibOmwNyvYBRrWEZqcOpnwQDFoZnIY/Z+g273lOP7Yb qakQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Gu/AyKWJ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h4si7537102qtp.117.2020.02.25.05.39.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:39:54 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Gu/AyKWJ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aRF-0002nT-Pi for patch@linaro.org; Tue, 25 Feb 2020 08:39:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59063) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcJ-0005IK-Dd for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcI-0007Av-Er for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:15 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:37650) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcI-0007AQ-8A for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:14 -0500 Received: by mail-wm1-x344.google.com with SMTP id a6so3025472wme.2 for ; Tue, 25 Feb 2020 04:47:14 -0800 (PST) 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=GlBEWrYmHPRFA8Vm86nN9N2GJk+iLZ3w8i1wPytFKGY=; b=Gu/AyKWJ2BHrNn9WhmPHTtWPKNEeUMzz4BiqBu6KeoGWPKpmz/Odi5KicyQNh0M5Mp w5GSChKDdBRu1aOU1AgAuXFHqzCul2a1ia3LCqW9TIXmYjdyVtKMN9IkgEY3tZuH82n/ lXEj+tahoF8cSFxf7fj6IFu3Z1xB7ejmGR/zPkQJGjJO6v/lajm8p5clP8hL7gc1H3oj 9O5KHW1AzeZoHmaky1akFdLhvaKpGOBuY/HXYs4Rctzey7aMz3BiXZQmhEM0dere9HBK MayXo+S4V+FR5gqeg3XGPHwci11WUlitriRs1z/ppw9Az17kXT51adtMgQqON2/Txroj 0GEA== 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=GlBEWrYmHPRFA8Vm86nN9N2GJk+iLZ3w8i1wPytFKGY=; b=IoZIw97qXTPIetnLuGPHJzO50S75/RPy1JPoffCflfKww/D6MqstYtISb7isTmZzzD GHVhzpltk2LYrkrw1XcBP0jkoGNIgWqqZ6raCVWyPGt0/4Pdn3me390HuYwPKqbWJyCx LJkdfcERK9S6zGakbF20Ha3TQbTplfoiOddXiVvVDty38YHlDHeI2Oc0bzm1G4qe22Ty dvUki/AsnElwZ8RzuQeNT+CsCTzFmscqyf6cVLC0xUvXYU8lY2Ga/AobPTF6OES9zlLg IGxif5+mNShL0qLAlrjR9Rssrh9rKPlaOddp3kj/2jhyA1EiDgJTb7YjKUNgnqwhC00Q oEJg== X-Gm-Message-State: APjAAAVTYWF+gPoDEXDTTTx8GLqeL80gNJJjHq+LHSShvaBPdxhLIPym wrDbojWXadHNd07Y76y77r2Ubg== X-Received: by 2002:a7b:c088:: with SMTP id r8mr5237126wmh.18.1582634833064; Tue, 25 Feb 2020 04:47:13 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b10sm23808009wrt.90.2020.02.25.04.47.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:10 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5BF491FF8C; Tue, 25 Feb 2020 12:47:10 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 01/19] tests/tcg: include a skip runner for pauth3 with plugins Date: Tue, 25 Feb 2020 12:46:52 +0000 Message-Id: <20200225124710.14152-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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, Peter Maydell , berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" If we have plugins enabled we still need to have built the test to be able to run it. Signed-off-by: Alex Bennée Reviewed-by: Robert Foley --- tests/tcg/aarch64/Makefile.softmmu-target | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 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 From patchwork Tue Feb 25 12:46:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183834 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1764563ile; Tue, 25 Feb 2020 05:39:35 -0800 (PST) X-Google-Smtp-Source: APXvYqw93eG0EGZsT1w7ijaHMtQhoa3lKrbGJz6O8HxU2NoxL0sxaUlIc13QrERrP0xjMcZggTZc X-Received: by 2002:ad4:580e:: with SMTP id dd14mr50770224qvb.84.1582637975646; Tue, 25 Feb 2020 05:39:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582637975; cv=none; d=google.com; s=arc-20160816; b=IGFaENX7M04Bd9vM7pzjtO92UcfgvftwFB31f+MskPFguVKHCfnlIlosugyGHj76dC b/K6V61a6vdU2/nnclFkH0rw6KSyi7RVIZKMqco5/D0xibmtMGTYw9ia2TAwb+pesW+e YaDLYP1pby6JUsd1ojKJ9lkODqmFkt3Yx/x3CaE43gUacQXqAPCZsWVXF2H4TTV6Xm6K zHuIuGcLnmmU1I/5aomKc4XL3HEPi8OLLn2f1WVq2BS9ID+eySp+G9gJLTsLzfUn6+WB LB/j0LB/2lQGoYGWMMP6QwihXw9QE5zOdy9pFlk6mQ50vcgsVbjT2+Z6i/iv9dSS2P3c rZyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=FlL6Bcf4soitUd0txOakm4oS8jrNtXcuMA7Ur/DGB9o=; b=oXSLNn7UqpbaMspHwGBMylwBl7rNfNSHhFu5ytFPsKgtXvsNqqJNp9MFkISLIlBY9A ZypMyLbm1mDvhQPUGCbyEjZe0cY0D1J3VJiCQLXVyRx1cx/eLiDQQDGVWnP1q6msxcod lt/drIcc/AyP2RgKnQJLgNhGwArycwbsOqELP4p+WcKhs6S5UOIIctSpiWuxc6Yy9Pmz 30fVRJed/XeYrjkLC3M1wi4OCZ4KPmSDYpOjKP6AFtC9ZVf6Rn9NpvySLl6gTuese8u8 hL0GYRq616AKexcXs1ZrOuQZi4QAoe0d5sB7jQG3SRY4HOoW8AXCRQyby3dDc0zZTsxi unig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="yzpLR4/G"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l184si8047413qkc.220.2020.02.25.05.39.35 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:39:35 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="yzpLR4/G"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aQx-0002KQ-67 for patch@linaro.org; Tue, 25 Feb 2020 08:39:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59092) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcK-0005IZ-Dk for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcJ-0007BS-Bo for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:16 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:52223) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcJ-0007B2-51 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:15 -0500 Received: by mail-wm1-x343.google.com with SMTP id t23so2867743wmi.1 for ; Tue, 25 Feb 2020 04:47:15 -0800 (PST) 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=yzpLR4/GSjEq8Vpb1x4S5WLc2cp3WDwrwTeZrZRKkT6rS3wqxx5VkLnSHIEfye4DXh z6gvN7SOmGYIp0X7Yf7MUMGuav5sl04G5SdfizTYnLtrSXMfuMdPK0t09xI3GrbCWGDT UfiFenbI0rePdE/n3ohManUdbat53r0SgxbOQpitNaQX93CLjpEsRP6DhWSfOcC9/gZO iw4vv3UvXawrPhadvvOFKmttaLdsyatKnAiXKPByzOef6bb1Qlgqr9TgGUduCwDcf2fA kkq855QPaDEqLGdLRlggvPL4jX+t7TalWJ05wOf0M60jkanaOmhOCjLJN2Gj/NDCDrwm yYvA== 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=DBYQd2xUh+Smzjv3WdB3GFVPXLEIiMKrIZaBjbxQp5vXfg9dlM7Sl03ZX1JfvyEW8v UlrNqC7/QetuMw6bhpGmJX7DH/MeLQTDLJd++p8jaWu0RJq+wOZrK3cR974GzYhuxDYK u13A4LvE//yg4xoUEcv89vDV8DCNEXHP/uTnc7yYT9VHJ/N2xV/Sv9LZNHldg9gkczV6 5McH3mMJqZIUtLKyGNhFNeVHFH+PIo/5HGxV3ULu2O9M0hOGQI9XxB24jwv17rT/51FY U/5ZdV3fcgLXzR1hc10llUhXtmylzUwYJPLTow72oKTl3U+wk+8jVVE0W1YhcXxzbEs6 h8eg== X-Gm-Message-State: APjAAAWHDuOXx05CoyytK8AFz/Irn78fUgrPRmDUlnU8QL0Abn+Ctvp6 aw7h95dl+AhVcKTQoUIuyeJFew== X-Received: by 2002:a7b:ca58:: with SMTP id m24mr2304593wml.129.1582634834239; Tue, 25 Feb 2020 04:47:14 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n3sm4048803wmc.27.2020.02.25.04.47.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:11 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 723A61FF8F; Tue, 25 Feb 2020 12:47:10 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 02/19] tests/rcutorture: update usage hint Date: Tue, 25 Feb 2020 12:46:53 +0000 Message-Id: <20200225124710.14152-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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_Benn?= =?utf-8?b?w6ll?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?utf-8?q?Philippe_Mathieu-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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Although documented in the comments we don't display all the various invocations we can in the usage. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/rcutorture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.1 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) 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); } From patchwork Tue Feb 25 12:46:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183837 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1765900ile; Tue, 25 Feb 2020 05:40:47 -0800 (PST) X-Google-Smtp-Source: APXvYqyQ0RecdM0MFIMTkUeBQadHYa4Z2rRO18iOsJUDfxuqpicb0RSlQVH1GB0VeWVWkvRdfDiV X-Received: by 2002:ac8:163c:: with SMTP id p57mr54394504qtj.106.1582638047199; Tue, 25 Feb 2020 05:40:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638047; cv=none; d=google.com; s=arc-20160816; b=xAYPGSDEmF57L6V/55pTDCuP4W37b6nv2HZpBNirrxWDyJhpg9Nl9yJGpX5LJDnVAR +vr6gOwj6UEArlN0LmhlEmWQHK0l5ciCWKYhkG1BmoGOPm5RnzOF5EResu9HF0su5Kdn rSAs3i4noTiwnvGNC1xaqYn6828pf5UCu/u5sYw0qXaENTjIhKPamPOj5IQ1OVsbc8t8 Apced38zqeI+matL6umXU1NfWZ2W+/0l07Ss2tLq/mxXhJhmdJm0d4ZKeG5IS++CeESh vsJuiu+fhnLmZdoc/Z1Q6FeNYVo6ooZoOeyK5pjBQLkTWksYnnn7WcEC3LbCYMmBTKyC 9ipw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=V4YbJuHMHTKZppvspX7lYfndG26GXtbu1NuW0h2HVeE=; b=ndtaMrRIwsDFvpEiq4H5pWdLQ72M5z3ggW6arSA/c7n5Hh3FgwX7tZ93Q+zVJy26h6 uJcphNhgAK+/cpL6cvo+T8w5HXP+ImRdAZbuUmG8owfabUWOmpxe90f5DfhzM4J2ZeT1 NSYeMdqpaFQYUMxPJcfuS2QwY9Yb6Vfy3kn8qUNX7MjQqlXLCowThnjJeEACg/Gb15IF R2HVEQLPpeW3VjXMDVMkmOuC9FwAOQANBRj5j/4ftjPz0qtMyd9twv7wAGnIL57QV4rO DgLvdTvSMF1D1/rW4lEWirTmn9x/VBgIJIPpjvLpD3zY0n4VlBVJl0gBOvxfWGudAqIV ogIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Wuf1amqS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 11si4084889qkm.369.2020.02.25.05.40.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:40:47 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Wuf1amqS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aS6-0004So-MU for patch@linaro.org; Tue, 25 Feb 2020 08:40:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59115) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcL-0005MO-Vl for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcK-0007CW-Vv for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:17 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:44705) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcK-0007Br-Pd for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:16 -0500 Received: by mail-wr1-x441.google.com with SMTP id m16so14544316wrx.11 for ; Tue, 25 Feb 2020 04:47:16 -0800 (PST) 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=Wuf1amqSb6UKAG6mhYgdyoZiZV1IQ6vCZpGsVhYf2nby1Vtx3XfNAEsb17LWHvARL4 XirsQO8AnDLr/Glnmn+xAmjVWHtswngc/ImRZ6mEodPOosUhKlbmCttXCC52syugLrN/ JX/Kkl+qtqNNNiTGu32234FM53bsZRXXcpu/yHhV28fYNRU7ZtJzNLbmfbUoQZZOoHdQ gU+ZrWyG51v44iIUJRzQTPb6+cg2wBGp88Bw7+Yb0j2YgfT45lldJVb2dfZGM1bjA9V1 oLdnGQ6tFNv+wICC4UcfhhHK5O/oC5oq6p7ZnqEueM61908hwTOC3NqZGa1t7hFImWjw LArA== 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=PdafRgygvD98hkBahNFBWkvV6KZhnTGU9Dc6LHi0PI0q3m9jKwjQa2ECLDgwcAvrzA 9kkMJzePQEJOTcsJhJ0/2DqLXMlDH8Vle/+m6z0khyD/SjuRmfg6BNggMFhNVECoGCON lrA4ORxkrgfKAQbYkTpo2QlaFqaLz78q4gee192jimp4BWyr2ebiflYi6AEmsN6J9dPc 4fkHrugDS+SVMn7UCtz8ddlobhpudSmQOgLi7vadg5r260RXAeX1Mf0QKoQTWHJibW9h E3KNitQQkL5mz4bHauYR/LYseNMGkjjiSchRXurzolLSEYftS0qBb29DuI9eUNXntGbr 1m8w== X-Gm-Message-State: APjAAAVgmb0KyoPwHupYWOpjoOYhFrrDFGv4t7+BiadNKyAVxDb/rIUC nmTyEttMKrBKB2WHVbsB4R6lJA== X-Received: by 2002:adf:94a3:: with SMTP id 32mr1769240wrr.276.1582634835609; Tue, 25 Feb 2020 04:47:15 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id d9sm24247090wrx.94.2020.02.25.04.47.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:13 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8866F1FF90; Tue, 25 Feb 2020 12:47:10 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 03/19] tests/rcutorture: better document locking of stats Date: Tue, 25 Feb 2020 12:46:54 +0000 Message-Id: <20200225124710.14152-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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_Benn?= =?utf-8?b?w6ll?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?utf-8?q?Philippe_Mathieu-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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is pure code motion with no functional effect. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/rcutorture.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) -- 2.20.1 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" -long long n_reads = 0LL; -long n_updates = 0L; int nthreadsrunning; #define GOFLAG_INIT 0 @@ -78,11 +76,20 @@ static volatile int goflag = GOFLAG_INIT; #define RCU_READ_RUN 1000 #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; +/* + * 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 = 0LL; +long n_updates = 0L; + static void create_thread(void *(*func)(void *)) { if (n_threads >= NR_THREADS) { @@ -230,8 +237,9 @@ struct rcu_stress { struct rcu_stress rcu_stress_array[RCU_STRESS_PIPE_LEN] = { { 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]; From patchwork Tue Feb 25 12:46:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183830 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1733813ile; Tue, 25 Feb 2020 05:11:52 -0800 (PST) X-Google-Smtp-Source: APXvYqyOh693sBb0LAdKAlp0+BrQlGQkxwRIHwQMxLUJ2iEGnRSp/ewzKWkCk/pjpIrHAQQTgG3e X-Received: by 2002:a37:8087:: with SMTP id b129mr6420585qkd.465.1582636312376; Tue, 25 Feb 2020 05:11:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582636312; cv=none; d=google.com; s=arc-20160816; b=lUMDgqPgyQRqu3pKi5ywpx9ZrBP6WRMOg3SWgWeAPI3Chgxq2mlH7SACUle5/YLcZH wNOfkcgfMd09XXYfsSiZw6URX3SLpGnMexujdizjRdTWkfLQ7iNYzSQo2cvh29Bafete Nh13MX0+5OpbnTuhlOjkcS154LHRUp9J7XE2OCOZ88WpRvOYMz7hQSppxGD316NCV/z1 Feqxh/sAhthvl8hLc6sWUpKWRX654stECbUMcVwZJfwgqxBnvHwQARv0YB/DjSyqiROd Lpc4nV1RwEofmoIvYlQv0qYR90a2i6n6RiNm0Z2q+mTFpqC09Q8toI9Q+T4Q41wwmDbK oUjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ehZlOYl+k4JKKy2JqV4YRUh/kizfHcJPE/yTLG5OZt4=; b=fgXFSP31S//4Yp2n38UEKTAiHoEyPRyZFE9wxZ/NHGjTICYi/ZshCd3vTAGlRKcOLH VarutUrCtGamD6pAsHxexsxXk3V4puV5L3UPcmS7ki3CM0TwyWc5LCbGofjnpP/n0Xgt JR4808Tf80dDvq47molMgb+GzaUqTxESELFrjPyN82dTGP9HmhGN9DUE+xVrfcp2uS+0 A2BupOI6IW9vhsg7+PWN/LylOH60cXLeRg4Mx/vjQSMSApHdU8mDN7IoACbGmcVKUwY1 dbF2u+i7AiosZpVE4Bo9itHGUDM4naXwx+8AUKgpdmw/QJRi6Nt9Iq+E6nvBN50M9tF1 4biA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KPIl2Wx+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z185si2184435qkb.269.2020.02.25.05.11.52 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:11:52 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KPIl2Wx+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6a07-0003D6-TS for patch@linaro.org; Tue, 25 Feb 2020 08:11:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59135) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcP-0005Rx-GF for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcM-0007DC-H9 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:20 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:44005) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcM-0007Cu-Ab for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:18 -0500 Received: by mail-wr1-x442.google.com with SMTP id r11so14577904wrq.10 for ; Tue, 25 Feb 2020 04:47:18 -0800 (PST) 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=ehZlOYl+k4JKKy2JqV4YRUh/kizfHcJPE/yTLG5OZt4=; b=KPIl2Wx+5QDyiLya+M8sfCr4gzw3NbTs5Cn9cbMIvPOA3VP+MG8KUQFREknhuG1nfr BVW31z7t3sdoxUXAbJjJ92FaP375jlHp38MmqKeCE39E6cr0QEzjBNX+jRLpPhe4t5NQ qdu+INCYb4dHyc/QBL0sHC3iPcIK8Xhx+IuFbrosvalV1sh0eYnD2Y59AbL2SUejUDWQ GV3zU2lWE4k9QsRfKWK+AroDSZbQuejmJrZc3WJNOKcfvmCOEWU3IcwjX1LZJgNGx07u lDBF39xvmM1tOFNoXa8S5iitpxlhB4R628w7W5Wi6b9Q1WzXJ1zfmSgeBwN5pOUzt7KC LPWA== 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=ehZlOYl+k4JKKy2JqV4YRUh/kizfHcJPE/yTLG5OZt4=; b=CIDA3jkUkEJ1OJ7p0r6slHcWv43ZSY7RLSp+W/GrkT70st+ejdp5kGKLnQy5j/xWPk rxkFG6NRctUR+J/atI6TnKSyAT5ENjy6eAlSmi2q8MANbzZ/NUj+u0FM+UbPVxTMGswo uz5bKZNiSThrHDucuZs8LIXYAnJbDQMMDB5RfxbRWQ1a/bOqK+LEOczsOR3gPU5++ZBk pTaJLNIETYVXJS3b9uTur19XgStkEITBmVpqMIZLCudoEBrqSbaxCJ3pJo2S7Xb6i5Yi QsdXbPLXOAhJ0xTTm+F2BFM8DetrH9rvd/CxxVYwtSfQSeduBH9F1rzBMzzMAuAkOTBN i6oQ== X-Gm-Message-State: APjAAAWNT7RjXa+wugxK5bTgvjB5CBAf2UXnVFcLujau1A7kZxBKt39u ATE8aXzwt3evnBo+0+stS4/+Sg== X-Received: by 2002:adf:ef4c:: with SMTP id c12mr74678723wrp.203.1582634837236; Tue, 25 Feb 2020 04:47:17 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w1sm24513111wro.72.2020.02.25.04.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:14 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9F5471FF91; Tue, 25 Feb 2020 12:47:10 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 04/19] tests/rcutorture: mild documenting refactor of update thread Date: Tue, 25 Feb 2020 12:46:55 +0000 Message-Id: <20200225124710.14152-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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_Benn?= =?utf-8?b?w6ll?= , 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Paolo Bonzini --- v3 - explicit atomic_read/set - rename pipe_count to age - fix whitespace --- tests/rcutorture.c | 55 +++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 18 deletions(-) -- 2.20.1 diff --git a/tests/rcutorture.c b/tests/rcutorture.c index 256d24ed5ba..732f03abdaa 100644 --- a/tests/rcutorture.c +++ b/tests/rcutorture.c @@ -230,13 +230,12 @@ static void uperftest(int nupdaters, int duration) #define RCU_STRESS_PIPE_LEN 10 struct rcu_stress { - int pipe_count; + int age; /* how many update cycles while not rcu_stress_current */ int mbtest; }; struct rcu_stress rcu_stress_array[RCU_STRESS_PIPE_LEN] = { { 0 } }; struct rcu_stress *rcu_stress_current; -int rcu_stress_idx; int n_mberror; /* Updates protected by counts_mutex */ @@ -261,7 +260,7 @@ static void *rcu_read_stress_test(void *arg) while (goflag == GOFLAG_RUN) { rcu_read_lock(); p = atomic_rcu_read(&rcu_stress_current); - if (p->mbtest == 0) { + if (atomic_read(&p->mbtest) == 0) { n_mberror++; } rcu_read_lock(); @@ -269,7 +268,7 @@ static void *rcu_read_stress_test(void *arg) garbage++; } rcu_read_unlock(); - pc = p->pipe_count; + pc = atomic_read(&p->age); rcu_read_unlock(); if ((pc > RCU_STRESS_PIPE_LEN) || (pc < 0)) { pc = RCU_STRESS_PIPE_LEN; @@ -288,32 +287,52 @@ static void *rcu_read_stress_test(void *arg) return NULL; } +/* + * 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 age. It + * then increments the age of all the other entries. The age + * 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 = 0; + struct rcu_stress *cp = atomic_read(&rcu_stress_current); rcu_register_thread(); - *(struct rcu_reader_data **)arg = &rcu_reader; + while (goflag == GOFLAG_INIT) { g_usleep(1000); } + while (goflag == GOFLAG_RUN) { - i = rcu_stress_idx + 1; - if (i >= RCU_STRESS_PIPE_LEN) { - i = 0; + struct rcu_stress *p; + rcu_stress_idx++; + if (rcu_stress_idx >= RCU_STRESS_PIPE_LEN) { + rcu_stress_idx = 0; } - p = &rcu_stress_array[i]; - p->mbtest = 0; + p = &rcu_stress_array[rcu_stress_idx]; + /* catching up with ourselves would be a bug */ + assert(p != cp); + atomic_set(&p->mbtest, 0); smp_mb(); - p->pipe_count = 0; - p->mbtest = 1; + atomic_set(&p->age, 0); + atomic_set(&p->mbtest, 1); atomic_rcu_set(&rcu_stress_current, p); - rcu_stress_idx = i; + cp = p; + /* + * New RCU structure is now live, update pipe counts on old + * ones. + */ for (i = 0; i < RCU_STRESS_PIPE_LEN; i++) { if (i != rcu_stress_idx) { - rcu_stress_array[i].pipe_count++; + atomic_set(&rcu_stress_array[i].age, + rcu_stress_array[i].age + 1); } } synchronize_rcu(); @@ -346,7 +365,7 @@ static void stresstest(int nreaders, int duration) int i; rcu_stress_current = &rcu_stress_array[0]; - rcu_stress_current->pipe_count = 0; + rcu_stress_current->age = 0; rcu_stress_current->mbtest = 1; for (i = 0; i < nreaders; i++) { create_thread(rcu_read_stress_test); @@ -376,7 +395,7 @@ static void gtest_stress(int nreaders, int duration) int i; rcu_stress_current = &rcu_stress_array[0]; - rcu_stress_current->pipe_count = 0; + rcu_stress_current->age = 0; rcu_stress_current->mbtest = 1; for (i = 0; i < nreaders; i++) { create_thread(rcu_read_stress_test); From patchwork Tue Feb 25 12:46:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183840 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1768812ile; Tue, 25 Feb 2020 05:43:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwwr8yR3+QlmT1cugNVCOj1pvr6zyNEOF+3AG8QZDHu3eZX2Ge3A7tQBUu+RqcH4KGRir6a X-Received: by 2002:a05:620a:1426:: with SMTP id k6mr55807218qkj.276.1582638217078; Tue, 25 Feb 2020 05:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638217; cv=none; d=google.com; s=arc-20160816; b=r9aYuaWlvqc70gc+NjwTb6YGiLNxf3WHT4BU/FE3YPxIeMqBDOebBrTkRRkpEZ8eZF jTTNBrlcdSPSYaWRHMD1sZrqR3BkNLZNAaTrf1Efq7KT1JpxX0OTMN8dwlZS2CkBYb+w uFWRcZbp74XLKN3M0X2ACq3WZcFCtIPQgpoHMFcIW4lRkxg4M7vFcr3ZSfZgpD/g6p73 fUX2bMA91DIkV8ZjHJ9dESqO67U8ehHbPZdwGCguihtCDSc2FE27UBW0VkONPCm7XN99 mG0h+5LQGxqzHyu2Y6Z2H1hi/PxN01qWe3MS09iSQkxWex0riydDd58Rj7xR0UFZlcx6 /bew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=mRJBG/zc2GQpI0clN99w+344ScpJbk+vuaXsTd83iMo=; b=0OOQrNWfHwdhXliPSF6OuJ2bW0QVbpzcFF+uMf/uj54rxsiYcuCQII6/Y1FI9WttyD IHiIcJDUs0+3ltR7XINygMmjujUF1h4megSqCqz3RNPLZm2j5TGTAHTUbXEma0LxvDMc 3sEAU4bVlYzf6e7qdLA6KazGxNZ9/CDnA9KYhg42NYlfx9j4+rDMm2LIFIYc+ybdrrpm HDLsS5AIQiTbL0a2NjW+rI7JjuNC7DgAenmjwe3VeQOtRDcVZDaiIeE/XeKnmiu8Cg35 SvrZgUTkwUWjk+ASnlIvJm7Ps6cqgHCT3eXVSW7rDRiYykgi3gFaarG25OAINE9f+O+8 zJvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=n+AbY7Um; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j21si7166138qtq.227.2020.02.25.05.43.37 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:43:37 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=n+AbY7Um; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aUq-0008Uu-LL for patch@linaro.org; Tue, 25 Feb 2020 08:43:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59170) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcQ-0005S2-UU for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcP-0007EE-NN for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:22 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:33564) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcP-0007Dj-Hv for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:21 -0500 Received: by mail-wr1-x42d.google.com with SMTP id u6so14616759wrt.0 for ; Tue, 25 Feb 2020 04:47:21 -0800 (PST) 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=n+AbY7Um9xYuIrtBkAFUKLevPWbgJZdXMshg6eU1D+SJb2q5SS0ezY9ImwPmFXDDGE 1H66VkJm8Tj6dDBmkT0AqOkDIjynUBnHOvJZaucKq/dJeik98xE0qfGEi70ojVcRwoFp ufRT2CJtSacs1507bXfuumLHfSFNNaExCNqqNw3Y8M2boF24OqCxpmCNvyet7RMFeh+A lpQBrriDjxLRZE2BJzkMRSb4nvzdUsj+tB6/IXSzSEhNFoEH0ESBakTAibcUEANw5//5 qi5V3Optfzhu/J89MGQ/cN5imP3men8337MijfA3LUYG5LwkwexynFrI8b393kVAzKZs Cqxg== 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=MwAHJX6ylQylHvOf8NgfseMi4dcgT+wrp35mhyqLkp1+h6+T5XR4HyIbS3x+pxCGlr YAOwo3lmFI0JIbNUeHHs7Wc3HYmULrbuokYWS92bjS4xljuM4NHyMYquheO2eJt3fzxN 56tsBPAwL2xdXyJLE1RA+BZ5/rKA2JccNVifn7vx32LK8A8HQqLbqsoXCNJClR/TJqD9 7b5ZAZ/swXNpKYt8w++TOl7Qf+skVdNHIWyLF5Ft6W8QJ0ENJD6KnMqHIRMbrPBLFUGT nBVkdTV3wN5DlujVaw39bfvek6Sa4snGwjAAcdyCMNLzxMkTGe9hPdB3gEbbxuBDe0Np BesQ== X-Gm-Message-State: APjAAAWnU01p+uPh20eu9G+E7ZtSPJ99WaAXdwMVvoAc2QYjqtQiYMgu RSjwAZ4MGm/EUHathuIy3iqmCA== X-Received: by 2002:adf:f091:: with SMTP id n17mr70531397wro.387.1582634840115; Tue, 25 Feb 2020 04:47:20 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t10sm2666271wru.59.2020.02.25.04.47.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:14 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B726E1FF92; Tue, 25 Feb 2020 12:47:10 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 05/19] travis.yml: Test the s390-ccw build, too Date: Tue, 25 Feb 2020 12:46:56 +0000 Message-Id: <20200225124710.14152-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42d 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_Benn=C3=A9e?= , Cornelia Huck , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?b?YXVkw6k=?= , 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Cornelia Huck Message-Id: <20200206202543.7085-1-thuth@redhat.com> --- .travis.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.20.1 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="make check check-tcg V=1" - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user" + script: + - ( cd ${SRC_DIR} ; git submodule update --init roms/SLOF ) + - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$? + - | + if [ "$BUILD_RC" -eq 0 ] ; then + mv pc-bios/s390-ccw/*.img pc-bios/ ; + ${TEST_CMD} ; + else + $(exit $BUILD_RC); + fi # Release builds # The make-release script expect a QEMU version, so our tag must start with a 'v'. From patchwork Tue Feb 25 12:46:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183838 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1767097ile; Tue, 25 Feb 2020 05:41:57 -0800 (PST) X-Google-Smtp-Source: APXvYqyYHUJU+k8cy21ubVzdMbGJ9DT/jNTijttWzlGzxfaBgShpibo5Cw9igWK3lHY97uYuoN3p X-Received: by 2002:a37:5285:: with SMTP id g127mr55033683qkb.315.1582638117634; Tue, 25 Feb 2020 05:41:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638117; cv=none; d=google.com; s=arc-20160816; b=VvYQgL0ZIwzQ/5XhM4M1Tm6u0cn8048rFS6ZbEsGRlMq1jTUyxxnse6rkBWTtvKcS+ C/cQPirlw5Yf3nsTxh1fCHw0BpmyjVBd7q8fFjBvVddaNsl4U7rX/mJhegk4GpMFadz0 i2r07l0Ltle5KiiGBkoTITBvOIy3B0stQPoJ1R14cocWxgA+kTZkBd/rcjAThIvIViQX 6/iZbhunY6eLYJ5n0nCdU+NHqX0tIYOR/gdnN/Riy2ca9sZb0uTYaXxcpH8E8PrequbU ExR33MUP4+O8Rq3ckWRHu0G6BDca2iw7YuF3STPeL2DRwq0MYVkyur138HNJ8uqcPKAt Xs/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=xk2650h3wDm/dF48W9ZCLpoRo1e5nZQvUV6vRqejydc=; b=NKlHko5/gIzSPQ0OBdjhqy02cx7/6Giv5nwracI1WcYJPhAaDkHkG5WsB4EXlr+TNI eL2vNnjLD6jISuBrQUgGHyjUuc1dBgefhNVi8jb8Q4yOuH5LoyC9yHEoD48mf/RqbVeP 4msWrbHtOxK7JuM9BqG4E9TKMUc031AS81TxG6PFQgqHf70f9XBDiHwILTDDP+XsVyQ3 9RHubfzXnIGC6zpko6ZwwQVwF9wKdD+dwp2500loWolhFDBrIvGWn6XdvzZ83H+fmRKB L1V5rbGiyhpuih0WGUusSjFYa4Pz4kW7uxxkTm5VggwF4ZuaINBlHsdl4I+htHGPXj1z t5+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BvazD4rQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j15si8128757qkg.108.2020.02.25.05.41.57 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:41:57 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BvazD4rQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aTF-0006SM-6k for patch@linaro.org; Tue, 25 Feb 2020 08:41:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59154) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcQ-0005Rz-5F for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcP-0007Dt-78 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:22 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:52245) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcN-0007DI-FI for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:19 -0500 Received: by mail-wm1-x330.google.com with SMTP id p9so2867185wmc.2 for ; Tue, 25 Feb 2020 04:47:19 -0800 (PST) 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=BvazD4rQiFWfFCDxTfrXAHYChj5fheyaui8xXIyDSlNBhelM35UVRAa5WxzVb9i+VG OpPM31Lh9TY2J/8VHTaC0sSJc7fyTof1M38K4jDThh0i8u1y/1eA3eOYygAH1q7ahBTW RNrhyDlJyZk2Km+dlYBR5f+fmTq1qP6aWBcHcRQk5SBChthfXHqLtZu9Ci7G7LoWwaW7 hQOc7v39+gBE/2BhMHx54r/1md5XbcvZSBzeVhwfjGkB9PhzVqHGXSGfEzuaqKWm1gbJ Dd9LRXEtO4PSqvRMPKkq7TYpGR0vbBLxIh9e+utGhdyWdMnD4m2VY2VIdzhXYb6YlXUq OKHQ== 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=Vd4b6jHtAeHAKon+hTWJpiD26PgTTPCy/IEPxVAcY75WV7t9s152nNvv4y6ySWKyTa XCMqXrmIpDQWwFa3uEno22n1gl0Md9l7A2i90iAdP4L5BGVK3VAkLKc111UePmlduhrP m6krOFu6ARV2rVkHP7iIA6PlSHrDDeOZCk/ukCcKjxhntSZoEQXy96wgP12j5z5REAx2 iLhN0LdwduS2ez1s+gK5CVa9hNKr9FRYc8nhf1Gbf1ggV0WD5OjE9ESqKnpRV/dG5B2E zPc2m9zaQ8y1XZyC1rrF0zwuldZhGMTnNkKufLHIWynVcHS+YsFSxmE0Rv4Qjj1QKnHh Au+Q== X-Gm-Message-State: APjAAAUWR4WZd2CwzkMfX66l4xvrDj+NHjRvZjRgrh4XMcYYGniehqlL hjP0hyuDx/P6xId7eFAPfHR0oA== X-Received: by 2002:a1c:ddc3:: with SMTP id u186mr5224749wmg.103.1582634838345; Tue, 25 Feb 2020 04:47:18 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 133sm4459335wmd.5.2020.02.25.04.47.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:14 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CB8E61FF93; Tue, 25 Feb 2020 12:47:10 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 06/19] travis.yml: Fix Travis YAML configuration warnings Date: Tue, 25 Feb 2020 12:46:57 +0000 Message-Id: <20200225124710.14152-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?utf-8?q?Philippe_Mathieu-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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20200207210124.141119-2-wainersm@redhat.com> --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.20.1 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 -matrix: +jobs: include: - name: "GCC static (user)" env: @@ -297,8 +298,7 @@ matrix: - CONFIG="--target-list=x86_64-softmmu" - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" language: python - python: - - "3.5" + python: 3.5 - name: "GCC Python 3.6 (x86_64-softmmu)" @@ -306,8 +306,7 @@ matrix: - CONFIG="--target-list=x86_64-softmmu" - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" language: python - python: - - "3.6" + python: 3.6 # Acceptance (Functional) tests From patchwork Tue Feb 25 12:46:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183831 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1735869ile; Tue, 25 Feb 2020 05:13:34 -0800 (PST) X-Google-Smtp-Source: APXvYqx2BDVvjVTUNzUFYKGb6aPO3slMkWXfcY1GQQtOjz9E8lot/slwq6eVKiiA8WCejarRQNwC X-Received: by 2002:ac8:7776:: with SMTP id h22mr34849944qtu.126.1582636414158; Tue, 25 Feb 2020 05:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582636414; cv=none; d=google.com; s=arc-20160816; b=yD0KqiqUvq+W69jKr6xc+NRBBd4e0oWAuFgZMC+/eFTRLBWuig/1OJ067NMxcFd8q+ nmxQBSIL+PiM8EWh2lOm57gzGymjmId+Kpxr4nC+naqD7JkpUyYvwXRAPkHVsnS1fG4u 4yNjdQAVMCTj0/LjPa0llzraa+gKXhQQSg7N4hrDck7ujPtMP05m7lq2+inaXlblb9tC YbbPSgO2cQ0voh2wGuvmIaLtHHjss1P9y4qQLvFxSZLPoVC8lLUJ4+Ke486PLx+ek52i 3QOPH6v6N0apoo/FwaeeDbvpy4YSlWaCtExqpYXqtTxOBmFLb3cagzYJOLEBaNhq/3V8 fO7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=tZ+q8+KjTsBsafkEv1L9oog5zVBd33ptYwGvTAYVmPc=; b=HIfvzvMNdBlLhyu5YtNdMgKUiToZo9uYewa2Kk8tumearo73n3Ji+hPI2zwQ0NV/T3 KLNtPBBsItlcb2G0XKfCTg14KNkR5166LG5ej6ryAH37mWG0fFpoxGWD3Y1wgUuhg+2b aM68s3oV36ek6aQaMdDd08GPKVMEb+gUCgSir511d8hAxWuNNeUvfMrrKSJHlX3Ns3ob s0YmRMqnnGGBaBoSPTyZFyhhI1bYBEnKwB6ZmC9Y52eI+Ok/XTxbG1CSR1PdlaGkBFbC PNZRJDHloIHlcbvwpn7X0wj/gZ0vODZS0/N0lug2Uxc/zlRb9GTZl9iZaAoJ2lqMD7tP 9SEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=uCZomt62; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ej1si6636532qvb.152.2020.02.25.05.13.34 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:13:34 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=uCZomt62; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6a1l-0005b8-LO for patch@linaro.org; Tue, 25 Feb 2020 08:13:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59196) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcR-0005TH-S5 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcQ-0007Et-Vf for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:23 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:44006) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcQ-0007E9-Nc for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:22 -0500 Received: by mail-wr1-x442.google.com with SMTP id r11so14578166wrq.10 for ; Tue, 25 Feb 2020 04:47:22 -0800 (PST) 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=tZ+q8+KjTsBsafkEv1L9oog5zVBd33ptYwGvTAYVmPc=; b=uCZomt62GTRNms/KFdYdUa9expV/lcusEpBK2bfj1LVOCRKElT2TzJ6BRtB3LFl5ZY DrUOc3ORBts+RiGmsdJ0PZaNt8zyRI1yuw0diQ0tF5sygAHW9WgNBVm5Y1IOwLDIh66Z mIAJ3ymrQqKQ6TDybDSsl7GP7joKU+NxILEqr8JQaBr9QQv6r0/r5w0insB9jm5URM4o gGFm6faDFBjWMSIZsuOoyoMcPD1QSAzXhHlENa1vRZVODKCWczYn8JL+TCLSNt+voqZb U3gxD6OJMfkHHFGuMN1VGViV7qZafyjMOZQXDS70LvlNox8UqZZOTiZ2JXJpTyCXb9Xh lOcw== 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=tZ+q8+KjTsBsafkEv1L9oog5zVBd33ptYwGvTAYVmPc=; b=BooUwj6iIszZ5cbgesRF1xjxMJ3XJL75yPyOvxCuOrqbTl7pxUObeKsQPsQZY55Qvr sbT+0n/F04spDsvW8y19KZGLfny/2hDC07WNfRBva5Zczh79qY2yYllkn1/dHyU6cGv9 lIT/6hPa9EqeTJuYsORLRH44pzKI64MaPu5MFCBNLSApJqQGNUoF5bW7gjiMa9sUmN14 VMlQMKu73NF0pP5cuUaXuDfS9H98DTkZ1E31yrFDuf4SiauKTbWS4Lna2cDHIXi7ZpqG 5R6370ToqZfS1eb54ah7G4RxSzMm/QzTDT7Z9PAdSd2HafX4d6xqaHqWpPbLbSe/ibIk b7Nw== X-Gm-Message-State: APjAAAUJkSwUms+rRyU1FMLBvFnr40SHuPyJDM+a3Br4LxJM9bPuPD4Y TrFXjWMaFGsvuEQPaoG9hCqel8H/Kbg= X-Received: by 2002:a5d:63c7:: with SMTP id c7mr11142662wrw.115.1582634841265; Tue, 25 Feb 2020 04:47:21 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q3sm3552540wrs.1.2020.02.25.04.47.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:15 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E1DCF1FF96; Tue, 25 Feb 2020 12:47:10 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 07/19] travis.yml: single-thread build-tcg stages Date: Tue, 25 Feb 2020 12:46:58 +0000 Message-Id: <20200225124710.14152-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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_Benn?= =?utf-8?b?w6ll?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?utf-8?q?Philippe_Mathieu-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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This still seems to be a problem for Travis. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 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="--enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu" - - TEST_BUILD_CMD="make -j${JOBS} build-tcg" + - TEST_BUILD_CMD="make build-tcg" - TEST_CMD="make check-tcg" - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg" @@ -409,7 +409,7 @@ jobs: - name: "GCC plugins check-tcg (some-softmmu)" env: - CONFIG="--enable-plugins --enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu" - - TEST_BUILD_CMD="make -j${JOBS} build-tcg" + - TEST_BUILD_CMD="make build-tcg" - TEST_CMD="make check-tcg" - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg" From patchwork Tue Feb 25 12:46:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183826 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1709192ile; Tue, 25 Feb 2020 04:50:17 -0800 (PST) X-Google-Smtp-Source: APXvYqwX/3xcQ0FQEmIjTTWHkD05jRk3bNdy2M5Gwn3SCUtNdtnfKKGyfdNnPfIeK6eI/EQAMlFw X-Received: by 2002:ae9:e413:: with SMTP id q19mr9859394qkc.248.1582635017545; Tue, 25 Feb 2020 04:50:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582635017; cv=none; d=google.com; s=arc-20160816; b=wfu+wxH6w3PuZCxuwt+6NGhttlSbxjtoCrrORGskCw0EZct/ZiIUtoCvEJ4Q5en+ze AzzqsJnZE1tneLOWMSz89FaOoAhEMLwqv6hPXzLYi/qRwGTpKtleIuc8/ezLXsYAKx0F q5Pyam2jYmZ/FOW7ctykZvUWxUZ+f3TM/SucTElqDG/XiZ/Rohv8/1J2lZsTJ7tLHIpe Px+WDWmFQwFusc3gnYPZ9rHhNd2mkCUQfojs4n+XiTDOTna7JMJtOuHu3q8Nm7bK51ES fi30wsWzbZk8C8HSD2RmGT3ZsQHCWZCVcqme2mRKtf76l0YF6hZMqCcSDw23xMPIkAh+ VYzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=qYrx6G8+J0oij9Dy1s5nRsl6vpAyTX2kML2yVNSLhuM=; b=IClvIwTrX2MCcrfcUTCoQS7Bg2LLVwRGZfLbYc2O+PM1Fzd1ffBauU57dVkNccuGNL a1GSpHLsfSW32jM6RDmj3/Dgt8Tu2bfWPLnAXVMytXGSS4pbGjGYbf73YO1j8j44w37I UesH56/TFDJKs0KnBwPOtD1adP2M/ZtpSUHUFnDeR1SD/YMkhXLvq8p1aBVaTMJdLpj0 H1RTwcsk0syhBijZ/4S543DNDFTjTDpn5qjEamaWKmAUJdFGAqxyozlRQHfsBVkEbR32 LhAbnIu8bMgTKeL8gDR4PL3CFZ/l0OCT0c0jSmAD8zbUX2bOYSNnypNPBnIKKvtTBZ/M KnuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="T0Pdjjl/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h1si7352096qtr.73.2020.02.25.04.50.17 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 04:50:17 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="T0Pdjjl/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZfE-0002Kg-Us for patch@linaro.org; Tue, 25 Feb 2020 07:50:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59213) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcS-0005UI-MU for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcR-0007FJ-Na for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:24 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:34432) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcR-0007Ed-HK for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:23 -0500 Received: by mail-wm1-x342.google.com with SMTP id i10so1040869wmd.1 for ; Tue, 25 Feb 2020 04:47:23 -0800 (PST) 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=T0Pdjjl//K5FJFwxjoPqZ0gYkbUq3bjHZIRDUrby2xFwXlja1j5MdD1+N0gZuB021Z Gu3ybFlXe73vdCU5BzHZQnepoSKLMxLFzS9bFCDaUj8K+WLprHHm+Go90J91wYfTRQB7 fdU1zB+I502ZEk236nPnT13jlTXUkGr0EjLCt8gqYxlLERs+cjIFMuw5FIGfk2NqvLvz bJv1DIMakx63ae+wrjfpTTBi8q0GouCd5ApGFvAIR5n/kApM2+gPtymlx55eZIaNGBmJ sRp1incyofgESNCLIyG97Bcv2sZSEWBpI7llEtXC9uG7uQ5Xc5R9ef9wCTyEo0IHUd+m vBRw== 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=tGm19DbX1CqpGCFJS14LmSG7kllrP+AAO9n3NdI9j5BQ9uwTRBaHqW4tNoF8lyQHbE qvRr3aDCGUEMorZlQgGfZM8Xji0HOWf1TdHHIu/7tYKFiifNBnL55p/lI1elsPiQMvRK STKH0CIqnHpLrZd1Pg7TkxAF7JNLqVKug1dr7vhf+k8arqgNBHwbdcQiPG/qV/ycgXdS 5pTws4a/XT8XiQ5Se0dqReT3Fp5tUQQFyVKkwcO8Dq8y8rVv24/zQRdBc3vZNe1H95ph jCkIx86YglMhd3cJFuZ2IKhhy+4vtoxbtsAxAJfw8AcJTXQnXC18rHgrKHdH5iK5CugC 2SzA== X-Gm-Message-State: APjAAAWWQAmwd0CCWexmRAPOo+LjuNdMgSHK+XBnhGDFbSyWYiy/H4eH 7/Q6hf23cwtA3QWOmnAFrRjC+A== X-Received: by 2002:a1c:c5:: with SMTP id 188mr5037107wma.187.1582634842374; Tue, 25 Feb 2020 04:47:22 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r28sm667031wra.16.2020.02.25.04.47.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:15 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 02B4C1FF98; Tue, 25 Feb 2020 12:47:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 08/19] tests/iotests: be a little more forgiving on the size test Date: Tue, 25 Feb 2020 12:46:59 +0000 Message-Id: <20200225124710.14152-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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, Kevin Wolf , berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée --- tests/qemu-iotests/214 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 Reviewed-by: Robert Foley Reviewed-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé 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=$($QEMU_IMG info --output=json "$TEST_IMG" | sed -n '/"actual-size":/ s/[^0-9]//gp') -if [ $sizeA -le $sizeB ] +if [ $sizeA -lt $sizeB ] then - echo "Compression ERROR" + echo "Compression ERROR ($sizeA vs $sizeB)" fi $QEMU_IMG check --output=json "$TEST_IMG" | From patchwork Tue Feb 25 12:47:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183836 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1765214ile; Tue, 25 Feb 2020 05:40:09 -0800 (PST) X-Google-Smtp-Source: APXvYqyJB2NZxaujeFnwv60ivHCLv9y6D3BpQDpfxlN0Ar3bgxIQI/2nj88+35zvZgJBUZ0MQk1Y X-Received: by 2002:a37:a1d8:: with SMTP id k207mr55407454qke.375.1582638009359; Tue, 25 Feb 2020 05:40:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638009; cv=none; d=google.com; s=arc-20160816; b=HrIcwvbdFIojSqFkbZ5BpVGb/jt/KRXK8VNdarw2RR2hmifH6ROH3symAeQusKo3qh pAp7thONiZUhylTjNKqplkb/l0WC0/a6RJwHwopTq56kwPFUGYdrw5QrnvzjdJp6x0C9 HRg7r1RgLEQLMIjB30HhC71/mjWqj7dbtfrDg0AC3AhFEagXKXsYPS4MwvMkaHoeeaHm o/FGvaU+Ph5POIrmJHYhgCk9dtQrUY3ESjpTeYKmIvm179SCI7oHeURzyDGk+XfMo0/2 w6Ub/DVlA1NL2XJ4cPydvg/1n/NzTUiz+d02FS2w9w/jfPZ0tfaf6Cx3AnB78UANQrE0 9eLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=4qoFVLEk4TMnSbFDHJO1R3wqor2c3af6vJj8knvgvVs=; b=TYcSlOx/wzInKScXXQg1p0HS6MwlgvaW2mAVNWE+GDu9Zo0qNsQVzwHwXnR34Ewv9O +L+uFraqN7ql+4bTgyB26ff8VrdIPOZo87e0Z+YBGW8v+mf01KEXGlIC2UJ9KlujEnXF wqZ+Lp7gqBLZOV64k59U+PXhyM8ARTIy8bnOHJ2uli80FobwMcYcghORHQBt/vLu41iK AeSlD4N11v1rXS4ELDAJBzVdyYjNScfUkPzU8kCd3eHdSbF7y7x1dQB6Dh1+sL5apatd yTnDFrYUOC19+XWQryeKj0fphdBBTg10YJRVFQUvco3QBBmcZ41rgkNdQw+qZuY1K+wm krDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M+6TqLbv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p68si7471114qke.320.2020.02.25.05.40.09 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:40:09 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=M+6TqLbv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aRU-00030x-RC for patch@linaro.org; Tue, 25 Feb 2020 08:40:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59237) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcW-0005W5-6b for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcU-0007GO-62 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:27 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:35445) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcT-0007G1-Nz for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:26 -0500 Received: by mail-wr1-x441.google.com with SMTP id w12so14596019wrt.2 for ; Tue, 25 Feb 2020 04:47:25 -0800 (PST) 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=4qoFVLEk4TMnSbFDHJO1R3wqor2c3af6vJj8knvgvVs=; b=M+6TqLbvamS6vUkSEZ6TheYfPLwCCDeqbP11gqV4EkTF95L0by3caNbDGfqOtSAPK5 DajEiATREsKszZulmCytYHusguMng0SA47sBlZJSVnfOoMSc7c+d/uEg0w9gT9l3ApB0 +FN8tAu0oMyqC1mJEc76aE2rfWVMjyz7IhIcSJ8TrqPOC5UNXRUhkiCSfTw/y6MFoM3H aUV3M5j2GEIw3i0ND0s95ZSukyfDiJiriKQHHskMx/PGIUyoA9S1mMAUUr9ytNoi5WUq jPLheobdrL0xU7sn0x6PSYxwIcoP8No5EyAJuJ/xzLX0VdRPNVYd36gcoyx4sYFfChtx M14w== 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=4qoFVLEk4TMnSbFDHJO1R3wqor2c3af6vJj8knvgvVs=; b=fjPYnYYn31QQsXYXR/LZFtNlBAbdqUf/Wk2zN/Nk47tmEM3hiS0f+Uc15Vtz0DPIpR qGT3Lq+nDT/+TeO9i9Mn4iA+yqi9b625bdAGErPiayZUy0EcVzQTYWl1GUPpu/Dbz+8R We8tArN0NjxpzGIlVlVTA+7je+S2YGy+X3dwrPlYlxPTj5TzdXot6Z/oiY0KWvn9DD7R BSlrBvhfbeKEt7Eug4fWwiAKHpSpP3mJLKTYzCCqE1DtS7RNN+RPQwCoaLXqiAr95fnD 8kzOQIPrf69e3m0wddRUVn7iSaYYJVyj63R+ivMbWcSZeHiiX6wvE72KxnFtSvI7TKGk 9udQ== X-Gm-Message-State: APjAAAXtnViJAv0btMp9QCx4cxKKQSvQxd9/G/wd6+68IOUW+N7q7fN3 jfAr8jKfCEqfYfAeAd5gqZCWYg== X-Received: by 2002:a5d:4b03:: with SMTP id v3mr76302155wrq.178.1582634844749; Tue, 25 Feb 2020 04:47:24 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w1sm24513316wro.72.2020.02.25.04.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:20 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 174CF1FF99; Tue, 25 Feb 2020 12:47:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 09/19] tracing: only allow -trace to override -D if set Date: Tue, 25 Feb 2020 12:47:00 +0000 Message-Id: <20200225124710.14152-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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_Benn?= =?utf-8?b?w6ll?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, Laurent Vivier , 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Otherwise any -D settings the user may have made get ignored. Signed-off-by: Alex Bennée Tested-by: Laurent Vivier Reviewed-by: Robert Foley --- trace/control.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) -- 2.20.1 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=...: " From patchwork Tue Feb 25 12:47:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183839 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1767623ile; Tue, 25 Feb 2020 05:42:29 -0800 (PST) X-Google-Smtp-Source: APXvYqwZjFkeiCmrp6spoY5UVZgDGCBPZn9JoJLTfiry/LUww/707e6ftp88nnoQUgwMu3Du/baA X-Received: by 2002:ad4:58ae:: with SMTP id ea14mr49100321qvb.247.1582638149498; Tue, 25 Feb 2020 05:42:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638149; cv=none; d=google.com; s=arc-20160816; b=zS9HMq+XwnWWDMU4YLWu4R9mtAtxKQATHprJY8RRosQ2fRoaC937tCXlB+eGeeMTa1 NDdrzYJVcRjH3oiL/jYVwsOZOnf+OA0vZZNRck3PzuVLkcdtRlH++lmECyPlCoV/RZ9Z WmopDqNgnUIvH2fp4VWjUmhHFDmh5yZv5XNxpR5SeK8CPMNvPFsjy4qX28taQbDpX/44 wbnczxIImAWcIGEAMYV8v2/xXBZNAP+PWW1CCA5i2vS+yqX59NuB5np0bGcpAIISjeya Ai3K4Q256PhNsHeGH/Exq/Y9l9M3yDFrK5wIiP0ZNY3PKyJ9lUg/E/iRQ466jKLEcfrd UuNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=4d2JrUPmJz37MvIYKDE4vOLfs/ja0Fe0BZeISYiAcVI=; b=NysxeF3aCxR3kvc7aLpI6nM0WzophIoAW+3TviYojH3wUDNlKr75OmmoChkh8OE9iG uobcQRSZQiXyLMYyzzAkqoVCkKevVXWs5fdMq96dWKgWGfRghO7C6b317v0uuUl4uler 3qE3RwWUyT76jL/kuPyVDD4/26vluVIA2iiRywaVc4ozK5a6MYDQuN8iYSAuBVYfBDuM GDcpLvQz+PPW0bv15TqFugSLHE/3Py/sJ6It4k9YWPrWsxhakn5kDvbRGQO4dJafQmL7 +VrF5D1Lj+i1O3KPOxki03UP+mc9DNnxpaV+MZ3mWV+JzT0vFWG19AeospSqnkLN+P8v 94wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eMi08feM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x15si7172356qtj.91.2020.02.25.05.42.29 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:42:29 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eMi08feM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aTl-00073b-37 for patch@linaro.org; Tue, 25 Feb 2020 08:42:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59259) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcY-0005bS-C0 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcW-0007H6-67 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:29 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:54050) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcV-0007GX-1U for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:27 -0500 Received: by mail-wm1-x343.google.com with SMTP id t79so1366696wmt.3 for ; Tue, 25 Feb 2020 04:47:26 -0800 (PST) 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=eMi08feMDeth2FqrHF+Dl21qn7NuBH3xvfxYDGp11sliJn4P91PYlp5bZhvTfWv/yy Z9Qog5qlf9Ewqmdl/JxGBhBGqEwnh2SwCWwQK586MMSDhnVzS8jhAlqgrrUbxfa84JBJ 8zSknaIh6BluoanrXGckIewg3KTDasBmdhaob8jYDnQeObylmuHkQEB4P3DzdzeZCE7S uTUAiXoVluYzGZYo8xEG6Avylyj04lsMy6DtdNdsIRlIuxURs3eSANIMgTox1Iv/XY1Y CheiRAkaMAsbH6BnHMoY0af4lyMEvOgSZIzH7Q96OXGJJuJTWi1DusZm1ul9KNkxmwQV E88w== 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=gZlgeopA93lIbbS91StA6yWLv/fr+sKB2ExbIvmizsfJpO2fv+CMSe8DEajoQ0Borl VKgzQE/K4lagyBNtKJYly3TSqzKJXd9Oh2ZNyV5UNAMku8toWluo9i/JEWNrIHHPor2r FYnjOpjO9L6HKJI23TsssbfzCBPsVzVn49tumi/0AQTGuuUi4Ld/RD7Z37sM/ZnIZhuC SGpV4aZfcS/kf0L1HIG2yAF8jj1N3sfPMTHhUVmiadnhY8P98NHjb8SzMXjn3Q5EzF/d sYOirWzxMH5kJb8UoNTiJvX411kkUykaHciJQPwOsnh7tpV5PFT2Hma5sYzd9JTqp0wb TIjw== X-Gm-Message-State: APjAAAX3tuddXaeXfdd9lG+iWtZ86K8E8nfzKLFnzHVviRdQ95cEwg7h RC70W5vyPt9z8cYjnYIcAs7/hg== X-Received: by 2002:a7b:ce18:: with SMTP id m24mr5214555wmc.123.1582634845862; Tue, 25 Feb 2020 04:47:25 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s1sm23459047wro.66.2020.02.25.04.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:20 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2BB131FF9A; Tue, 25 Feb 2020 12:47:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 10/19] docs/devel: document query handle lifetimes Date: Tue, 25 Feb 2020 12:47:01 +0000 Message-Id: <20200225124710.14152-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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_Benn?= =?utf-8?b?w6ll?= , 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" I forgot to document the lifetime of handles in the developer documentation. Do so now. Signed-off-by: Alex Bennée Reviewed-by: Robert Foley Reviewed-by: Robert Foley --- docs/devel/tcg-plugins.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) -- 2.20.1 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. Usage ===== From patchwork Tue Feb 25 12:47:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183832 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1738240ile; Tue, 25 Feb 2020 05:15:34 -0800 (PST) X-Google-Smtp-Source: APXvYqxS3gnphZe4sdPimwdFNHKr/oJ88ieQ2F113QBbDUUY3iqvIT0ubkZxUmqO9Q9+sXvGCt2d X-Received: by 2002:ac8:195d:: with SMTP id g29mr53708177qtk.65.1582636534414; Tue, 25 Feb 2020 05:15:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582636534; cv=none; d=google.com; s=arc-20160816; b=HNnz0JRsX5BOrTxt3QrOYCjAkq62PfeDKS3P16/Et/b08ctKe0yQrZcAZfJRaoCmZt uYNhFNkRlnjBYAw2/1Ovc1W2iiGTz6ZKjSd35zLCmgAe/y3fqOV3aOzvLgB2bBaWuLnC KeAn05Cn9v8Fz9O1thGZUTgSScrmK2rtDLQBJyHDbTkTViRfvFZqsPRbZsDPHz4ZkhxB XLtnB7qQ2WjHeV/6OccmUUXqV/HjO2P3opVwfV4KyTCWDJRE1dUlF8TXWc6Zlqk1MG7H t7aFPJ+MhfFjFoii7s6sPbTEoj6Rvwoa7vVIFcb1A6msUFdQ/1J5WpZhAWTijE6CXGIg GlkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=na92kVuJJsjY30jm/AoUIfDqEYfGMWmCBB2a9Ak5rMc=; b=ee/e15FUy0ND7fsfIQGPW685j7iEgLv1FFcNGVaSEb4efWBZ/XlljxIkUL8v1pBowp 5rgbFJLVgQlPCqvDHKuoazIHdMeLzqT9jzp/jdyMmx9VqkTVxfJ/L03CD06LP/ojr9L1 OtVZ7pqZYQ+ThMdRnzOSSG+NZsoydxlDZlP4Xim10yL8wlWHtYn7O5mmtwDVfJ+3RxoA +VtY7PexXwjips1bv7Hq0D15WPIgnD19luGI+p4iAZxdTwf3q+0uc4rdnKiLiSc7P4Cu nT6GYb5uCyBtKncYGB/CjzEsuHS+WerYl89LYoedrVNP+elsSMbVofTRGcrtjk8ZwHFF 1JrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="kfU8ao//"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i3si7093637qvr.220.2020.02.25.05.15.34 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:15:34 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="kfU8ao//"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6a3h-0000xR-S6 for patch@linaro.org; Tue, 25 Feb 2020 08:15:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59266) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcY-0005cE-Lf for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcX-0007Hd-Lh for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:30 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:36384) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcW-0007Gp-I5 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:28 -0500 Received: by mail-wr1-x444.google.com with SMTP id z3so14595329wru.3 for ; Tue, 25 Feb 2020 04:47:28 -0800 (PST) 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=na92kVuJJsjY30jm/AoUIfDqEYfGMWmCBB2a9Ak5rMc=; b=kfU8ao//sTxn2+jp/mewHRgcmNuhH0miGGE44IjK0/bzxtBF/uz3kNp8SEKkizaBWw zzijHh6nyX7B8Dsv8/fo4fWeKJupsAdc05OMp7dFCij0LXmbyFDTtxzuOvalkcgC4pmG xwH42zZmEf+kfeRzsCHOj0dqgnOCvEFOGvui3wjGwZ8Hi9wisoLNmMaXox88U/rV4hCR OnTz6HlRCZ8dDwkiSwFlWgTTS1wJZuQVicrEYNxNcs5itOIPVz/lYYN6s0KRg9Hpo+VW 5wyBQoy0c2upE4pQBS+sz2Tna33pxSKcGPWAlTQ4aY8TfCqVa1fLx79MGbLaC+Gqeg3M G7jw== 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=na92kVuJJsjY30jm/AoUIfDqEYfGMWmCBB2a9Ak5rMc=; b=CLW2oXGGVbH3aYtFONHD9irMXVDqSbtKhJV9uLApUbyrBSmPmUtGK2BEN7c/kcE3Hg OwdoIHZ/nkfsDvtxLx+WLAr7Ta5yc/1FJkNUZUlDKH5vPNNFHkLRxQOhD/EQxWGoP9Lk u+n7WOxfryppL5htVFb0PKZTD++7Jha83/P9H/K9Aunm8nL44JUlMfjOx6WroEygyYcV iQdP6yt4dhK19Y4c+l86Dn76QuERM5DPuliXIbboSdWB+YJZPmDoNhjcCVzRiV4hygXf JWwwDEsI59D0H8Q2Pk8rqmLytwCwRXLecD2E93WtjeP/hjEjaUxNcTy+J5uD+UjlRKWD pX2A== X-Gm-Message-State: APjAAAWA32DlslTxNnXemYHh7HQrT35rv5h/C9AK1MmWt+Y5NnE5YkK+ 79PisJ/6A0Kf2XFP0/BQkO761Q== X-Received: by 2002:a5d:4807:: with SMTP id l7mr7063342wrq.250.1582634847306; Tue, 25 Feb 2020 04:47:27 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f8sm22586384wru.12.2020.02.25.04.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:22 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 426A41FF9B; Tue, 25 Feb 2020 12:47:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 11/19] plugins/core: add missing break in cb_to_tcg_flags Date: Tue, 25 Feb 2020 12:47:02 +0000 Message-Id: <20200225124710.14152-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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_Benn?= =?utf-8?b?w6ll?= , 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Fixes: 54cb65d8588 Reported-by: Robert Henry Signed-off-by: Emilio G. Cota Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200105072940.32204-1-cota@braap.org> Cc: qemu-stable@nongnu.org --- plugins/core.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 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 = 0; + break; case QEMU_PLUGIN_CB_R_REGS: ret = TCG_CALL_NO_WG; break; From patchwork Tue Feb 25 12:47:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183827 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1709380ile; Tue, 25 Feb 2020 04:50:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxoa8+1h4nww7llb8uHlz7c+ZJIlkp9s/wwdWae0zbF5qXn1WMbPYZCcd7lsVUVFWtzHH5H X-Received: by 2002:ac8:38c7:: with SMTP id g7mr52274673qtc.229.1582635030410; Tue, 25 Feb 2020 04:50:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582635030; cv=none; d=google.com; s=arc-20160816; b=KU5KTXKumRj5kU4gxMX8Iab4y5OVvT3zY0KZ614wmn7MVauQ900tdhSKHraXwi1Z+9 xtcdLf3cqHUfUIIwXvU51PPMBnkjC9jwWO7DJK7rUl4dHTrmSf+TY3RxDXMvm8hrt8FK 1qp5JnKGvb6wEbNLfMURoXemlmWJfZJzTEVHE2/e8ZYRuh9wTzQL3WAvwK4wE3fw2O1X WJZTIvUvM5uipcC05BE+7bK0TnaHhWQ7KeAp+DdjFJnWBaCDi1jBIVZbCic75ZE8HvXy /Rj0IYcz6lnhGZSxK6usf7qlS9RA7GK627nDi/73mq2shXOIdIT9YggkvUv7c4T+Pe+K BNHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PR3MIDvz3PtDDaollGFXmkX1Ue3lMr6ulNQeQQNdSxU=; b=NnfY0aFH561RR4JgtlHUoOVkeIl0OVvvl3+lsgq+IAE2tkaAuaeUSxXfG9+f/goo7Z 9lSvSHwjNz+BskLothV3q/I/81kJtWuh9ahSEvG3eOiAoIiXejnRT9QRSiSLLTUEsEUK EafxxDY91tT7gSr+aNl4uZbcN7Hom2oChYeUxZSvuH6HictZqNvLJ4uDiv74vzFxDPrS umED5bDi5bbMDVq0gS8cODM1cBQpab1VGEm4h1pNuZ7Dp53KLyjuTEsHcRHEuv9zBEzH b9WtjT1kB5FKbqWk/eCBNvhlgX9bflhBwSgp3vyCmEAcNdtfuR9jdWLVVF22yoBwkMUv IKmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="pGw8Lg/x"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x1si4836228qva.159.2020.02.25.04.50.30 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 04:50:30 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="pGw8Lg/x"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZfR-0002Vq-Ql for patch@linaro.org; Tue, 25 Feb 2020 07:50:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59293) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcZ-0005fR-Qv for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcY-0007IE-Lr for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:31 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:35448) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcY-0007Ho-F2 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:30 -0500 Received: by mail-wr1-x444.google.com with SMTP id w12so14596305wrt.2 for ; Tue, 25 Feb 2020 04:47:30 -0800 (PST) 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=pGw8Lg/xVnYtr0lrehL9FkVN/2n4/Ho6Ly0xoHVrpuo6Ee8DMdaUtWxc46FTb6iSGE akC3scEjRjW0s0Kezy746JiTmHNAftymMKbX3FUmkCPP867woLwwyF29iksFsB/n5Ygs gAlw/Fbvbx99QUzjRbBpY/3/3EIhpSjLKLEUTtiy2kbPtvVlt52YyCD9rvu4TOiuNF5k 1UG2cbC/xJrGSM9lkuT23xERBK8A8haCSSRLohDJNmLOiAhaxzSoPAXTqS8lJKkDNe9M yggpwwqoTR6MqoNYq+cFLwq6p3XeHE0PL2DUGrN269B1KdC1MFXO2go1rZcyjiRdI3FA qDLg== 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=oQ8ZUcmudiXn7HExImOUYFpv1OQQw54QXI/vafxUPfknFAlfEoPH/8JmF4ecbv4NW5 jfjtCw0uAkKr26QrA1rTsKfv5jG/br5fNe2iHgudIUISb14wDbYzUTiTjVaUSQ5rSal8 z41C43B4eZWhprjKH+iuxLGHOwFOSCCBZWwOmVxgPVPj1J7BRM7VRWD+dFfju2P/EWpt YRsCRmAx9Q8NsRCmc1/vM58b0imMZpPgpiadnT7RAoJIhVce4d46JaLX7eLmMFjYZngk oiuDf/JAwCVaEdjtLuA71iCv4jU4oFJ/4kxiJcAIAzxiUU8bgh+iDYc38Cl+D3rUqBwf vINQ== X-Gm-Message-State: APjAAAVLuOvgnI0zv/2mQOv/++nSdNZn5H2QTIcAVsNo5XPWm/q54Oqa GY/3OKSojfHHbA2mbrjYobZsEjVnQdU= X-Received: by 2002:adf:ee86:: with SMTP id b6mr13478800wro.282.1582634849473; Tue, 25 Feb 2020 04:47:29 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b10sm23808377wrt.90.2020.02.25.04.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:22 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 59D041FF9C; Tue, 25 Feb 2020 12:47:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 12/19] tests/plugin: prevent uninitialized warning Date: Tue, 25 Feb 2020 12:47:03 +0000 Message-Id: <20200225124710.14152-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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, Thomas Huth , berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn=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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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: ‘out’ 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ée Reviewed-by: Richard Henderson --- tests/plugin/bb.c | 6 +++--- tests/plugin/insn.c | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) -- 2.20.1 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; static void plugin_exit(qemu_plugin_id_t id, void *p) { - g_autofree gchar *out; - out = g_strdup_printf("bb's: %" PRIu64", insns: %" PRIu64 "\n", - bb_count, insn_count); + g_autofree gchar *out = g_strdup_printf( + "bb's: %" PRIu64", insns: %" PRIu64 "\n", + bb_count, insn_count); qemu_plugin_outs(out); } 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 qemu_plugin_tb *tb) static void plugin_exit(qemu_plugin_id_t id, void *p) { - g_autofree gchar *out; - out = g_strdup_printf("insns: %" PRIu64 "\n", insn_count); + g_autofree gchar *out = g_strdup_printf("insns: %" PRIu64 "\n", insn_count); qemu_plugin_outs(out); } From patchwork Tue Feb 25 12:47:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183841 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1770578ile; Tue, 25 Feb 2020 05:45:09 -0800 (PST) X-Google-Smtp-Source: APXvYqyD5vYgujXJmXu4764CuBpmAWnzlbWBiVwavhMbAtLkpocCbQg0K4ap9uFcK82Vb3v20gc4 X-Received: by 2002:ad4:478b:: with SMTP id z11mr50583384qvy.185.1582638308939; Tue, 25 Feb 2020 05:45:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638308; cv=none; d=google.com; s=arc-20160816; b=empwBj/ONqAa6XrdG9pbQ/dj43FejgTiyk85IwTfA3hJJJCqgyieJonWry7c/gWzpb LZR5yBA2Q5pwDop7FEQEkVirj2uO1tLuLVW8gtRgPTbWXbZcuZdm2mf4QhSjwMgJp0ug yxUt2CikXHgqfJ/sHmlwIIzwCi4qDNrCgnTMtS+oS71reS4Be6WuM9n24c+qU7lw4XP/ IfjrXqAu2bkwLRzb6EY+wbo4/oIWdNrLKyHiEy7An7bU5WQK/6LvDUZzkYciVc/LBCkc qfO9BQVUpM1dynbJAmPs4zUxvWS/jFA6y5DOyq6pxC6AZmA2YOwqIhWSUebChQJoS1Wr qepA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=pTDgnQcfNCGcBS0F93StqkN1izWdDQLZMDSB8zlG3xk=; b=YNj+T2FoEJXOzrXCjNYqP5ZRKlx9XbvVKCnTo3SIkPRrBmcLCa0H/rbM/Mqv5hQ6AY /Y4tUFOsoK8IytXeARSnkJuWeZRJd1BZ1qBNP+xpdpSZlz+WhxcMikE5w4KGITnaPb+5 XmXnnhBSpLWmpDtKKpZHJefeZVkx1d4l2ggVCyFhzTCEIG3jtO5iwdM40Lso1yq62+l7 LFiZsTNCN0/MBp3cD6YsI+BQZDwUkh41QPA4KtxoohZOl0cyuGhd2PwYCVdiam25f6PQ GKclraw8z5qGb2YR2KRibB4jT04HR1F282Sld4AXM1R6pzpinKUV8PfyIoAVSVbYCn0z j1Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Imk4u4Wc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m19si6687122qvt.65.2020.02.25.05.45.08 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:45:08 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Imk4u4Wc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aWK-000262-Fq for patch@linaro.org; Tue, 25 Feb 2020 08:45:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59291) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZcZ-0005eu-LB for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZcY-0007Hx-E5 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:31 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:41587) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZcY-0007HO-7d for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:47:30 -0500 Received: by mail-wr1-x444.google.com with SMTP id v4so1718409wrs.8 for ; Tue, 25 Feb 2020 04:47:29 -0800 (PST) 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=Imk4u4Wc32o+iCTKJ7UwXjcmaeocL5hw3ixbEtirkawjc8IAecLUHp7O7zVnbo14Zc K71H/4vPuohge6KJD9h5KvMu/oE9RYLE7+ybKL3PE9dXfqbuRbvxEdYvCl3RdVqi709V w2nlqBRUxFDMfkQQl0dor1v0a+IZZ+uF354mDT8mjGSF+YztedBgcYyFTfGmsywFdK/G F27mujrMq0PM8Ky5HrGw+VNu1SczXUuXRjHAgDnINLYSD9yfnNza3D/E7uyIUBLElOFb Xzzm1qTHKgmCPzT2S+6+eqb8hC8YdPpotiIK6tGKFaNyQfRu7bemIAGzyTN5Mu2d3HzE Xyhg== 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=mLpQZkEU7lRzoNOmKBlkaTkcx2xnc9x9wz/zSYUlMLETWLJmJCIbIEf9q2IRtdIMm3 8vW1kT/ZHcagsLOVDy9y045tP0rzJ9RGdDCBwnypvFY0/xnOH+9nghQQltfTFvQZGCnL hR3H/bHJM0nSYkD/sK1xOalZwRyRIUs1FaKDMcQkrWmzEYw90RuhCgdoEDdVGx5onL6B nqZD+TgSivx8yh1yAkN9B8495cnPvbdBDiryKF3rI4XP00L66v423r/7jibcFZ+Gdrv1 7HGFrKNvOZoMg55IrWhBHgj6Kv2tjrSj48vfx9zhFSKxFWkBHTInzAVc331caE92pYHo vVYg== X-Gm-Message-State: APjAAAWN9R80MSvanxEzOZmTLCuHXqVI3jCKZDuf0jQZD/pT6ThNOIkd AD/k7IacQ+xSab4+yeF+BZqPxw== X-Received: by 2002:adf:e949:: with SMTP id m9mr9185217wrn.342.1582634848552; Tue, 25 Feb 2020 04:47:28 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a9sm25082882wrn.3.2020.02.25.04.47.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:47:22 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 709411FF9D; Tue, 25 Feb 2020 12:47:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 13/19] qemu/bitops.h: Add extract8 and extract16 Date: Tue, 25 Feb 2020 12:47:04 +0000 Message-Id: <20200225124710.14152-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, Yoshinori Sato , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Yoshinori Sato Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-10-ysato@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20200212130311.127515-3-ysato@users.sourceforge.jp> --- include/qemu/bitops.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) -- 2.20.1 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 start, int length) return (value >> start) & (~0U >> (32 - length)); } +/** + * 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 >= 0 && length > 0 && length <= 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 >= 0 && length > 0 && length <= 16 - start); + return extract32(value, start, length); +} + /** * extract64: * @value: the value to extract the bit field from From patchwork Tue Feb 25 12:47:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183847 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1778808ile; Tue, 25 Feb 2020 05:53:22 -0800 (PST) X-Google-Smtp-Source: APXvYqxV0fNIaqNshSAIyNCFXAxSGEGsJ49b9as3tUEUKENKMjF4RrWrvtFezI7noBplhBjUzqBZ X-Received: by 2002:aed:2f01:: with SMTP id l1mr52899188qtd.391.1582638801991; Tue, 25 Feb 2020 05:53:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638801; cv=none; d=google.com; s=arc-20160816; b=IxVG8P6oJuvoL0wD+RcF4R6ddBBNw0yuEotsIsR8akGfpdotM5xgnOvOLa2e4U9i5v Mk6Z0mI2a+mylmV7POWw0IUHTpDhFB1+ih1qzGzO6lSNAjOHgyDcolZ1bpdZ/4vY3hyi GOg0Y9uPsOmtJii9BVLKB6gJf887wxnVP+aF+0iBM71VvAQYtu89T5qFX+OHZLLKEj41 oneRW1Oq8/k/hGtmDG2Mp0iTyqx4B9AZ2nInGg1li5dJHxe2tqS4iUv45J/ExEi4rI3K lptrRa6yeJnspVKevzDOkF3YwrkYUZLzvtlgzP8v5CvvZHN3gViAXMkE4Ks5HvbzOBWn BQMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=k4RkOSmwzwH2dQilc05ZWPR0LyOE7aaRoCCPjbXdJZE=; b=IWlv04o1r1URTIG3niIXA9o2aUcN+znOzDLyevMq8lUXLHFu7ojDqiBEaVJTQmF4fa nZGSNteB9c1BGVxHWG+rSMiSZE3GdPz+KbOx7YjAgz7h/pe+ogfJaCEUbg5aZ8TcTmSS lSEUiZOW5s4nhcA+twItGyIP+sWsjkXpg2PqQbrNYQx/1GRpTaOoZyXZy3TIR4V0Gndx a/pH/bWvIDCN1P5eWG/lH9WsFsTWYEKELPj6wgqzGV5lhIJQvlii2fQcmwOD6hffEko/ puotQnUpH3WoPU5BFHj9HDQULIZAWCYk5uqc9DJ+/WVyaAeRtUujgR1gP7Ya5y/sLWa/ rUmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="lLJD8/8U"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y28si7495366qky.139.2020.02.25.05.53.21 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:53:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="lLJD8/8U"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aeG-00077x-If for patch@linaro.org; Tue, 25 Feb 2020 08:53:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34271) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Zka-0003xs-2F for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZkY-0004FZ-He for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:47 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:37769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZkY-0004Dy-99 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:46 -0500 Received: by mail-wm1-x343.google.com with SMTP id a6so3052646wme.2 for ; Tue, 25 Feb 2020 04:55:46 -0800 (PST) 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=k4RkOSmwzwH2dQilc05ZWPR0LyOE7aaRoCCPjbXdJZE=; b=lLJD8/8U2pEK6tt9h1UuIe+5luto6aqJ7iVDNz+QI/kNbnb4rgqY30zuM5JMMqFIqw RlqsZOPlripJH8/V5WD7S+J8CYFOzQGEBx38zZP+jicQOjwEPdDYnht6SdsW/zonChG2 A5FOYrBXqUhXcSPTJF9rGtzwO0mVfUcRRboL3ZuuzWcrDZdPAAQArTy22Q7M+JKm+wqZ r/Iid0+0lKGzjzAFPRE63b84lgoAybm5chwUaE3IJoYe+Dazz1RvU96UasH2YpQmHCy0 UB331wPEAQh/67UJyiBGB2uHmPz6Kk2YPZWBdqoHaZPM6Fz+j5kx07YFmKho4tr9mNGs 7xLg== 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=k4RkOSmwzwH2dQilc05ZWPR0LyOE7aaRoCCPjbXdJZE=; b=fQlTJEp4GbSRcGJu6bVUBPQ17nY4Cef9BE1y+/a7Ct6UbhVtGUo/je2SAW+xI/4Bna 1kYV5+ZF2OiE+os1DudvSlGyfRGpWkJCTtm2yQeLM31Hn3C1gMTTgTrdPBhkLYDSDUdC REs9QUz9+VyxCJQ8vuZy7OPLyW/LTKyD0kiAntvqZCGaitG68ZfeufVedV0vm3n/RjXg R2e9jwh7OTSDI2mGVDxRc83zheFrzK4CxWm/U63vuqLv6L+nvmDUST0gNdSGZLS7xnwO eS0+3T3MfMzaZgLY6s2HHgk++4jTwwoLjiih72q6jTwJYX+8LLxPGD5eGTfbM6fLQt9L DVMA== X-Gm-Message-State: APjAAAUnG/6p1Ya6BBEC5oI3WcTT+oiPbwN189ROZ3vSIG5F0pYSs6eQ S1PBPDgR7CeUPd8RX0RjbroDaQ== X-Received: by 2002:a1c:c208:: with SMTP id s8mr5282583wmf.30.1582635345203; Tue, 25 Feb 2020 04:55:45 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z19sm4022542wmi.35.2020.02.25.04.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:55:44 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 88E1C1FF9E; Tue, 25 Feb 2020 12:47:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 14/19] target/riscv: progressively load the instruction during decode Date: Tue, 25 Feb 2020 12:47:05 +0000 Message-Id: <20200225124710.14152-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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 , kuhn.chenqun@huawei.com, 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, "open list:RISC-V TCG CPUs" , =?utf-8?q?Alex_Benn=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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: Robert Foley --- v2 - use extract16 for uint16_t opcodes --- target/riscv/instmap.h | 8 ++++---- target/riscv/translate.c | 40 +++++++++++++++++++++------------------- 2 files changed, 25 insertions(+), 23 deletions(-) -- 2.20.1 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)) #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); } -static void decode_RV32_64C0(DisasContext *ctx) +static void decode_RV32_64C0(DisasContext *ctx, uint16_t opcode) { - uint8_t funct3 = extract32(ctx->opcode, 13, 3); - uint8_t rd_rs2 = GET_C_RS2S(ctx->opcode); - uint8_t rs1s = GET_C_RS1S(ctx->opcode); + uint8_t funct3 = extract16(opcode, 13, 3); + uint8_t rd_rs2 = GET_C_RS2S(opcode); + uint8_t rs1s = GET_C_RS1S(opcode); 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; } } -static void decode_RV32_64C(DisasContext *ctx) +static void decode_RV32_64C(DisasContext *ctx, uint16_t opcode) { - uint8_t op = extract32(ctx->opcode, 0, 2); + uint8_t op = extract16(opcode, 0, 2); 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" -static void decode_opc(DisasContext *ctx) +static void decode_opc(CPURISCVState *env, DisasContext *ctx, uint16_t opcode) { /* check for compressed insn */ - if (extract32(ctx->opcode, 0, 2) != 3) { + if (extract16(opcode, 0, 2) != 3) { if (!has_ext(ctx, RVC)) { gen_exception_illegal(ctx); } else { ctx->pc_succ_insn = 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 = opcode; + opcode32 = deposit32(opcode32, 16, 16, + translator_lduw(env, ctx->base.pc_next + 2)); ctx->pc_succ_insn = 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 *dcbase, CPUState *cpu) { DisasContext *ctx = container_of(dcbase, DisasContext, base); CPURISCVState *env = cpu->env_ptr; + uint16_t opcode16 = translator_lduw(env, ctx->base.pc_next); - ctx->opcode = translator_ldl(env, ctx->base.pc_next); - decode_opc(ctx); + decode_opc(env, ctx, opcode16); ctx->base.pc_next = ctx->pc_succ_insn; if (ctx->base.is_jmp == DISAS_NEXT) { From patchwork Tue Feb 25 12:47:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183845 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1776204ile; Tue, 25 Feb 2020 05:50:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzCo9ty5FaqKXX9tcFv1A2NwxKYEhhAbjanCmnprZzo+lV06ypgf+FMoheTibo8hkxptNH8 X-Received: by 2002:ac8:42de:: with SMTP id g30mr54384502qtm.195.1582638643017; Tue, 25 Feb 2020 05:50:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638643; cv=none; d=google.com; s=arc-20160816; b=elc6tyjlQo4+r5uspbOonL+FcqpiNQTiPV8GRnJxPrzcZGloiNWA7qcnGeb/3mTIb9 nU0AQjeWVhM8a5/xKJWttWQwFs85XKE+9gM3tCf3/fXwcqHF1dMUwSazsb9766GgesEq kgq6ihaVsmQ+IPSbFEN0u/cN1oKCcL9K7fM2hAV9VArdqOwtfxXDjXwDFgpI++r6I5xm K/3E43yt/qn1SJNlHNZxhOflt2W7b2nekbW1bASyvMeyijhAcAobiM/JVxq7EZhCSbsk vgMgdAQsCfH5X+zeguAOGWmat7LNVKFlbxcn8w4iWhlfgf3DeEWd8tMYAnEB5aSX7YCF ulig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=py9bcDZz909NEUPFg69hhSHq8thghQZDr3PiUGhEcOg=; b=P4s0aMyBq/bb7ZDpxpx56a5hMCBy06nLUHORpEV1dmPZTSGsCliaQX3yCa2FQ0VWS8 7DZtbp5uoFg0Oiuih0Wb0lNpouR6iVyk041gNO/hRRjQRER0EzSQjns2FQshWrcFtLcz C2PLbTheb9JZc3Boc4jVqRmJFkaVJL58MssZdmL9738KqfKOQ6rSfpZ2xY25sk2h2WOH HlaANBlYW3pVliCrzigJLXGq+yc6/cmnDSfQ0r2jC8OlF279sc/FYe2uT1jtJ8IjDjPy xktVWaA/5j5CViMrsPX2WWPKrcoZV3i4e79H0qtAb2cMP6SF4APGNi/X2NuB8LbCqyNv Fi+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JhWdVKhB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q34si7848401qtb.199.2020.02.25.05.50.42 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:50:43 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JhWdVKhB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6abi-0002fU-Hq for patch@linaro.org; Tue, 25 Feb 2020 08:50:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34147) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZkV-0003ms-Dp for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZkU-00046r-7v for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:43 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:33643) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZkU-00044r-0y for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:42 -0500 Received: by mail-wr1-x431.google.com with SMTP id u6so14647548wrt.0 for ; Tue, 25 Feb 2020 04:55:41 -0800 (PST) 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=JhWdVKhBnzZN3VXdrNxeEqtU6f7bJmlP8kAme/ZPKWBW8/pUkbagIf4ZJDn+Vz7T/J mzaU4LKuKHJEx5HWeQs2LF+fF2OeIovwqWS2HZO4gEAxKNlS+6cO/4xlnWr+HM3XAELx kukRsRi2eysjuAl+8C6v/Vl6gk6z/YdXMrZIrysXk4kXZbSWrk5PUmijWlyuhyNrWxb6 E0SeHL7fKs4W+WNUQYuXicKfpCTu3ONGzSJnRCt367YWgQAI7Lutp6WuOFwdjj4NrFPX pON3z8pB/f1JIEIPOea6/Yra/uLxJT6IQGFIjb202zziGcYrM8zlOT44Ncn4MLCOdNOR 4k2A== 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=DpleG9G4khcjXl2SyPodx6/PouTQ/G9iuHCscLSuWWrmXs3jdCz+pcVysIuKD+oKFM W52r6YCrqtmPfQfj6y9cxjEbvoyBLdclLTKD4eP52lgz/Vx3z1jv3nnmbFx87oDGxG+Q naKgI/4Ex/RSYPbIBTklxlf6C2t2PfWrzVKLsUbj3edg9SB2uRXF3hjOyBBYwLO83FZG d7CWo4SULol/LrneT9LFxJ6vSUe3v9iNhgkN9VYK6IGrCjeWKTy4Bcg++Iuxyf8jzoBq Y8e6vGKhWD6PzLxxYVsCQLtJYMdZwv/sccC5JyHFROFP/NkeGrzyBNz4UIYDN1Fla7lX U/Vg== X-Gm-Message-State: APjAAAXhAiWB+LCRmjI6h00lTeejthwlCVivxgqonR89+iUxnvwXYv3j dkYzKNw+NTE/oP4JgX/u22c1Ww== X-Received: by 2002:adf:9cca:: with SMTP id h10mr2875933wre.390.1582635340968; Tue, 25 Feb 2020 04:55:40 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e22sm4118189wme.45.2020.02.25.04.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:55:37 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9F8AA1FF9F; Tue, 25 Feb 2020 12:47:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 15/19] tests/plugins: make howvec clean-up after itself. Date: Tue, 25 Feb 2020 12:47:06 +0000 Message-Id: <20200225124710.14152-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::431 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_Benn?= =?utf-8?b?w6ll?= , 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée 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(-) -- 2.20.1 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, gconstpointer b) return ea->count > eb->count ? -1 : 1; } +static void free_record(gpointer data) +{ + InsnExecCount *rec = (InsnExecCount *) data; + g_free(rec->insn); + g_free(rec); +} + static void plugin_exit(qemu_plugin_id_t id, void *p) { g_autoptr(GString) report = g_string_new("Instruction Classes:\n"); @@ -195,30 +202,31 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) counts = g_hash_table_get_values(insns); if (counts && g_list_next(counts)) { - GList *it; - g_string_append_printf(report,"Individual Instructions:\n"); + counts = g_list_sort(counts, cmp_exec_count); - it = g_list_sort(counts, cmp_exec_count); - - for (i = 0; i < limit && it->next; i++, it = it->next) { - InsnExecCount *rec = (InsnExecCount *) it->data; - g_string_append_printf(report, "Instr: %-24s\t(%ld hits)\t(op=%#08x/%s)\n", + for (i = 0; i < limit && g_list_next(counts); + i++, counts = g_list_next(counts)) { + InsnExecCount *rec = (InsnExecCount *) counts->data; + g_string_append_printf(report, + "Instr: %-24s\t(%ld hits)\t(op=%#08x/%s)\n", rec->insn, rec->count, rec->opcode, rec->class ? rec->class->class : "un-categorised"); } - g_list_free(it); + g_list_free(counts); } + g_hash_table_destroy(insns); + qemu_plugin_outs(report->str); } static void plugin_init(void) { - insns = g_hash_table_new(NULL, g_direct_equal); + insns = g_hash_table_new_full(NULL, g_direct_equal, NULL, &free_record); } static void vcpu_insn_exec_before(unsigned int cpu_index, void *udata) From patchwork Tue Feb 25 12:47:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183843 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1773361ile; Tue, 25 Feb 2020 05:47:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxyBWSq+Y2twK1MJJwAf9vej1ywC1H8fog54ZZ/zRLwgotd2Gr3pDRWpeWU2x7e95v1lgOf X-Received: by 2002:ac8:6046:: with SMTP id k6mr55970343qtm.357.1582638465613; Tue, 25 Feb 2020 05:47:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638465; cv=none; d=google.com; s=arc-20160816; b=US9gLwTqKY5+ZNiiVB+sDJRqs7OM3DptIIw1YW2FN01u2tlcfE3QnDG2HP44mqpUHL d4l7H7blSO1AU8fxgyyd6rOfXdPzasgG6f+z/WiGloxdnmSMWBQ/DHS+5x86J6Js+sg3 XUGXaywuPT58TQ79yb2C1ExLoAL3oczQ9P8mIbTgJnDacrb6GD62020GErk0t6qo5eUq yl5mVfvRi0op9k3pkstcJo84Wxn2tDNRpXwCrgQ4GzPwn6BGVGTF8gVe0KHiGynsK2UQ l+2BoCv0i9iu13ZGFcLLb/6GheB+YP2o5H9Wwu6gvU8xZbtVRq9YMvzcaH0ygnmrvam/ bg3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=33Beb3UWNrnG47QEWUCuKu06Yy/rgf1M+3g9PXxe6cI=; b=msp0zvaBABYDq3MujWdflZ+o9fzd8M8pBetDeOoMzSzjThc2ojoK89Css4t4u60roE BO2MDjOqxvGiYAIzuhGK1OVk4Lwlb8i1C0kyCMmmUmkZfiVLeucM3HwWC6t7nmTGXW7Q PW37uY/T1n8j3bgC4gof4G5wC8ofeJMgm0knpQx5Gcpy120i9TGIutqL4bFTitlovl3b GCRUH6CPpdNSly3ATI/cGUJN6lW5kK7aLI8d3gD/quoENhchT5BEFHcgEhO1HGkIkolf KaLn8P221PXLK4bTmnw/Yg9Xb7R29r5lLG2D1sjVLAfwGDbx55wfizq/z4+nVUux9XvS 0dMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hPGpctce; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x11si7502717qti.160.2020.02.25.05.47.45 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:47:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hPGpctce; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aYr-0005ny-5m for patch@linaro.org; Tue, 25 Feb 2020 08:47:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34122) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZkU-0003ko-Gu for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZkT-00044m-AP for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:42 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:40895) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZkT-00043g-3X for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:41 -0500 Received: by mail-wm1-x341.google.com with SMTP id t14so3042062wmi.5 for ; Tue, 25 Feb 2020 04:55:41 -0800 (PST) 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=33Beb3UWNrnG47QEWUCuKu06Yy/rgf1M+3g9PXxe6cI=; b=hPGpctcecNWVS6r7SWnEe9n3xT4/g2BzygzWIxO5t+WNO5n/oeOd7O8hzgU/NeL8un Za5ZkmKPSppXWi4Kjt1kcmuYRDVBPLqI7WPfYfv/B1yOLPgtVRcAPpkNcQpIdsM4pfCD d9aYY9WaOsqpVp11WQr5klYvdov9FLJl/zdjCy3kuEdS1Fg6SbBP8O60WPkyANYqsf5s 0oP49k3VNi0aeoD0N5OtbOUW07BEQcqjDnnynK0FAMw1mWJ5nmOJeY6hWo00mkltXY2c nm0dxzu0KkpJWVv/xEjD8vPJNL5fn5nZ6XGogz68p0gDWv7szw/s5RW9eWFnH0krgtY9 VGBw== 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=33Beb3UWNrnG47QEWUCuKu06Yy/rgf1M+3g9PXxe6cI=; b=a8IEvy96L49+gID+law8rB8qlw16I6wfUfcvBBB0cR54FRiUM9UFjY4aYzIr3GJTQW sBWSCU/KWGuV8l9oZw6RDDQ7DcYy2FOg6NUWxL4HEANe9QqfpbmpPUWzWe5ucOVih94t OgUH1twuaWea7uro6yzvMTGFh95uokPdnKhsj3agTwUzYe3MIBCbSVcm5UyrHarjOXEn 54+SB9YMHhALrJII0mMObCJG1ctf0eSNfyZpiJ0yZr0Yv+q9kJVX/+yDz//zY+51YKm+ f5rbUZ5Thho2vhgwCYJjrq5GdSDYWuJHaroqwjl8G+FIq1nxAVe+LG0wGM5fcqRiFxr2 YbDg== X-Gm-Message-State: APjAAAUNmI22Q7T1FsB6xA1ijpkUlAJqaP4aL4RCETjoXnT5u7Fidmbi aV4IZIRZ70eyWPjuTO79n/bBXA== X-Received: by 2002:a05:600c:2283:: with SMTP id 3mr5244353wmf.100.1582635339975; Tue, 25 Feb 2020 04:55:39 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o4sm22856681wrx.25.2020.02.25.04.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:55:37 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B5F4E1FFA5; Tue, 25 Feb 2020 12:47:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 16/19] tests/tcg: give debug builds a little bit longer Date: Tue, 25 Feb 2020 12:47:07 +0000 Message-Id: <20200225124710.14152-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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_Benn?= =?utf-8?b?w6ll?= , richard.henderson@linaro.org, f4bug@amsat.org, robhenry@microsoft.com, =?utf-8?q?Philippe_Mathieu-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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When combined with heavy plugins we occasionally hit the timeouts. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/tcg/Makefile.target | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 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= # If TCG debugging is enabled things are a lot slower ifeq ($(CONFIG_DEBUG_TCG),y) -TIMEOUT=45 +TIMEOUT=60 else TIMEOUT=15 endif @@ -137,7 +137,7 @@ PLUGINS=$(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=30) \ + $(eval run-plugin-$(t)-with-$(p): TIMEOUT=60) \ $(eval RUN_TESTS+=run-plugin-$(t)-with-$(p)))) endif From patchwork Tue Feb 25 12:47:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183846 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1777483ile; Tue, 25 Feb 2020 05:52:02 -0800 (PST) X-Google-Smtp-Source: APXvYqwM9wWRzZpY81oj6ORvmCkXjiWJp2TD+Dgp5TuX8idFN2AjezIwSTwyQGpJRRCi1V6870kQ X-Received: by 2002:aed:2284:: with SMTP id p4mr52731699qtc.329.1582638722741; Tue, 25 Feb 2020 05:52:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638722; cv=none; d=google.com; s=arc-20160816; b=DlO5qmJymy3fPP7xzUQHDpIJRX+wNzOOcc5NlWVIo+hkCSNWOuuiFdgKsPp3gwx5Y5 GEFb0O+szy8YWkeHUWXuovGFckn/okDjjqC269hmEFmWxRomQO/OedaelS6MuMGH5SN+ 4NYsq/KdZIKIR87XJY0Pp2tVCusjAg/oySzF1rhznSgbLbJXLYVCMGcWMcfyxn4Tp//D OMROsV3cxbXbxX6gLCSXhTMzLzxll3BIR4uIUb9u1qh371eCJOlUWYRYO2aheYzMuodC 3sm3fiMAoDllWqvN6/xJnrhPBV9uL0wLZTGjJ7BzWLgbnDfXwyWp5Nwo3DkXtx1YgEKU VyJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=EBaGCMW6W6S2Wg/FY9JiNSNkk1jY3/TyEWd55UX+4ek=; b=i+PIVRid/kk+0Xskh15nW3yZ7P7YnEoPIPKieBxe6izr8NF7WZJ1zJXRDv5c9F/JzS Yu/oXKV7njmgQbMwCySzujXl5dLnTy6iA4jTchlBbsxhmJYzGL3Yg+tJZFPWD25u3VZp ocSi1CRL9blGjLz8echU8rv8GNIJvh7T7ZwZdZKWAujAHXLmTybUPchMDQjN26LEpuoB VjoYPWwp8dgkcN38oCG+sQOMlmBYP1USlePuHaO0yns67O04tDeHz4xELgclTesDamDO HkbuK5XqFObmKaOvwfzqDbNZwSXnPHWzrD82snxRrk1oqOoR64OsFwlk/l7fpoBUac90 OKNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Wlc/hzHX"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id fe2si6547960qvb.154.2020.02.25.05.52.02 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:52:02 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="Wlc/hzHX"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ad0-0004uR-B6 for patch@linaro.org; Tue, 25 Feb 2020 08:52:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34166) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZkW-0003pC-HL for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZkV-0004A9-F8 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:44 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:42110) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZkV-00048g-77 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:43 -0500 Received: by mail-wr1-x443.google.com with SMTP id p18so10963749wre.9 for ; Tue, 25 Feb 2020 04:55:43 -0800 (PST) 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=EBaGCMW6W6S2Wg/FY9JiNSNkk1jY3/TyEWd55UX+4ek=; b=Wlc/hzHXbGUzouldUtC2d3w93tY3tBXwVYf7DnxH2x1Ww7rQwpHCNMwF46GPpJ/kxf QcJZpGIWgur4DasbTEOcFuWzjjwUDfVUX13yv+OOdsoXT9w9eDh2jtq+cQ78wyLkZqwF kszseq0rmPJnqbCWWJpBIY4UsrEB8togkUpuUdCVjDV+dlCYD7zc37kZIDXBrikVd8gd I6kEy1i+g6Jg243zPs3roeM6ysSfofsvIkn4tIDvt4tYrwJlQ3N8Ac7fTR3kNnngMAin oIbqmzQylyOlfGHQM0DrDTNfffS2u11OJ8/Um/PGtd8ATfkGH82TavfAMTA8JEruFzX/ svUg== 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=EBaGCMW6W6S2Wg/FY9JiNSNkk1jY3/TyEWd55UX+4ek=; b=tlJeHupX/Fo+alj3eg3SMML0m5O36XJRxiQECuGSNmz8R7ZvNp2mYjB94pXu/Q1HBa nUXKoGroRiSC7YxrsS7G4NU/rBn4e3ZYlxFPgwzD+wjD3OQ3coBaU4IWWwAsqzHAGzYS ysmGKwW64hFWEf3PAhi6M5pcZb1wAxam1jHkoanKrqKuDofd3DE9d5fj+0ZPxpMqc6b5 w26hxGwmyunGdLP1q+86QiS5gFesN4towrlg4YaEo/bUAkNiryVlhrMdEzmSZggahUR+ 2JLs1tIT2bKpGS0bc+lIz3ADuNQj1CzB8y74lTXKRlyf1u1GJxPB5F4l1b76Vxg6CkN5 nSvg== X-Gm-Message-State: APjAAAUmTh4ezTEfQBMJBusKBvrfPuqpcO13r4n+S/0jNZKMLpT/NqnG e0FaH6pihmCabpsJSl5DeVuJUA== X-Received: by 2002:adf:f18e:: with SMTP id h14mr14710204wro.51.1582635342188; Tue, 25 Feb 2020 04:55:42 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v16sm3964669wml.11.2020.02.25.04.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:55:37 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CE1961FFA6; Tue, 25 Feb 2020 12:47:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 17/19] tcg: save vaddr temp for plugin usage Date: Tue, 25 Feb 2020 12:47:08 +0000 Message-Id: <20200225124710.14152-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 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, berrange@redhat.com, robert.foley@linaro.org, pbonzini@redhat.com, stefanb@linux.vnet.ibm.com, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Reviewed-by: Richard Henderson Reviewed-by: Emilio G. Cota Cc: qemu-stable@nongnu.org --- tcg/tcg-op.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) -- 2.20.1 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) } } +static inline TCGv plugin_prep_mem_callbacks(TCGv vaddr) +{ +#ifdef CONFIG_PLUGIN + if (tcg_ctx->plugin_insn != NULL) { + /* Save a copy of the vaddr for use after a load. */ + TCGv temp = 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 == NULL) { - return; + if (tcg_ctx->plugin_insn != NULL) { + plugin_gen_empty_mem_callback(vaddr, info); + tcg_temp_free(vaddr); } - plugin_gen_empty_mem_callback(vaddr, info); #endif } @@ -2822,6 +2835,7 @@ void tcg_gen_qemu_ld_i32(TCGv_i32 val, TCGv addr, TCGArg idx, MemOp memop) } } + addr = plugin_prep_mem_callbacks(addr); gen_ldst_i32(INDEX_op_qemu_ld_i32, val, addr, memop, idx); plugin_gen_mem_callbacks(addr, info); @@ -2868,6 +2882,7 @@ void tcg_gen_qemu_st_i32(TCGv_i32 val, TCGv addr, TCGArg idx, MemOp memop) memop &= ~MO_BSWAP; } + addr = plugin_prep_mem_callbacks(addr); gen_ldst_i32(INDEX_op_qemu_st_i32, val, addr, memop, idx); plugin_gen_mem_callbacks(addr, info); @@ -2905,6 +2920,7 @@ void tcg_gen_qemu_ld_i64(TCGv_i64 val, TCGv addr, TCGArg idx, MemOp memop) } } + addr = plugin_prep_mem_callbacks(addr); gen_ldst_i64(INDEX_op_qemu_ld_i64, val, addr, memop, idx); plugin_gen_mem_callbacks(addr, info); @@ -2967,6 +2983,7 @@ void tcg_gen_qemu_st_i64(TCGv_i64 val, TCGv addr, TCGArg idx, MemOp memop) memop &= ~MO_BSWAP; } + addr = plugin_prep_mem_callbacks(addr); gen_ldst_i64(INDEX_op_qemu_st_i64, val, addr, memop, idx); plugin_gen_mem_callbacks(addr, info); From patchwork Tue Feb 25 12:47:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183844 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1774318ile; Tue, 25 Feb 2020 05:48:42 -0800 (PST) X-Google-Smtp-Source: APXvYqzRQYxiVufZt4ymx02UlhnjOCwI2A9lAVtljMU6TRjsueS0HRvzdozwRqBpNjjRNhAiABLH X-Received: by 2002:ac8:7357:: with SMTP id q23mr53864326qtp.12.1582638521974; Tue, 25 Feb 2020 05:48:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638521; cv=none; d=google.com; s=arc-20160816; b=lN7/asgLLoONmjBJ1uKBDwer3Xd85ZWrO7ixdm4yocd4d0A7npFy8lblyAo++RvpvE Jzo7HewRivHJCDeU+Qm06aGSSNRAxIOVoVzS9ua/2z+2SWeW0Ll+G/h1akYC2RfZwCLI fZIYnLRuYEikwKEyzIwjb68Uq9d55Ou8aXlubHb/i3zQ8x4SELNQe8Yr7uV3dMRhL/2G y++m1n87py6hnFxkp5ELiEBMULta0D93qQv1WfZOqXna5m+KUanq+B02MQpKrwAEc5E5 Id+riaMBQhIAbBdCzVAy4ZTHwVE1ESjDofrjZ2MHagvFvvFzFDeVluYDoCRuPhdB0iy2 NcMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=0p1SeaSzVNL+Dpq/RgeGL6vQDYFqS32WjhR7r4VpWNA=; b=DmrwkXB9D+v6X0UvVKtDNcRZRK2yXR30N7UAfPNnVjduWaISeqMoNQzminNvLt0tp4 DZV/26n20EmHDvOB1thS6wBUr/oOZgV2a7sZR/WKFOtiXVud/HmeLzcc7S6K5nZgPo2+ JZVfQbeSGTb0vYsPSDo2ASjfM0wboiMLG4qhoAvOO68Gp3zl6lO5gLHSkfLLAw+3UtRz 0p8/PDPC0HafF277+IJbqcv0wJBH/bVxA8MKCjBSB68fBEP+fUIY68CNkGB9AG5Plfeb fnwssWHZo6OVhV2QZdcJfcP81sOrRENkKujFqgIC+RRZZfQ8LWj1ZJ+N1Q/+aZkjJjPB octA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=g1AW8QUj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dk19si6834765qvb.106.2020.02.25.05.48.41 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:48:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=g1AW8QUj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aZl-0007kM-FQ for patch@linaro.org; Tue, 25 Feb 2020 08:48:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34238) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZkY-0003tz-I0 for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZkX-0004DW-Ge for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:46 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:34904) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZkX-0004BP-AG for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:45 -0500 Received: by mail-wm1-x32e.google.com with SMTP id m3so2870857wmi.0 for ; Tue, 25 Feb 2020 04:55:45 -0800 (PST) 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=0p1SeaSzVNL+Dpq/RgeGL6vQDYFqS32WjhR7r4VpWNA=; b=g1AW8QUjiTQwfFU6v/KGbr5nDgysBSwFzbGn6L1UEg4CFS4y+c6bSiKGUsWVrAEtMy tvVUaxch120g0LHI59hlL4ShT5LYTUpIj+fk/1tPjyCmqKIh+k4eRLJqNIEwFZjB5zEz uvUTtjSadwQmBQQX8+dsuS1u6q3l866+rYuAAytHE0+6dz/fs06nVHR0Lg3FSShgv+bI ZTGadZPvML9y0y7xfnL/Kr27Khc5mpfLJeldQMCUfBwA+X8M9Hd+SB5dm2bcQZCALHNh TE68ixFuVlo8jLkE9tQq9lg35EoktX66+y664f35OE6gQLVkoaDRpJVXQ1TcU5pk+A4o eoHg== 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=0p1SeaSzVNL+Dpq/RgeGL6vQDYFqS32WjhR7r4VpWNA=; b=YpG4PU5RLwCeE99HNxGlQzFHuvdPnggpRfhpUxeyhEQnBM8zs49bzFGrfjW0sXiICd 8H3KZLzCiOiyLelyl0ykMrD/V7TeK+0fMg/H91XBAXKYm7wVdbvRr/JIqvyYlscfZhvh tPUR5rHO7tSOLgyqUtU4JU0apWC3ibRKRG5026FLoU4iLLWKML24c0hQzqyX7o4ls/aW ikV28mnF/yGlsFVXjQqNcLBw36szjZKKLREEEB+RRAzOj+QgxmajfwWQIGcbeB40bBeE uOAAWwdRxLTfKgk9+qpGklkQw8bD71O4I1OoxN1rBqAv9cEM0DGzI7aQjZRTEZxzhRlX Li7A== X-Gm-Message-State: APjAAAXmCRXtaN7nvRFH7uqA/vef6emDJ0BWuaWnlOkBC6HK+9oQe4pC W2743BhcqzjLgj+rvLsstDqunA== X-Received: by 2002:a1c:b7c4:: with SMTP id h187mr5512492wmf.105.1582635344046; Tue, 25 Feb 2020 04:55:44 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h2sm23945190wrt.45.2020.02.25.04.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:55:37 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E39541FFA9; Tue, 25 Feb 2020 12:47:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 18/19] tests/tcg: fix typo in configure.sh test for v8.3 Date: Tue, 25 Feb 2020 12:47:09 +0000 Message-Id: <20200225124710.14152-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e 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_Benn?= =?utf-8?b?w6ll?= , 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Although most people use the docker images this can trip up on developer systems with actual valid cross-compilers! Fixes: bb516dfc5b3 Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- tests/tcg/configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 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=y" >> $config_target_mak fi if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=-march=armv8.3-a -o $TMPE $TMPC; then + -march=armv8.3-a -o $TMPE $TMPC; then echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak fi ;; From patchwork Tue Feb 25 12:47:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 183842 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1772479ile; Tue, 25 Feb 2020 05:46:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxmGd0mEtenQQzeECcXwVVqsv1uUluGcbX9/bMURyhOx0AuavcTgDp+vPs5Ky1E4x8ZGWT5 X-Received: by 2002:ad4:5009:: with SMTP id s9mr49498633qvo.30.1582638417847; Tue, 25 Feb 2020 05:46:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582638417; cv=none; d=google.com; s=arc-20160816; b=ikD+XdthAd7qIDvF3qWcOjE23GmuZbHp0IoexKq1QFFcsDdk6Oy0xb0pqwEhR0XHam eTnKbIJccv21WpZNahZ87cj8M/niMK1xxNCQFYZwsN+QujXNAHGKGTAFqBwOkwz0Thst JaENO48k9n/aHxQStOuHpj061YvWW7D27rmAEdMhH/mlB6XvRvcROU9u+isiNd3/ExDO 1UiXD4O/DmGCEo4tgSABp7+es8LvtMa0ROVZj6GXBaQoOyQdfg2VtCpQ4ul99JeOh5j0 nU3FagRB41hR3+sbfS2Pg9+o+26l450IfZ8sh25IwV2R88t4o2s767kk9yTLY6bsbNZF azQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=8Fr7X3j1hpA17dyvd8eW/tzfRhUBtEPlEUDx8NRA9zY=; b=G0lcM3UqQ7lFA4NJyULT92WEuBaILxmxRjBI4wY1zGN+X6s9pG4ZHCW1wA3OQNpz1c Fuwe3rlb8vRgn1GX8pJgWhsp0p3+/SJ46KxShzPF2O5+QPzrEjiepfu3KU+P4rU5L4sk uAAemjjeZFWlqgKhvm/1UILKyrChXudeZR/gAnis4QSqKmIkNG2O0IqzWAKY8H8EQ72K 5QHOAuxz51cFnXrjSuUb/5nq+WUao+vkjACc8IkWsJzBze8EXf4NDleRri3WkcJ/Uxcg xHVGHlYucsiqUbDjzJJWJKZ6xLZQThQoKs1JC3URzWsQoct3g5DIfH2aON/4ebA9FAbE RBZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="J/84oZbG"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b9si7855414qkj.334.2020.02.25.05.46.57 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2020 05:46:57 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="J/84oZbG"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6aY5-00055R-Ab for patch@linaro.org; Tue, 25 Feb 2020 08:46:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34102) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6ZkT-0003j4-Ty for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6ZkS-00043n-GY for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:41 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:44370) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6ZkS-00042i-9a for qemu-devel@nongnu.org; Tue, 25 Feb 2020 07:55:40 -0500 Received: by mail-wr1-x42f.google.com with SMTP id m16so14574800wrx.11 for ; Tue, 25 Feb 2020 04:55:40 -0800 (PST) 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=8Fr7X3j1hpA17dyvd8eW/tzfRhUBtEPlEUDx8NRA9zY=; b=J/84oZbG2Axvm00DFoiAsb4XK0PZIZA+n1YJeb44E4JP0Y/vYDJ4AtA31HmbYwk+L3 CpNsQYUxm6ceCiMShd9AcCSMSOrA6oWIOA5KGmEpPEc8ZTIz9IZy9MW2jQEwLVchhw7h a0CLXAlMNbq9IDLbanVf8v3WMr3ITikrGgHM+sf/4MfDkVUaJW/qz+ratAjIpJhwoBKz B4IuSqOl84Bcukh8nmN8ffWCaFBQoT8o1HAWtB7cS4Wl0t5Fkx8pZMPChNIEycBXnGUO 8jmcXDLWZy3jNF9qKMgg0KkAoP1QFpsDaqbrP2dLjzYkkGLUmpq7o3AnIAIIXN0uS/na oN+g== 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=8Fr7X3j1hpA17dyvd8eW/tzfRhUBtEPlEUDx8NRA9zY=; b=RgDuF2w3/R04bk4R8Tiz5hzU8/EIVDAxmYfwFE+AvF17Lv+Wk97vh1qY4QM+AdnTRR 3Pxg8xFcNEuf+4fNMLDvIwO6ovWsueMo5xPut+VU0kHBqsmTYop9i/YeUmSrzyl+aL5U N5mUunBr2VUVg6euXOX7Om6jdRAWAYePKBiE3w6WzHCO1UfSFcMYXZpOtxiUZzwwaMAD QSJWlsibC5B/rljZeio2Wk41PpPi5gnOpulRZ9sXpLaxxL+iJb3PWueUkOSM0sMygYCA qpKex3YrlnJkFNEqDv4syEHouPFSxn6c76VNhha7cMM+rs+T6elriVhmPuOeRwz8E3LC 74Gg== X-Gm-Message-State: APjAAAUPQvm+LUzYAasag/ASnf04CnKrJ9egkHw1UMpM7xW5K0S2PSCN 7kJpkereDV7hhOshhMK/PlMoqA== X-Received: by 2002:a5d:4692:: with SMTP id u18mr73622902wrq.206.1582635339066; Tue, 25 Feb 2020 04:55:39 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r1sm22988584wrx.11.2020.02.25.04.55.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 04:55:37 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 049FF1FFAA; Tue, 25 Feb 2020 12:47:12 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v3 19/19] tests/tcg: take into account expected clashes pauth-4 Date: Tue, 25 Feb 2020 12:47:10 +0000 Message-Id: <20200225124710.14152-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200225124710.14152-1-alex.bennee@linaro.org> References: <20200225124710.14152-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42f 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_Benn=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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Pointer authentication isn't perfect so measure the percentage of failed checks. As we want to vary the pointer we work through a bunch of different addresses. Signed-off-by: Alex Bennée Reviewed-by: Robert Foley Reviewed-by: Richard Henderson --- tests/tcg/aarch64/pauth-4.c | 54 +++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 17 deletions(-) -- 2.20.1 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 int main() { - uintptr_t x, y; + int i, count = 0; + float perc; + void *base = malloc(TESTS); + + for (i = 0; i < TESTS; i++) { + uintptr_t in, x, y; + + in = 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 */ "=r"(x), "=r"(y) + : /* in */ [in] "r" (in) + : /* clobbers */); - 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 */ - : "=r"(x), "=r"(y)); + /* + * 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 != 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. + */ + if (x != y) { + count++; + } - /* - * 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 != 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 != y); - return 0; + } + perc = (float) count / (float) TESTS; + printf("Checks Passed: %0.2f%%", perc * 100.0); + assert(perc > 0.95); + return 0; }