From patchwork Mon Nov 29 17:14:42 2021 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: 519715 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp6385415imj; Mon, 29 Nov 2021 09:16:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRVIz99KISkb2029Bt4NrEd2F9Bz6o7hcWYCOWzpQCKYQTfbfd0LgGEZX2Is/u54bPcW4e X-Received: by 2002:a50:ce4a:: with SMTP id k10mr78316081edj.31.1638206197951; Mon, 29 Nov 2021 09:16:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638206197; cv=none; d=google.com; s=arc-20160816; b=kDur2M5j/O6Y7OGCaqzMKflCU43QqfnEaG8zFc1cRnCnGKda72xfw46LC/poRypfpG HA0P7UtRZGvsfWxwN/vyizHkP2D54qAuedjGqECuw/ZzRB7UxsDwmoS9NqbRoOQ2SPIX LiqXe3j1Dkf7vlRLY+e2GXN54wzq4NLhGfYNzOUYH4RUdZKPIDnuetfAnPoXMUJgSUQL o3AIZ0cI1s6go+LZQUm/spMOnZMcMsnIO4qeHgw+hiD2SEmouT8JgQtzvSw1g/9vWaHz olS9R935xPZg30HA9e4/UpRlg//u1/y3bCSp+l2glBuGhMwPShCkePk82o19U90H7PGE 1DYw== 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=lyxCRPNO6Jc52Ko0I+nv2kkDmAau474j9b256EDB6Mw=; b=VfWPU+UIPbwBAC7GYYsOssJpX4fJUEnXscVM0Z4dlwyDYpWExcaaGHyxCOstCjxjb0 mWu2OBMdwQUrHs/NkU63vZVEXjWEK+vt7oDBx9mULPmQTrmXdnBT9CgRO0Bt+tHfoP7Q mtSXXrN/xnn3b5b4BU1z4c+jCCbQbBZ99K/L4/Htm2QpFKFXKJbM1XvWn1Z4luDJmjG9 duPPbQi5opoa26xdkOLSrsOmEQxa7XGYJNOzOjKQUWPdtG8BNbsGhGt+WLyecgrkPsjj ECLTIR2UbvcrMWZGQeU66gUflsmq9yFfEkmjkbVZYESNZPihzfK+2qVIrjc3yVaEVnpR vHdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JChVEm8T; 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 i7si27872340ejw.714.2021.11.29.09.16.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Nov 2021 09:16: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=JChVEm8T; 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]:46286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrkGb-0002RY-0z for patch@linaro.org; Mon, 29 Nov 2021 12:16:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrkEx-0002QJ-Sa for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:14:55 -0500 Received: from [2a00:1450:4864:20::42f] (port=39533 helo=mail-wr1-x42f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrkEw-0001Tc-B0 for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:14:55 -0500 Received: by mail-wr1-x42f.google.com with SMTP id a18so38434963wrn.6 for ; Mon, 29 Nov 2021 09:14:53 -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=lyxCRPNO6Jc52Ko0I+nv2kkDmAau474j9b256EDB6Mw=; b=JChVEm8T2v7horwNGPkAAZNNKFmrTVI8fCjrWDE832Y79cT0LaXj8/UTX7EzeHj5g4 Qyn5N3ZKGtcmVqfnEoAW9kDc9LyUjVWeDTmE+AGaIDznPSacHh8lCwGIZSLRyANY4QaM yJ1UQvnXUwiADtf97AO4F2UwZDlvD68xNnl/tzKur3abKivMFM4lbcltk9hWwLqs+0ZL Cp23g8ox3IpxwnOQfjm3vvTFfzLrPu9tadL9y1GUhYu1Gv60Yum1UKRrTGeOdYKWYqWT e3eNhYj/BQph9sbReW3gZPJmLYHdEWg8ZTE9cVqNb4FkU4QlkAOIxKtAnopxqUs8tsRi 3Z6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lyxCRPNO6Jc52Ko0I+nv2kkDmAau474j9b256EDB6Mw=; b=TQT3DbD69i8ePCGpebS6zA2TqCy2Sa2Y/2r2s1L8Oq4vgduR5Ld49K+gXHif/+q8kP zJmSs3wh5/x/ZbOUvLsDW+yfAqTlkIaIsMhs32w3wl0TxDY1GzkTyxNzPnO+UzdGGYed 6qRv84qIlyA6wNhcDwgnmOy1KoXXdOpxM/0kPD3kCMTjbAolslNaTB5ZLU1GC45O9IqG Fha/YV+BjbN+bFkD7Mmr1p2ZbHNHZtnuwubJNuSyVLmdYJHb5mHm/SEzd3GsnEgQcV/Q ouv1raq2pqA3Hdc6d7xmboM3nCOQOQaDbw0uvC+skip2hX2E9Yx4euh2qREfPX9w4vCP eVbg== X-Gm-Message-State: AOAM532xIaYuE4SK5EVSVC1Rc4ThVimSHWGV5iZ4gs28ZzJa8eJluJMl 5PAg4BCdmKBiMJCF3mRSkZ64xQ== X-Received: by 2002:a5d:5272:: with SMTP id l18mr35642566wrc.208.1638206092006; Mon, 29 Nov 2021 09:14:52 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 38sm14823247wrc.1.2021.11.29.09.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 09:14:50 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D7A3B1FF98; Mon, 29 Nov 2021 17:14:49 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org, peter.maydell@linaro.org Subject: [PULL 1/8] accel/tcg: introduce CF_NOIRQ Date: Mon, 29 Nov 2021 17:14:42 +0000 Message-Id: <20211129171449.4176301-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129171449.4176301-1-alex.bennee@linaro.org> References: <20211129171449.4176301-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42f (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Here we introduce a new compiler flag to disable the checking of exit request (icount_decr.u32). This is useful when we want to ensure the next block cannot be preempted by an asynchronous event. Suggested-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20211129140932.4115115-2-alex.bennee@linaro.org> diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 6bb2a0f7ec..35d8e93976 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -503,6 +503,7 @@ struct TranslationBlock { #define CF_USE_ICOUNT 0x00020000 #define CF_INVALID 0x00040000 /* TB is stale. Set with @jmp_lock held */ #define CF_PARALLEL 0x00080000 /* Generate code for a parallel context */ +#define CF_NOIRQ 0x00100000 /* Generate an uninterruptible TB */ #define CF_CLUSTER_MASK 0xff000000 /* Top 8 bits are cluster ID */ #define CF_CLUSTER_SHIFT 24 diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index 610cba58fe..c57204ddad 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -21,7 +21,6 @@ static inline void gen_tb_start(const TranslationBlock *tb) { TCGv_i32 count; - tcg_ctx->exitreq_label = gen_new_label(); if (tb_cflags(tb) & CF_USE_ICOUNT) { count = tcg_temp_local_new_i32(); } else { @@ -42,7 +41,19 @@ static inline void gen_tb_start(const TranslationBlock *tb) icount_start_insn = tcg_last_op(); } - tcg_gen_brcondi_i32(TCG_COND_LT, count, 0, tcg_ctx->exitreq_label); + /* + * Emit the check against icount_decr.u32 to see if we should exit + * unless we suppress the check with CF_NOIRQ. If we are using + * icount and have suppressed interruption the higher level code + * should have ensured we don't run more instructions than the + * budget. + */ + if (tb_cflags(tb) & CF_NOIRQ) { + tcg_ctx->exitreq_label = NULL; + } else { + tcg_ctx->exitreq_label = gen_new_label(); + tcg_gen_brcondi_i32(TCG_COND_LT, count, 0, tcg_ctx->exitreq_label); + } if (tb_cflags(tb) & CF_USE_ICOUNT) { tcg_gen_st16_i32(count, cpu_env, @@ -74,8 +85,10 @@ static inline void gen_tb_end(const TranslationBlock *tb, int num_insns) tcgv_i32_arg(tcg_constant_i32(num_insns))); } - gen_set_label(tcg_ctx->exitreq_label); - tcg_gen_exit_tb(tb, TB_EXIT_REQUESTED); + if (tcg_ctx->exitreq_label) { + gen_set_label(tcg_ctx->exitreq_label); + tcg_gen_exit_tb(tb, TB_EXIT_REQUESTED); + } } #endif From patchwork Mon Nov 29 17:14:43 2021 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: 519722 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp6395199imj; Mon, 29 Nov 2021 09:24:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyL1S5p2im6bFPAd3Qy5K9lAVmoEpCSRiqrx5uUH1LkN8E9O4D0x6ymQE881tLJ+5oCwlRT X-Received: by 2002:a05:6000:118a:: with SMTP id g10mr36234257wrx.533.1638206672740; Mon, 29 Nov 2021 09:24:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638206672; cv=none; d=google.com; s=arc-20160816; b=or7yS/I4ADv040UZc8rnxuvDUo23RbWCwjisNJMTd4BNB96cq6Xa9YOzisR3sB6jbK BoZ+IrkNf/fqACLUk+x90zlquQQ54IXjf6CDnaF+eaJJNJhY2ZoQAugk3IELYVvZb2Ez UvIOE8QkLs89XkMhPbu7XhcG7pIi79PlQe5s0ToRmkFplInAvDyKj04nAmR6veLosHha b4rfr6HKF9B8yleZwPb1GUI8WXHfjoOSdxilBqoDgtxj61EyVPXq9L2ouwGEfbcazLsZ tSBqMnj9jIuT8akdK5yfVhovlyRuNtbdgmI6YabLRSnNiY9oSQhUdc0s4/zuQ2lPuuzq bLAw== 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=Rlh5dx+JLtLLbtjX1Hc1RwZUVYx8Qo0Y7kdSVPcCdrQ=; b=x6+Nbb4ynB9fSuS3y9yWpjxDNgavCZgFUk1f9XLNk0ZGe+4345NuGPT/R+LB1bzi17 1L6xuRHMhERSRJE+OsT3QH4Kvh0iU8F3MmXQa3Tf/V3lq6Owbw3MqXwWMt6/TnoL55Ad 4gGrS7SKfEoqlcg0oKJLOEhddOXrBDBzHUQq5Aiq3x9zpRen2GvBWfuwGARyTaYPkxXH /z7KhMvntHsk0awpcX9k8wT5hNvmziU9pLlvR0vhrhCLtW8vPcQrWbopO9dwf7Nw9WPn IS96ezTkIF4M8O9TBtKzColftWv5E0gMMaX1AkQFtgWSrJ3E96bh0Hwjj7TcBe2BQ15X I5AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IFyAje8G; 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 e12si25914884wrq.622.2021.11.29.09.24.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Nov 2021 09:24:32 -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=IFyAje8G; 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]:33586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrkOF-0004zX-E3 for patch@linaro.org; Mon, 29 Nov 2021 12:24:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrkF3-0002Su-Qi for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:01 -0500 Received: from [2a00:1450:4864:20::330] (port=55060 helo=mail-wm1-x330.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrkF1-0001Tu-JX for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:01 -0500 Received: by mail-wm1-x330.google.com with SMTP id i12so15274637wmq.4 for ; Mon, 29 Nov 2021 09:14:56 -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=Rlh5dx+JLtLLbtjX1Hc1RwZUVYx8Qo0Y7kdSVPcCdrQ=; b=IFyAje8GFZ37QsFuIcIG/6/tf/HNVcnuu+TlH/c9xjYYxDJiB0sHp5VLe15q0Tc/T8 vvM9PzVK80n9jpriyzyzWzxQOYZ/5yuL/ebREfI4ytbrKbgAJNzRE0rKMHcDpZS+7iWd fM76fIQnEWQQvnZZ2v8uW5xdW7lKF8S0od+5bvS66iOK0FaItC4r6YsVj+tkkeX1tA/E SoWR3sqYVZRqecv30cg5vUFkv9j9Wko7VVdEN5i9sbcUH7pLopg+8Tb0LypqJgZpgSL1 KqjcxuNn7NejRy5l8qKrF0iA7sSx+jRb2r6LWuAS+Ef1qWn6p5YZ5rVvxhOfrrSdw1Ij BIeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Rlh5dx+JLtLLbtjX1Hc1RwZUVYx8Qo0Y7kdSVPcCdrQ=; b=Wg3UkwKFtbsVDF/mFG1pUrKYeSFufg15xAchocx5xyRFM4lI10BYuyH2zz1P8fgYRg GTwMO76LxOVA7lCaKY58tS0XuBESJIEKROa5ZCXYg2dtnxQwxmNANS85bLUVPwy8MDcx PisVl7JZpO3qKy6APC+1F2UJTEjYh1MUkEyY+7vnzVIuLIrFN074m9tU8hgDD6ETCV/j V57Wbkrz0qWtvGl2RkPWEmzv5qspvn8GgEL7YtLAVn1l2pD2MADp4K677qjUf9vH8F7N MZKMIhI0p6OOl+BhpJ9qkZ3KDLjdPuw8ICqz6itJ/Ej+fBu8zOupJlNDE/67CBPskHDg frdw== X-Gm-Message-State: AOAM531T5Q4Eo4rbawEU69EH4zWH5YPoj01K36w35aEkFdWTSslO7Ps3 jX21WV5CUFlohiaKzwEbB2dMjQ== X-Received: by 2002:a05:600c:2308:: with SMTP id 8mr37255511wmo.179.1638206095350; Mon, 29 Nov 2021 09:14:55 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m34sm25918147wms.25.2021.11.29.09.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 09:14:50 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F29F51FF99; Mon, 29 Nov 2021 17:14:49 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org, peter.maydell@linaro.org Subject: [PULL 2/8] accel/tcg: suppress IRQ check for special TBs Date: Mon, 29 Nov 2021 17:14:43 +0000 Message-Id: <20211129171449.4176301-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129171449.4176301-1-alex.bennee@linaro.org> References: <20211129171449.4176301-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::330 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pavel Dovgalyuk , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Peter Xu , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When we set cpu->cflags_next_tb it is because we want to carefully control the execution of the next TB. Currently there is a race that causes the second stage of watchpoint handling to get ignored if an IRQ is processed before we finish executing the instruction that triggers the watchpoint. Use the new CF_NOIRQ facility to avoid the race. We also suppress IRQs when handling precise self modifying code to avoid unnecessary bouncing. Signed-off-by: Alex Bennée Cc: Pavel Dovgalyuk Fixes: https://gitlab.com/qemu-project/qemu/-/issues/245 Reviewed-by: Richard Henderson Message-Id: <20211129140932.4115115-3-alex.bennee@linaro.org> diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 2d14d02f6c..409ec8c38c 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -721,6 +721,15 @@ static inline bool need_replay_interrupt(int interrupt_request) static inline bool cpu_handle_interrupt(CPUState *cpu, TranslationBlock **last_tb) { + /* + * If we have requested custom cflags with CF_NOIRQ we should + * skip checking here. Any pending interrupts will get picked up + * by the next TB we execute under normal cflags. + */ + if (cpu->cflags_next_tb != -1 && cpu->cflags_next_tb & CF_NOIRQ) { + return false; + } + /* Clear the interrupt flag now since we're processing * cpu->interrupt_request and cpu->exit_request. * Ensure zeroing happens before reading cpu->exit_request or diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index bd0bb81d08..bd71db59a9 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -1738,7 +1738,7 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages, if (current_tb_modified) { page_collection_unlock(pages); /* Force execution of one insn next time. */ - cpu->cflags_next_tb = 1 | curr_cflags(cpu); + cpu->cflags_next_tb = 1 | CF_NOIRQ | curr_cflags(cpu); mmap_unlock(); cpu_loop_exit_noexc(cpu); } @@ -1906,7 +1906,7 @@ static bool tb_invalidate_phys_page(tb_page_addr_t addr, uintptr_t pc) #ifdef TARGET_HAS_PRECISE_SMC if (current_tb_modified) { /* Force execution of one insn next time. */ - cpu->cflags_next_tb = 1 | curr_cflags(cpu); + cpu->cflags_next_tb = 1 | CF_NOIRQ | curr_cflags(cpu); return true; } #endif diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 314f8b439c..3524c04c2a 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -912,7 +912,7 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, */ if (!cpu->can_do_io) { /* Force execution of one insn next time. */ - cpu->cflags_next_tb = 1 | CF_LAST_IO | curr_cflags(cpu); + cpu->cflags_next_tb = 1 | CF_LAST_IO | CF_NOIRQ | curr_cflags(cpu); cpu_loop_exit_restore(cpu, ra); } /* @@ -946,7 +946,7 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, cpu_loop_exit(cpu); } else { /* Force execution of one insn next time. */ - cpu->cflags_next_tb = 1 | CF_LAST_IO | curr_cflags(cpu); + cpu->cflags_next_tb = 1 | CF_LAST_IO | CF_NOIRQ | curr_cflags(cpu); mmap_unlock(); cpu_loop_exit_noexc(cpu); } From patchwork Mon Nov 29 17:14:44 2021 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: 519719 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp6390043imj; Mon, 29 Nov 2021 09:20:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJyOJgIak0fXpAUmMPtrbIJYKCg0ylNsDXOxzgJ71taZBEwF+ED1mMTZ8upWKtoJ7J3dosnQ X-Received: by 2002:a05:6000:188b:: with SMTP id a11mr34590494wri.326.1638206415716; Mon, 29 Nov 2021 09:20:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638206415; cv=none; d=google.com; s=arc-20160816; b=lWWXa44/bRM7EHm6Z4TXx3gxw8wUhGLwyDY3s6FdLDj3Z+6bNwfTUkB1llPCKFSbnP 3Xtmb84/Ke62YZUpwE1WyGFA0GvhrSMvOy0bpQlBGZ26TETxoY7aZd7Wj+G9m5vFcE2G UvUfQY9v+3gx51+ZdsPmS8QtA9ak4LgVT/CqL/06OnXROcOdd/2HgoaIQZJwbin+FJYM saYbwx0OpFOxSCs5wFtsFD7kix4Wg6sOnOtkEsM8sSFll3Xafpwd19I/2ZbvMKlqceIy 8nGFszEYMJ64J7/Vy4reAtnUAc5YEYI+dQkayYD1ZInlNv5YImoBpbAhjGPONl5yphtT Q3HA== 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=pSXjooYIqUSopMaI8U32omJPUXeLHjnCad+z87RE0LI=; b=IbiE60W1qLaQacQtoPALQoaXOXEQJCRzHVE/0/UfPzYJ5saiBxxAd3Se8sO2WpJKR+ R4v7zr3q2PY/TywDITIB2ugVeySWbVpYrzIix0l4gTYcFYUb6447055OXdkvdE6PEby8 LzrlHkNgMPWQVqkoXRQAczZPorgEkDcOm+Mcefcrqgc4D8ZTZQVDvZb9SpRBRKhDHjSh qKZGUDvJZCI1HRux6CpT/W4o2libQGBV4sp4qtImjpm5klCwz91lNFd0uFnn/5pFm263 81CCOp9yCajQrpbtwuux89Gmeit7EymikApRkgCbQA5/gOvraP16BjJYlDeyp2ie4p12 0TKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=spHcISJN; 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 v3si23551031wrc.53.2021.11.29.09.20.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Nov 2021 09:20:15 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=spHcISJN; 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]:52936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrkK6-00079J-ND for patch@linaro.org; Mon, 29 Nov 2021 12:20:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrkF4-0002Ua-N5 for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:02 -0500 Received: from [2a00:1450:4864:20::432] (port=35731 helo=mail-wr1-x432.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrkF1-0001Ty-MC for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:02 -0500 Received: by mail-wr1-x432.google.com with SMTP id i5so38418167wrb.2 for ; Mon, 29 Nov 2021 09:14:56 -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=pSXjooYIqUSopMaI8U32omJPUXeLHjnCad+z87RE0LI=; b=spHcISJNgE1rnTte1rq7lSQ+sM6M4Nb393v/D9F3BEPxcq0C3zRr1og1AgP6pE3jXm dMqlOpkYDdSAU0E9BT76saS8VIQQV7Pn4bCg/SWe8vzKO2hS17nTKoykjDzzigB5wSYd 4ZCUz9i7rjkZsqEBriuHXzfGvYcf450KLL5v4LCJz1utsq+S1y+uFGWSYi/T6JPH71nR S/R6jZtkIYjBI48dVeHZX7NHl7qwFGXS/dB3Oy21ph7g+g9lNSq+szsYHvsAzZHU2Nca Tzgc8b1UTnU6hN2ECC5aGXhqq6AgIV3UP2wAlhvJrIGxSvsNVctm/+qgQ0PTgzwg5leH A0Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pSXjooYIqUSopMaI8U32omJPUXeLHjnCad+z87RE0LI=; b=dIjJ4oP+WoHSFmIFH1URFSdkImfS1/qRiG7+YzrCEUuedDdgPmq9c41vUCeGcB3TJA kHkk94u1ynn2wgcl+BAjkrY1XHA5y2wmXXAzO2TYtAVn8wKoLgVlXzlpZnyxt/2inzTN IC2IZ84cnoEDsQnhHSAR0ldks4n/BOvfBetoDhpUCy0/FfIOTsamPT6B/juCJhov28Q6 TOYSVh6pz70bHpgbO6v+VHfpiYumhRb7f6FbCbHRcI25JhDjd5BSu2SvflCwgKqRhRVV a/50KZchpb8a1R5eCH1DrLEfKAUojK00c3wBLo+eZhTR7EutaMcU+sK7T3urvNS608k5 4NJw== X-Gm-Message-State: AOAM532BXvFA3G+W0WCVcbflkj4cQfMoRnGgdg0cFB4HJhJRBAmDOgCj y2IwDMBrnj7rGuD3UKyYRT4svg== X-Received: by 2002:a5d:5151:: with SMTP id u17mr36371708wrt.126.1638206095924; Mon, 29 Nov 2021 09:14:55 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l5sm17256249wrs.59.2021.11.29.09.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 09:14:50 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 166831FF9A; Mon, 29 Nov 2021 17:14:50 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org, peter.maydell@linaro.org Subject: [PULL 3/8] tests/avocado: fix tcg_plugin mem access count test Date: Mon, 29 Nov 2021 17:14:44 +0000 Message-Id: <20211129171449.4176301-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129171449.4176301-1-alex.bennee@linaro.org> References: <20211129171449.4176301-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::432 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Beraldo Leal , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Cleber Rosa , Alexandre Iooss , Mahmoud Mandour , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When we cleaned up argument handling the test was missed. Fixes: 5ae589faad ("tests/plugins/mem: introduce "track" arg and make args not positional") Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211129140932.4115115-4-alex.bennee@linaro.org> diff --git a/tests/avocado/tcg_plugins.py b/tests/avocado/tcg_plugins.py index 9ca1515c3b..642d2e49e3 100644 --- a/tests/avocado/tcg_plugins.py +++ b/tests/avocado/tcg_plugins.py @@ -131,7 +131,7 @@ def test_aarch64_virt_mem_icount(self): suffix=".log") self.run_vm(kernel_path, kernel_command_line, - "tests/plugin/libmem.so,arg=both", plugin_log.name, + "tests/plugin/libmem.so,inline=true,callback=true", plugin_log.name, console_pattern, args=('-icount', 'shift=1')) From patchwork Mon Nov 29 17:14:45 2021 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: 519720 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp6392263imj; Mon, 29 Nov 2021 09:21:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpdDNXbTXo0l7dQ7uV4M01xkF3pYdjlEh80iwKqbKViA8jHL1FXCm0U7ZYyu4UnNd2x4Ph X-Received: by 2002:a05:6402:5107:: with SMTP id m7mr76291807edd.314.1638206518556; Mon, 29 Nov 2021 09:21:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638206518; cv=none; d=google.com; s=arc-20160816; b=0zrJ0IoeaNcETFJ0kU6kpV+iu6Bud+yTPsRwGW+f1cD+pYVFLVUbxK/ZzlLS1ew7g9 kLZXc3VNFrtxRVCK4W9BAf1kKV64XWrytJgdKSaKhr5Q6x/EmTR/oywA6ZTXYctDnd7v sawaIG9sfmV2aZKN3a9qCUDWpt5Eu+GpzPw1lhz8uBHwY8bf2akNzkyMGIAAvSLoft3u dzX9Y1FApLw9Oz2sh9ZY9J4T1ttth+bX9Zw4XK6G1R427Pz6zAZzzlwWGpF7N/BMeK4t DO7mTbOUBiXy3AAuqtv2bAloQpr+BgyAvPXX7cwr9uMZU/6Oiph1hkvXC8prVQd3AIiB C+PA== 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=2GTULer4lRmEbboJn8akTz+dcWrDvvBiAJ4+IAIoMr4=; b=QHZUBlTy+uRwnXhAsbJcbA9xYfUiGKFzQlBBJgVUFq14Nfs2KUjxx4OaWdarJ4tv8p R7yS+0urPboneoQmhTLLy+YeKDCwFNbzVgcnTajzz7edQo4KQE+vT/75sKZ4nKgYDHwv qAHRoewv6ZmcC9QPJrbtzzgytd7aQIvpsCHdMmYmu/i78fLc86BiuhZMJ5sguMqI30vt 5Uv0I4nvj0Jcggi2/lxPwaTA09w6UZIVI5VGT9BdHfsdXrZTZFNSoX77h9CTWuxr8APl L6fNFtQWqXPE7rAyD5WlqCeOe/V0VzqQxa3B8BCPm8ADpzoD/xBK+EcRbUaJwU+ERIVT ppKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XYzivzY8; 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 mf13si7770129ejb.541.2021.11.29.09.21.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Nov 2021 09:21:58 -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=XYzivzY8; 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]:57372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrkLl-0001rf-My for patch@linaro.org; Mon, 29 Nov 2021 12:21:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrkF3-0002S9-5G for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:01 -0500 Received: from [2a00:1450:4864:20::42b] (port=36444 helo=mail-wr1-x42b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrkF1-0001U4-Ly for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:00 -0500 Received: by mail-wr1-x42b.google.com with SMTP id s13so38473339wrb.3 for ; Mon, 29 Nov 2021 09:14:58 -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=2GTULer4lRmEbboJn8akTz+dcWrDvvBiAJ4+IAIoMr4=; b=XYzivzY8xOq65zDWWt9v69xdSWPBC1LON34lWNZANJEG3fazQ1AluaHT9/dF+GOv1g gfChn4A0XVwrEG54r5I0KDwzd+waD6kOS0y+V3vWskQlOX4VgUy/uX6r1M2ardbl/SUO 9SB2VOse3rLo5jZ0oXAjVECUWHt1a6zHMbL+3CJDfmauKCmRqxr5s7s5gzYWRCXBeVDw EmsXNGx4ZY62oIZ9fAM1+Ee4wq94fCJEZNq+EREUD2aZ7FO1KY5W5heLmNtNzQFzXhK/ chBcndsIYxLQtzqQfl413KU2BeUDYSc8AD28bVKr/ILsMe1nRWYY49lYCU1rkgu83uj4 yfIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2GTULer4lRmEbboJn8akTz+dcWrDvvBiAJ4+IAIoMr4=; b=al4rVyvOsc1vautmrloAriswcBHELBvVXWeoCpfj+Ld69cIwfk1b3f7Nqfne0yHL3I RDgGiJOncwpwBpoAKEF8y9zubKTcdeFTY8soHZaYJVJllpQvhHaMib8TfLGOx1BIkFGm NRPtOrMh7vNvBIRHdKSDKKu9bva3fOYNr74VBs4qbCCj+/susGdfX/VXiVqbK88BszVK bGsz7L4pFZMB8XLcLlGM5Lv8w68So8uIMM980VRtrzx9kgu5On2qOnttskfRsqkxFdhZ w9CEK9HGOyL/mbPWQGI+4I2RZaHCB2BnbGISTh+0MTyNRrs+zHK2CcqO5119GpKAUIm5 V9lA== X-Gm-Message-State: AOAM5301xE0yBiNgWBPtrZr5zYqAx+/v26dPoqbYc9HqLMDoPGspFsCk ZJwSUa1LZ4OVpdZ0Ymjp38izIw== X-Received: by 2002:a5d:44d1:: with SMTP id z17mr36082166wrr.143.1638206097962; Mon, 29 Nov 2021 09:14:57 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e12sm18822253wrq.20.2021.11.29.09.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 09:14:55 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 229B61FF9B; Mon, 29 Nov 2021 17:14:50 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org, peter.maydell@linaro.org Subject: [PULL 4/8] plugins/meson.build: fix linker issue with weird paths Date: Mon, 29 Nov 2021 17:14:45 +0000 Message-Id: <20211129171449.4176301-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129171449.4176301-1-alex.bennee@linaro.org> References: <20211129171449.4176301-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42b (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Weil , qemu-devel@nongnu.org, =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= , Alexandre Iooss , Mahmoud Mandour , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée Tested-by: Stefan Weil Fixes: https://gitlab.com/qemu-project/qemu/-/issues/712 Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211129140932.4115115-5-alex.bennee@linaro.org> diff --git a/plugins/meson.build b/plugins/meson.build index aeb386ebae..b3de57853b 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -2,9 +2,9 @@ plugin_ldflags = [] # Modules need more symbols than just those in plugins/qemu-plugins.symbols if not enable_modules if 'CONFIG_HAS_LD_DYNAMIC_LIST' in config_host - plugin_ldflags = ['-Wl,--dynamic-list=' + (meson.project_build_root() / 'qemu-plugins-ld.symbols')] + plugin_ldflags = ['-Wl,--dynamic-list=qemu-plugins-ld.symbols'] elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host - plugin_ldflags = ['-Wl,-exported_symbols_list,' + (meson.project_build_root() / 'qemu-plugins-ld64.symbols')] + plugin_ldflags = ['-Wl,-exported_symbols_list,qemu-plugins-ld64.symbols'] endif endif From patchwork Mon Nov 29 17:14:46 2021 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: 519716 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp6385479imj; Mon, 29 Nov 2021 09:16:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJznJkzTmNeNtw6Ow5Meag5+bNO9XYCwvYW5R1emj02thqbun7KYi5JfdIk+UoGET1xN2DaZ X-Received: by 2002:a05:6402:5246:: with SMTP id t6mr75117661edd.18.1638206201675; Mon, 29 Nov 2021 09:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638206201; cv=none; d=google.com; s=arc-20160816; b=KMzZTcgBfhBY/nLhy/jogBJGuFUIdEc91yx5dAx8qsZbkqMzcJ2OeT5ER+r/zrzWCg dfJX1yUZUwH5e7AkAFmEURNLZa9gmX49UWB5a++5O4sS6EOyzh4fZUKT6CWedH5UAxHm wAMdRRiRRj0Zsu5cA4XhbWsH79FawqamGgoJFiaJqtlGnABIFKEpVQgkGPzLSRgVvFAK UIfFpOfmJAc13nUYmdHNOWNLhytfwZ4r8ZIksZ8eXgLh/8b3kAb3eQzRmuI1TLP+YrbA RRX3BkuZGaAgJUCxCgxXZ5mr5bi1W4XtZk+WXYb5tYQzDKqJoQ/6v9Up8Hy8svGRu/0s +rgQ== 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=x+l21wdy++j9QmwvxPd2IqpwqliVMr1XUKlqo6h12D4=; b=HGPLuqTJ5AAgyDNRKeFBYS4y+r5afhUHQHh3eT0L5f8XEQzt96VqBw6Kbck7zbezuA v23G55NnLAKQnbXy4lgDsX0/HsThZIbWM5tUbinQLNpBV2UTeMZEkP/l57wawGQD4lzJ TEA4tzN2e+CusOSQQRFUFGKjczNU1PQfuYgBLmH2tr0yr4pFWLaoGEiEMris4YO9k9l2 jREC6Srb4zDLq9TUpzFXiv0OLY5V9jMxcK+ngtizRBVy2ZBS4nsSnde7sdqtMOXUQIwZ 7GC2jMgCjxzQve7hngopAh7xOs35wuWjqQU3PTjgFoFCtdeRBdPjBwuqz7aVjyKJicOt 6EBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DRQn2yd5; 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 l18si28610738edb.148.2021.11.29.09.16.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Nov 2021 09:16:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=DRQn2yd5; 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]:46456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrkGe-0002Yj-PE for patch@linaro.org; Mon, 29 Nov 2021 12:16:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrkF4-0002UO-Ig for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:02 -0500 Received: from [2a00:1450:4864:20::333] (port=34451 helo=mail-wm1-x333.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrkF2-0001UA-2r for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:02 -0500 Received: by mail-wm1-x333.google.com with SMTP id m25-20020a7bcb99000000b0033aa12cdd33so6308984wmi.1 for ; Mon, 29 Nov 2021 09:14:59 -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=x+l21wdy++j9QmwvxPd2IqpwqliVMr1XUKlqo6h12D4=; b=DRQn2yd5NGsW0YIqsADrsxZlhGReayCc+sMSS6Vwo1t4//eNJa6hianzHRF6QSM5E1 WL7ru5ouYW3EWvHO1pb/yvqP+irqS6dPL4Ji5hXzleecsVFP3j6C5dwn3TXNY17ZwmDu v1mHxQaC+/gQTzqt8IVBEgej6r63dWlHJFQoUQVRII5ii+kdFcs81J+/BhWGLuu7z9b2 LAvhNJ6D6puYt9l0cZyLTEUj/MlsaesM54hHJee1Bpm1l9gZW+DzKczw+dRFqlSSeihX 2dMw4JilL/87tK+sNnnrh4xho50sQy9BLp8NRnCwrmJBcsAYY5zH09QGq+Yq7m2Q4tTX TR/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x+l21wdy++j9QmwvxPd2IqpwqliVMr1XUKlqo6h12D4=; b=IHzeZeLXsbgxFK0808GtSzl1X+R3+kA7Rd7bLxjQCC8pZ4iGIQMsTIimQ9GZn//tGO DZBQUlojLziPuYHVWggwbYSHWo08ApMnhhGHfRdGhnMJb67wLoWAXuQ7RDQ9GWX7wk8/ qFCV9PWRS929Hebx0LiQzOv+eJ+a0xsezUDd+0scIaFwrNjb4nMrBG43zV3bzRVydE+u xuzm9SlHizUflTgGLth2+khPvnEcSCfY6LBP2qpS56gTGYhi6GZfeZ1sbru/xvUER4eS IWbJb4G3to0j8la2GnnBffYXwgxMJILBzBWpkRBVUOOhNKVXQe9Zr7afJPApXl3Zw33E aWew== X-Gm-Message-State: AOAM533pA90XBPh4ae5D4MpETlODyijJAqeO1KeCPI24xFXaZR2UHYVh vdHmQS+3BPtBH9u7uQpquSiZ5Q== X-Received: by 2002:a1c:a58d:: with SMTP id o135mr37524229wme.93.1638206098815; Mon, 29 Nov 2021 09:14:58 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t8sm17726614wmq.32.2021.11.29.09.14.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 09:14:55 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 38DC01FF9C; Mon, 29 Nov 2021 17:14:50 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org, peter.maydell@linaro.org Subject: [PULL 5/8] gdbstub: handle a potentially racing TaskState Date: Mon, 29 Nov 2021 17:14:46 +0000 Message-Id: <20211129171449.4176301-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129171449.4176301-1-alex.bennee@linaro.org> References: <20211129171449.4176301-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::333 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When dealing with multi-threaded userspace programs there is a race condition with the addition of cpu->opaque (aka TaskState). This is due to cpu_copy calling cpu_create which updates the global vCPU list. However the task state isn't set until later. This shouldn't be a problem because the new thread can't have executed anything yet but the gdbstub code does liberally iterate through the CPU list in various places. This sticking plaster ensure the not yet fully realized vCPU is given an pid of -1 which should be enough to ensure it doesn't show up anywhere else. In the longer term I think the code that manages the association between vCPUs and attached GDB processes could do with a clean-up and re-factor. Signed-off-by: Alex Bennée Tested-by: Richard Henderson Reviewed-by: Richard Henderson Cc: Richard Henderson Resolves: https://gitlab.com/qemu-project/qemu/-/issues/730 Message-Id: <20211129140932.4115115-6-alex.bennee@linaro.org> diff --git a/gdbstub.c b/gdbstub.c index 23baaef40e..141d7bc4ec 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -94,7 +94,7 @@ static inline int cpu_gdb_index(CPUState *cpu) { #if defined(CONFIG_USER_ONLY) TaskState *ts = (TaskState *) cpu->opaque; - return ts->ts_tid; + return ts ? ts->ts_tid : -1; #else return cpu->cpu_index + 1; #endif From patchwork Mon Nov 29 17:14:47 2021 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: 519717 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp6385561imj; Mon, 29 Nov 2021 09:16:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGjMHgoH1tqHaFgpgp5Oxw4KmWaFf3/I1zhuas7/2mtYwzj9yyDob9jP/XWrSVZvMI2JV7 X-Received: by 2002:adf:f04d:: with SMTP id t13mr36355977wro.324.1638206204672; Mon, 29 Nov 2021 09:16:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638206204; cv=none; d=google.com; s=arc-20160816; b=q9Qc2Sj2AWxjYxaOsPGoTb6Tx9gyR5RD80lUcwiSlSPU4/0X2+iDVjYK+5gqz/bReA gxRASjIzuFI0IyPV04vkjCOIej1/ceTDhlU2p+tNO1ZJhR4YMM7I9kvNrp+brDBbaDUg aUnO72zfTmYeWhqtlutcPbbUCrCpR7dic6yYPt4ZSJ/Wpl3urDNE3oAEc9cAEb0sBCey 2Z5RIzT8R1qnNLfePYdgxKLQk1VXkEZYc7tz38NO8jighiXzoqey2tp3Ty1UGRsXZCgS B6A7C5RD1N3YcQ/X1NdR0i/F06KbMzSNaqv+QhcO08Uwmgh8IK6YT7gnItHOsvKL3dg3 ffuA== 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=bhQs6QxD/f/fgQr3W8xnrVDVaMbkSmn+kxyq8ZZ62CM=; b=bbCCaT/66il5kXUmx1JDswfU7GJGzQonLFlZQjB37r4itF/pGQMKcLp9499ErfTpjL Z6R94VyeN4LgPgjIAG2GXJ2drFBsuNfacZym7ep1prOGcxF0vOCXnIhkpu+luBFzd4mK tEq3moMmHC2aXwEO7wsG8HbLuArI6HczLhriDpJFny0UmMaxtV7v1x5zLTVT4Erod2Zk jpls4HSvQwwwhsieQn1lohIHJat1UfY7VnQWuvSYW0wHBT3CP7p8rwarRFZZOh028IPe +nXZ4QH1QD5JufIw8NI+RTxMwm86chVPAI0Nxtd2h1QpybkAEouLw3/vuHq+O0mPKFTT x42w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VZWWUylM; 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 r7si33021962wrz.406.2021.11.29.09.16.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Nov 2021 09:16:44 -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=VZWWUylM; 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]:46552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrkGh-0002di-9R for patch@linaro.org; Mon, 29 Nov 2021 12:16:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrkF6-0002Y8-IG for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:04 -0500 Received: from [2a00:1450:4864:20::42a] (port=44914 helo=mail-wr1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrkF4-0001Ub-2Y for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:04 -0500 Received: by mail-wr1-x42a.google.com with SMTP id l16so38397943wrp.11 for ; Mon, 29 Nov 2021 09:15:01 -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=bhQs6QxD/f/fgQr3W8xnrVDVaMbkSmn+kxyq8ZZ62CM=; b=VZWWUylMr+WZhjlKnpL/ra2kh3wSKBPpatUPDrmZ6lZB5tynzTiJVwRfEihvFRkVHv +VjEviTDHNoOc1NY7rXiIAW3ZRVMv5pKj2Fz0ZN6cL/iEri+pf87cEimo9li5uAPK+Zr MLl1SLaJ+flE4RAS9LYGJOyaK4qnJPsJ49HyxHCv2Wm/dnuuNGHBJ+w8pnkOQRXUZS7D pbyJMaHObhXykrl+yt5a1wFWzI9OEdjxZoEwqJzb/bg3o9l97LZ7v3wnbq0iAuyUJCBf L6Ba6VxBiYd4ewNbUORmlrmMd6mpjfSjeQRVRLtLjAgzZZFRvAjI0EfkkHu8OAlV1AkF 450A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bhQs6QxD/f/fgQr3W8xnrVDVaMbkSmn+kxyq8ZZ62CM=; b=un7z3ygR7Y+RK5m6/Fv7/48DpNmhm2j7PFObK7P8WF2beqymykGkEQFh7ekcLjnkeP 032Op2nWMGTBlFD6TyXmrp1bOtxyWP9vrKFVeGDEaktiiU7VCrtVGMN9XldLuirFrdHm 9S124owXGqf7nibhcEbqBfsfTRs1LBMYSWFMKCHcAwIukAPU9mQaVDVML0poCv88+1MT SxYwT33qKQxr/dv66IjplnVdRqq+ttE2d/b9jSB7UfQGHnt+KICrrvVu94GYmJ7VjUMM c0eEIEi7iCvxf2jrgqXhE2R7sJD+f65F1eqjRQx5XPBVOAfHnsrok9z/ELTkfVDQ18sh zCsQ== X-Gm-Message-State: AOAM531sXAX2j/HNdVn3Y2pDbVB9bfiXIn8E49VwVG0hnY+xzrlGgkIm p/ZUOOXVLadnu17stFRuNd3dFg== X-Received: by 2002:adf:82f7:: with SMTP id 110mr35464667wrc.111.1638206100736; Mon, 29 Nov 2021 09:15:00 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v15sm14323079wro.35.2021.11.29.09.14.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 09:14:55 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 439B61FF9D; Mon, 29 Nov 2021 17:14:50 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org, peter.maydell@linaro.org Subject: [PULL 6/8] MAINTAINERS: Remove me as a reviewer for the build and test/avocado Date: Mon, 29 Nov 2021 17:14:47 +0000 Message-Id: <20211129171449.4176301-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129171449.4176301-1-alex.bennee@linaro.org> References: <20211129171449.4176301-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42a (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Beraldo Leal Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Willian Rampazzo Remove me as a reviewer for the Build and test automation and the Integration Testing with the Avocado Framework and add Beraldo Leal. Signed-off-by: Willian Rampazzo Reviewed-by: Beraldo Leal Message-Id: <20211122191124.31620-1-willianr@redhat.com> Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211129140932.4115115-7-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index d3879aa3c1..8f5156bfa7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3469,7 +3469,7 @@ M: Alex Bennée M: Philippe Mathieu-Daudé M: Thomas Huth R: Wainer dos Santos Moschetta -R: Willian Rampazzo +R: Beraldo Leal S: Maintained F: .github/lockdown.yml F: .gitlab-ci.yml @@ -3507,7 +3507,7 @@ W: https://trello.com/b/6Qi1pxVn/avocado-qemu R: Cleber Rosa R: Philippe Mathieu-Daudé R: Wainer dos Santos Moschetta -R: Willian Rampazzo +R: Beraldo Leal S: Odd Fixes F: tests/avocado/ From patchwork Mon Nov 29 17:14:48 2021 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: 519721 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp6392360imj; Mon, 29 Nov 2021 09:22:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgZ8d08iZPpY5241pvE9v6H2wtaTBZFYJMW47cUsooK32dfft0hgH7zGed6+rO8UfNSdBB X-Received: by 2002:a17:907:a42c:: with SMTP id sg44mr61477254ejc.335.1638206522935; Mon, 29 Nov 2021 09:22:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638206522; cv=none; d=google.com; s=arc-20160816; b=t3K422VuEzf7G/d3Nauc6rrUExjwOwrEWWUUy2PDfPxY5nHXQOoBkmAaydWgLcdflY 0T5Snqwe8ds/cn5mpW/1nQlvFPYZUBG4gacTldwb4TPWyxhbs0v0dYmCUzQ57dBdfXOr FEp+IsJq0S2vpBisykesBmcLKT910ofIxLWGpN2U9UYyvV4tYHG4Pi1AI9ZVc28TM6wh w/3lsQq3yIkajzM7QBGtGp9ccrO76aKXAEKKoKABfJ8HJCO2ojNT61eKwk2/A5Gaj0jR w2c9M0zhSziWFcnt9TvA4dyMlTIs0LW8pduWtpnRg1fGYM0cdRENtobPMKY0/7lf6tqm bTkg== 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=xZRgt23Y60PR4fYaWNYKVxOYHOaixoKQNFILRYTHIFE=; b=TqOqHLoZjxSh2KnUQ/Lr9FY0Sjvml0DpQ0QCvMBTUAWTko4YbU1aYESjp2zz5qOM/Q 8Im74L0bjhFzASaqHkTnA9ranjWnu7GtVTZFxIPCSyVuHUWc9eERgAcsEl/Jg4C+DNpI SDU9kTW2oaLmNfXvyUvp7C6/Hp8lRXGETLpEouhbuLjUDeS81STUBGLuT1lWqkFq1Dda DETtF9cJiQOF5JUF7wwdMtKH4zPh2K0PHnGmleIsELYN4TAogdIc+boFN9my7pcyyYB6 kFT0LwRrjOD0/RcoY9CBZN9AyPaWn1edjtd02kmvnNGGstwUbFC5+Svov/BceL90XJ03 36gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EsinA5bX; 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 dn22si28435425ejc.513.2021.11.29.09.22.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Nov 2021 09:22: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=EsinA5bX; 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]:57544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrkLq-0001yh-1e for patch@linaro.org; Mon, 29 Nov 2021 12:22:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrkF6-0002Y7-Ho for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:04 -0500 Received: from [2a00:1450:4864:20::433] (port=40582 helo=mail-wr1-x433.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrkF5-0001Vi-1X for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:04 -0500 Received: by mail-wr1-x433.google.com with SMTP id t9so21426928wrx.7 for ; Mon, 29 Nov 2021 09:15:02 -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=xZRgt23Y60PR4fYaWNYKVxOYHOaixoKQNFILRYTHIFE=; b=EsinA5bXp0vCXx3yoOglIZB6jsOXSWGTW2jTT6ixI9YWUhUHWfO6/xSNt/HsMJvgg6 4tusve6Rhwll7k0E9uY1jE/1kq2GgGlGbIb8LsA/mDA8Fv2qBRJi0Z1BYm/0l9bYpPTY tMPaBnf+HF313dQJwUOrEYHQhIj6knWqO5A8s0kKctjZ4HVaDsiBniAczd9qr2UPt9NW QmqrWhWO4qC/lfVH//ZOicRK6hl9R7Q0r3Nvzf7GJk9bwWwJLQZmvxE+MAMrTdSmePuz +iRAN45ZF0sHn4IdYoAZCwnlNW88wiDEeRzxXYqhBw0r1ShyF2zqotja6WtKo2krgRnn Bixg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xZRgt23Y60PR4fYaWNYKVxOYHOaixoKQNFILRYTHIFE=; b=NeplJDpVx9a0LgHt5MCo9vAsx4cDFiH+0bFdwyk7ViHIw2yH5lxRaIHQn/3ZQYfJ67 esyNHQdqIWzLtW15EYILVL7lE3ZGmFMN0nRCJanOnOg9dfiRLUhoRih5GV6ppUlj3w+E cdpHQd8ryIfQ7NVX6oixpX0Z0ZKV4fj/fVR4/7U488dpx+ftEPugvXghZfDP5PHIxgCW LasUnDzgkBlfA3Eq/u+U0JHa4Ik0ObhBsuS9jCNLYN/Zh07cqVgVNIqIok1eJyrYTSGI S29csyirqVYigpuMRQtgo6cvzvedPfWntskG49q2ZZC2r1M3tvoefvuTJKuziMuDllKi 8fQA== X-Gm-Message-State: AOAM530yJYxKbSl8JiyaEncaXDwtrsEaLTA/DFeerYQcfZu8YMd3zkqh KejxDRQMAiDoJmFnpLpGlc2X6g== X-Received: by 2002:a05:6000:156a:: with SMTP id 10mr35412875wrz.87.1638206101572; Mon, 29 Nov 2021 09:15:01 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id d15sm19552500wri.50.2021.11.29.09.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 09:14:56 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 592781FF9E; Mon, 29 Nov 2021 17:14:50 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org, peter.maydell@linaro.org Subject: [PULL 7/8] MAINTAINERS: Add section for Aarch64 GitLab custom runner Date: Mon, 29 Nov 2021 17:14:48 +0000 Message-Id: <20211129171449.4176301-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129171449.4176301-1-alex.bennee@linaro.org> References: <20211129171449.4176301-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::433 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Add a MAINTAINERS section to cover the GitLab YAML config file containing the jobs run on the custom runner sponsored by the Works On Arm project [*]. [*] https://developer.arm.com/solutions/infrastructure/works-on-arm Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20211116163226.2719320-1-f4bug@amsat.org> Message-Id: <20211129140932.4115115-8-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index 8f5156bfa7..006a2293ba 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3511,6 +3511,12 @@ R: Beraldo Leal S: Odd Fixes F: tests/avocado/ +GitLab custom runner (Works On Arm Sponsored) +M: Alex Bennée +M: Philippe Mathieu-Daudé +S: Maintained +F: .gitlab-ci.d/custom-runners/ubuntu-20.04-aarch64.yml + Documentation ------------- Build system architecture From patchwork Mon Nov 29 17:14:49 2021 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: 519723 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp6395300imj; Mon, 29 Nov 2021 09:24:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuHNhbmxZW/lgtqVA4MhCpsJd3LzsO+k45nj7PncoXaw2c244R9AfbQqIYiMJLQeglQBmX X-Received: by 2002:a5d:6d4c:: with SMTP id k12mr35495316wri.511.1638206678850; Mon, 29 Nov 2021 09:24:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638206678; cv=none; d=google.com; s=arc-20160816; b=FseaRcI3x9FHg7G0d6jxWr0Q1rxMsVTf9KpCP5ie8VQd17PZ+Qx3g0BulZG9RLdR5T nhUZmoKGhmyw442Q/0KT13KhFmUnf6Z4VCliUwOGV22/Fyb5mPdkSIzh37bxQBXM/nXT +Tet6mKH1SFyhnWxJz2BC7yc9koUljRAUghscaqzq6joATyZhDueJY2y9uz4nSIBgjmC b4DEtb2iIdLbDrm1mfhlwYj/mH41wOJIPK7Lrk4+5fbSGU8A/opArQ9UNxM2ssVORnpT JNNId6f0GrSCxOZ1pCZ0NoskHRON5862fsu5kOFe7LK9zwbJkAlNp6zebBbgRzNc2Gzj 61zg== 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=VCqwrqjK7M0/foGUZbbwM5cH+2eIgsOnJoMiwsacNqQ=; b=DsSYsjVbtyEED379lJ3LXMmuckAC0q/uvN3WrLnjJGDPGFf3QxXjdv2TaO+KTfKKbH fcSmrMWDCfnXsMpQix/E6YosLpFEtwy52/dE85+s5gJr6ub2F+gZj0jC9DstP4RlOvqI i2/R2pzf3DnB8n+VFdXdnk15HLnpuAxPajjHb3HgQbYr+/JC7nU2WJqiekDfR2REpU4n vnoxu+fIC0SWbSyda9cFZAdOX4LiK0Zom+KR2TzTe+WjC0xQCPfy+5fSCUrvxuJ8ykuc BRlAqFs7wLqZo6Zq0mrGFPOvWxQ1nmD79qSQg9Qokc6S8cx8kJut0Rh4XJA7sTz/IoLb 0RqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MCI11MsA; 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 u4si5757360wri.814.2021.11.29.09.24.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Nov 2021 09:24:38 -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=MCI11MsA; 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]:34008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrkOM-0005Gj-0N for patch@linaro.org; Mon, 29 Nov 2021 12:24:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrkF8-0002Zp-As for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:06 -0500 Received: from [2a00:1450:4864:20::434] (port=44023 helo=mail-wr1-x434.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrkF6-0001Wc-DE for qemu-devel@nongnu.org; Mon, 29 Nov 2021 12:15:05 -0500 Received: by mail-wr1-x434.google.com with SMTP id v11so38396409wrw.10 for ; Mon, 29 Nov 2021 09:15:04 -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=VCqwrqjK7M0/foGUZbbwM5cH+2eIgsOnJoMiwsacNqQ=; b=MCI11MsAnbs4sSfQo6z4nRGhuNOJc3K4rITDIPSHDnzEypM8qPofA4obr62DJwsvcn r0fUpCBKu2eoykBYWHhJknJsunxfR1/iNKIFYQcBz3MMaQ4lBtcNNcShalY48LfI5Xtc Fdf72fezdGo13tm98uGZY29cg5C5JtUVDHwPefla1NMjY29ORd1wL6zfyE/zp1OWJG+a dWpWXYn3tKytW3D/T/mUvpzXgy+E6ZPKxTVK9L6JHiSOKKH6s3zDLnlWo5dbVikuefb9 H4kus2PGr8FsuUN3ckZg/SncA1rOLXh9UxPxhTF+AoHh9bRyPzA9VXaf2+HR+q53bWKy p1gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VCqwrqjK7M0/foGUZbbwM5cH+2eIgsOnJoMiwsacNqQ=; b=T3jVt3jFounG/VngVzmxfesLURe/AtDUorRE7jg8bm8kEJeuXkdEZLSy6ChCHVvvvv X+B5vU92vmayMb2b0x+qmOOAdoHFAMsMNxZFrFb70OTWubZISGxOe78ICGE++RA9oinA BxxyQlxJ6iNUjXE5Pp4M0AUNq6dBVUKqJdAS2Cm4Mybs5RrNI+fyFLiyqskLKXjXTmOh xeG8HVRM/9rb09YMTadA7J8EUmak0pDsrgTKye+UIA/9CLlaobmmKsSHr5dGCLF3KFa6 8rV+Zgc9puyUmfy7Gp8hByzEqu7aHmqryGSPaSwv/sYofQLORGIM7E5PjQPK7+SZ3T6U v5nQ== X-Gm-Message-State: AOAM53380doUkEGOOP/Wf42e1iFlzvan9bB9b/DrkjFUWNFNYyZvhDqe vaksRGMJ3CIDoyKmS5FbOKb7B/mtANYRNg== X-Received: by 2002:adf:8165:: with SMTP id 92mr37728935wrm.199.1638206103168; Mon, 29 Nov 2021 09:15:03 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f13sm18220065wmq.29.2021.11.29.09.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 09:14:56 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6F30C1FF9F; Mon, 29 Nov 2021 17:14:50 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org, peter.maydell@linaro.org Subject: [PULL 8/8] tests/plugin/syscall.c: fix compiler warnings Date: Mon, 29 Nov 2021 17:14:49 +0000 Message-Id: <20211129171449.4176301-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211129171449.4176301-1-alex.bennee@linaro.org> References: <20211129171449.4176301-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::434 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Juro Bystricky Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Juro Bystricky Fix compiler warnings. The warnings can result in a broken build. This patch fixes warnings such as: In file included from /usr/include/glib-2.0/glib.h:111, from ../tests/plugin/syscall.c:13: ../tests/plugin/syscall.c: In function ‘print_entry’: /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: ‘out’ may be used uninitialized in this function [-Werror=maybe-uninitialized] g_free (*pp); ^~~~~~~~~~~~ ../tests/plugin/syscall.c:82:23: note: ‘out’ was declared here g_autofree gchar *out; ^~~ In file included from /usr/include/glib-2.0/glib.h:111, from ../tests/plugin/syscall.c:13: ../tests/plugin/syscall.c: In function ‘vcpu_syscall_ret’: /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: error: ‘out’ may be used uninitialized in this function [-Werror=maybe-uninitialized] g_free (*pp); ^~~~~~~~~~~~ ../tests/plugin/syscall.c:73:27: note: ‘out’ was declared here g_autofree gchar *out; ^~~ cc1: all warnings being treated as errors Signed-off-by: Juro Bystricky Signed-off-by: Alex Bennée Message-Id: <20211128011551.2115468-1-juro.bystricky@intel.com> Reviewed-by: Richard Henderson Message-Id: <20211129140932.4115115-9-alex.bennee@linaro.org> diff --git a/tests/plugin/syscall.c b/tests/plugin/syscall.c index 484b48de49..96040c578f 100644 --- a/tests/plugin/syscall.c +++ b/tests/plugin/syscall.c @@ -70,19 +70,17 @@ static void vcpu_syscall_ret(qemu_plugin_id_t id, unsigned int vcpu_idx, } g_mutex_unlock(&lock); } else { - g_autofree gchar *out; - out = g_strdup_printf("syscall #%" PRIi64 " returned -> %" PRIi64 "\n", - num, ret); + g_autofree gchar *out = g_strdup_printf( + "syscall #%" PRIi64 " returned -> %" PRIi64 "\n", num, ret); qemu_plugin_outs(out); } } static void print_entry(gpointer val, gpointer user_data) { - g_autofree gchar *out; SyscallStats *entry = (SyscallStats *) val; int64_t syscall_num = entry->num; - out = g_strdup_printf( + g_autofree gchar *out = g_strdup_printf( "%-13" PRIi64 "%-6" PRIi64 " %" PRIi64 "\n", syscall_num, entry->calls, entry->errors); qemu_plugin_outs(out);