From patchwork Wed Apr 24 23:02:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 791563 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp1096114wrq; Wed, 24 Apr 2024 16:03:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUKlxBvCx+88wkuc0UdjrCHBDai/U9p+fTxASFWX1OkYqpKE4ONApQJYIVM5N1OH6j7e/WEelHvL6WKIHF7pDfu X-Google-Smtp-Source: AGHT+IG5xMr2RCpArOuXiUUJMGEDRsmgSGIBN9a/px2bmavSe2CwOsSQ5GhF9lX6tby21TIWGchw X-Received: by 2002:a05:6122:3c44:b0:4d3:43f8:8541 with SMTP id fv4-20020a0561223c4400b004d343f88541mr4675611vkb.1.1713999837253; Wed, 24 Apr 2024 16:03:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713999837; cv=none; d=google.com; s=arc-20160816; b=mFgcZR9D1Cl8DFso5AGutfXnxCTCHyTS6BE8E74bd7w0WDwN/AtNsXDyCwnwwDtYGM 1JZrPLQgB2Jd1Qsi5h6FRsNiUHMKFVfm+QFYE1U/OXeQ1z87nfr6T+qXtM5Wrzg56+Di S0WKQ3eLhhMK8KoM2CQRf8MY6h6iBnw2bV88r3aB8VUwQxoybXkeMbRKNLPLOpITvFLA Jy9j3sYuxBJIC/3tFux/WwnLJow6JNQ/n4JMrCd+hXW/3b0wiKe7oEg5lFpcTUmaz9vL c2XOZKag2epCzQM+wR7LAku2rZrJ274mFtxajTu+zBHb7+G1Wz67rArev9asgYsMolsN 81KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/FK2WWMw+RB5io7Nzuf8LNknc8niTsj2ljKDgkXD3m0=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=RbyXG6MTk8CRGFYLewAGhH7qh4GefLzy20I+eJmhXZ+Wa0DTW6U3FIahAMWP3ahQMd W+IvCtMFvrXuj/lrtl+d5x5fpL/3rFZYNzhTOaP+XbgnoKtCorJdeeGHFWmb8ZBxdFgp 2IVyC4gKpcTcotUstInTIVIIEeKrFWZ1s3+S25yGk0YjydmoaHLW5FKIrLBCVtHXVRXQ SS+dgKNXRm3g0pIEAm+st56xNKOFgZtUAvqxwWO9Y1t6jYwJNjDRdw49yRprBz+uNugl KkJHouu3GE0Jikl5NjNScokfZy/Nk/kLfeIU46WqnK5mnrlHvh7/DElppsoibqEJLHiP v92g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fB62ETob; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 2-20020a0561220a0200b004d8859fabe8si2988896vkn.203.2024.04.24.16.03.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2024 16:03:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fB62ETob; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzldU-0003n4-DK; Wed, 24 Apr 2024 19:02:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzldS-0003le-9H for qemu-devel@nongnu.org; Wed, 24 Apr 2024 19:02:42 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzldQ-0002eG-K0 for qemu-devel@nongnu.org; Wed, 24 Apr 2024 19:02:42 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-6ed04c91c46so446802b3a.0 for ; Wed, 24 Apr 2024 16:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713999759; x=1714604559; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/FK2WWMw+RB5io7Nzuf8LNknc8niTsj2ljKDgkXD3m0=; b=fB62EToblP/73xujJ8oVS/pD/uf8LigxMIO9Tg5vlVJHBW34IXV8NTrB1WUtmswUXA NHEojeIP89HT/d17Ycjd3/04/pMzPEVuoRab94TMw+VktNsUyT+FFOQBLc/t2Vs74++w pstNt9lBr7TfDhiKVdhFTsXUprIjSce5d2aGjgq1WI7FcGmFWKXy2PQ3Xd725XHhr7wq TutEiH32b+E+RYK9unh9eiOcQo74yV4+FQh4sIyvGCXOjyoOwuaJsRcWU9g/oxCb5175 e+5qkYXLJlDY/IxDJb7qn0RDJIJDCEUsJVgbaz019rSsberdeOYAoHxPrFpFcgZOIYjK P40Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713999759; x=1714604559; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/FK2WWMw+RB5io7Nzuf8LNknc8niTsj2ljKDgkXD3m0=; b=DC7IZ1lyL7vAGrXEzhy/QdUhxeeYad8OtZRBm7hGZVOkDnnNfa6ew8xKweWR3efoQ+ uhIFMwAHnjrSUphEDyBJCmwlKPF2MfXQvy+gWVa4znZk4Dogp6AfsJ6EspI9x2KjNCZx GV76tP+ladxHxmF/84jbbujeuFyttwEcsxcUFtMdFOO7n96sw7k/FB3RDWl9Yr/tORuK SxIbIxAWqY+AvpjXrh1bhrhQy2cn464lTJxJvWV4U4J6vpOOjvwMkEN8T+JFDz9kwALz YTpPuf0JJ9DEiFXsaiSJ6OGV5QKWuZpI0HFbfAgyOPq0TzZshZFLogxPSCiQ/Yuop63U 4GFw== X-Gm-Message-State: AOJu0Yw2FOWexQjo6AXmAmKblPgv+OpD4bkIQgs12NMZBT174CEAnptD Ol/YR+bZRWm+xfIzqij75BxldSsbmHYADsdxfS9eNepDTxvLthKMMzNF6C1VLtacJWNWDkGdl65 T X-Received: by 2002:a05:6a20:5b22:b0:1aa:bde:8c78 with SMTP id kl34-20020a056a205b2200b001aa0bde8c78mr3450969pzb.54.1713999759249; Wed, 24 Apr 2024 16:02:39 -0700 (PDT) Received: from stoup.. ([156.19.246.23]) by smtp.gmail.com with ESMTPSA id h5-20020a056a00000500b006ed4aa9d5c0sm11981405pfk.188.2024.04.24.16.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 16:02:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PATCH v3 12/20] tcg: Remove TCG_CALL_PLUGIN Date: Wed, 24 Apr 2024 16:02:16 -0700 Message-Id: <20240424230224.941028-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240424230224.941028-1-richard.henderson@linaro.org> References: <20240424230224.941028-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Since we no longer emit plugin helpers during the initial code translation phase, we don't need to specially mark plugin helpers. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 -- plugins/core.c | 10 ++++------ tcg/tcg.c | 4 +--- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 8d9f6585ff..196e3b7ba1 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -353,8 +353,6 @@ typedef TCGv_ptr TCGv_env; #define TCG_CALL_NO_SIDE_EFFECTS 0x0004 /* Helper is G_NORETURN. */ #define TCG_CALL_NO_RETURN 0x0008 -/* Helper is part of Plugins. */ -#define TCG_CALL_PLUGIN 0x0010 /* convenience version of most used call flags */ #define TCG_CALL_NO_RWG TCG_CALL_NO_READ_GLOBALS diff --git a/plugins/core.c b/plugins/core.c index b0a2e80874..b0615f1e7f 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -339,9 +339,8 @@ void plugin_register_dyn_cb__udata(GArray **arr, void *udata) { static TCGHelperInfo info[3] = { - [QEMU_PLUGIN_CB_NO_REGS].flags = TCG_CALL_NO_RWG | TCG_CALL_PLUGIN, - [QEMU_PLUGIN_CB_R_REGS].flags = TCG_CALL_NO_WG | TCG_CALL_PLUGIN, - [QEMU_PLUGIN_CB_RW_REGS].flags = TCG_CALL_PLUGIN, + [QEMU_PLUGIN_CB_NO_REGS].flags = TCG_CALL_NO_RWG, + [QEMU_PLUGIN_CB_R_REGS].flags = TCG_CALL_NO_WG, /* * Match qemu_plugin_vcpu_udata_cb_t: * void (*)(uint32_t, void *) @@ -375,9 +374,8 @@ void plugin_register_vcpu_mem_cb(GArray **arr, !__builtin_types_compatible_p(qemu_plugin_meminfo_t, int32_t)); static TCGHelperInfo info[3] = { - [QEMU_PLUGIN_CB_NO_REGS].flags = TCG_CALL_NO_RWG | TCG_CALL_PLUGIN, - [QEMU_PLUGIN_CB_R_REGS].flags = TCG_CALL_NO_WG | TCG_CALL_PLUGIN, - [QEMU_PLUGIN_CB_RW_REGS].flags = TCG_CALL_PLUGIN, + [QEMU_PLUGIN_CB_NO_REGS].flags = TCG_CALL_NO_RWG, + [QEMU_PLUGIN_CB_R_REGS].flags = TCG_CALL_NO_WG, /* * Match qemu_plugin_vcpu_mem_cb_t: * void (*)(uint32_t, qemu_plugin_meminfo_t, uint64_t, void *) diff --git a/tcg/tcg.c b/tcg/tcg.c index 0bf218314b..363a065e28 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2269,9 +2269,7 @@ static void tcg_gen_callN(void *func, TCGHelperInfo *info, #ifdef CONFIG_PLUGIN /* Flag helpers that may affect guest state */ - if (tcg_ctx->plugin_insn && - !(info->flags & TCG_CALL_PLUGIN) && - !(info->flags & TCG_CALL_NO_SIDE_EFFECTS)) { + if (tcg_ctx->plugin_insn && !(info->flags & TCG_CALL_NO_SIDE_EFFECTS)) { tcg_ctx->plugin_insn->calls_helpers = true; } #endif