From patchwork Thu Aug 24 18:12:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 716568 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp1488520wrp; Thu, 24 Aug 2023 11:13:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGxq78r3YKzYU2gu125Jq4GJ2wsg2kdgA6RfNIA/3t/qNYftSpoV3VN3wO5rCL2t8UoN/gb X-Received: by 2002:a05:6870:414d:b0:1bf:32bf:1913 with SMTP id r13-20020a056870414d00b001bf32bf1913mr513559oad.43.1692900815279; Thu, 24 Aug 2023 11:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692900815; cv=none; d=google.com; s=arc-20160816; b=fSsUYUB3AWup9d2LaGl9HdTk39v1Z0fEM0uBijUwlW1Et6ppVfwQkNrxvjRrKHonH1 ZQcPsstEeV4L8Gy6utGIm7Csf/8LrD3W8zs7NoBltjqA8ouqcOUk+Lq/5EtV6oD1RfkD xi8WoZ5xE5lrwuntatWFdAQxGi8pmuAOWka5nl9EDiYoFIi6VFDpl71fGyweSXHuKoQA yC97v3a1sUFmoHUgUf4AQw4NRzyGj9O0rSoHXHiJao2lrPyE5kQwQNOee9cVMhhVbGb0 XWZiargJ8/qY6eP0H5unSQdw2A/V6p2eucj9X4OlbUxsrQxSfEp4mnk0HcLud9dOwIkG pA3g== 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=eDnDMiaLlkKdKPyuMD9lZt7zOa1hw99W+ENZjRrOYpE=; fh=On7J+dr3ozLfF6k4kJqJ8fmnL4fZIZsujoikt7vfghA=; b=Dc1xetcUa4nVyv0FTajf1hsgv48dDHOM2TQYk9D7668OsOnKXb++bxWVXStvX77DhW cj5MSLzzpkZPHBbGowthovuFypbZm+IwoEI1aRZM7hvgxs2j6hpiYTOiz2OXpb6hATKD a/KYDuF3ewTPpTvxzcNnGSK7LqL1sf1qYsMoJ3gGEqFYkbUQMDNbvFgrMtZzUKv3p+qX iu6M9bkXjXR2hnVtjDXiADx+L4UhuHTRF8Tt7V1wH07Fj2nqpiBw100nMz7L1Y/EoqiH Warn2CXyq4SBISFIu3o/grEmbXvJi7cU+k+nDdQpllG37TNKLlhZaVL/YH1LxXE3Cydw 5l2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oHSnkKtP; 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 b10-20020a0cc98a000000b0064f369990c6si1367674qvk.218.2023.08.24.11.13.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Aug 2023 11:13:35 -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=oHSnkKtP; 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 1qZEp5-000679-Pt; Thu, 24 Aug 2023 14:12:49 -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 1qZEoy-00066N-56 for qemu-devel@nongnu.org; Thu, 24 Aug 2023 14:12:41 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qZEov-0001kT-N7 for qemu-devel@nongnu.org; Thu, 24 Aug 2023 14:12:39 -0400 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-56b0c5a140dso35268a12.0 for ; Thu, 24 Aug 2023 11:12:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692900756; x=1693505556; 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=eDnDMiaLlkKdKPyuMD9lZt7zOa1hw99W+ENZjRrOYpE=; b=oHSnkKtP7XngEBxgzpYEzOxCK33J4+c8zeWsb27RT2ARSn2Z6sIySdUEQ4NY7wx9sa Y3gyt+wn856B705d2dn+C7b35xtNkMQX1qZC/oqFzHr2j6CNBb/0Z4/VY1Nv30E15uKY ZCD58xguEYcRZb/ThUfd0b3jWxgUfeEx5J99CGlBasNcSAoIQYVYXsRELfq/X1Rbyrpt epF3umiUA0RXzTq5JQeKF0XoLhqYPBb7IfTq7LUBUDq69wXeqOPLgzRrJfon6poS1IkD AACLshuNDCtKx9ClzLEF0aH1a49QvHBjMZmYfafbfRTcetj6B/Rbv/DgQUuhQSpVi9uO GGzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692900756; x=1693505556; 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=eDnDMiaLlkKdKPyuMD9lZt7zOa1hw99W+ENZjRrOYpE=; b=NOEajcxhiF5/XiLmaL00JHO3rEYLCmfTnCAtVSWze4K79pK2NITHeGSXDZ6fddka1B Lhbza+lI+u9bTbQxLt+6wQkL1qjNINsb3hvfSQ5cQeabS/r6iSwiMuey1aBnosKHSnRO 5qaZjRjjUnIyrIHEEMAnm0myg3go8rk+qyxTfkfDtoK84NsUyPWML/lVIYZoF2UHoSan 4ka1zkBCEnoEpWO/7g5/E+s4PJihtnKn0OSdW0Acd2EajixeUudnonpjtb0uosCUgd+C Q4TAo9qStq11qDph2LMCRY57GOaqsDmjdGUJilZIH34F24fWZp6oqWOdhd9fB/lWe0HU QBTg== X-Gm-Message-State: AOJu0YwEA7PiWWh87K9yE3bpzE81D4MqnsVrfwKX9y0w8jwxdnxSeiMw 63i2/poMKPSC7Y8AXjEcij0GTXtuNvydgjM98JY= X-Received: by 2002:a17:90a:c68a:b0:26d:1e39:faae with SMTP id n10-20020a17090ac68a00b0026d1e39faaemr14052806pjt.22.1692900756431; Thu, 24 Aug 2023 11:12:36 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:5418:3064:bd46:c048]) by smtp.gmail.com with ESMTPSA id n20-20020a17090ade9400b0026cecddfc58sm1880544pjv.42.2023.08.24.11.12.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 11:12:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org Subject: [PATCH 1/2] accel/tcg: Add plugin_enabled to DisasContextBase Date: Thu, 24 Aug 2023 11:12:32 -0700 Message-Id: <20230824181233.1568795-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230824181233.1568795-1-richard.henderson@linaro.org> References: <20230824181233.1568795-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x532.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 Signed-off-by: Richard Henderson --- include/exec/translator.h | 2 ++ accel/tcg/translator.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/exec/translator.h b/include/exec/translator.h index a53d3243d4..e89c182cca 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -72,6 +72,7 @@ typedef enum DisasJumpType { * @num_insns: Number of translated instructions (including current). * @max_insns: Maximum number of instructions to be translated in this TB. * @singlestep_enabled: "Hardware" single stepping enabled. + * @plugin_enabled: TCG plugin enabled in this TB. * * Architecture-agnostic disassembly context. */ @@ -83,6 +84,7 @@ typedef struct DisasContextBase { int num_insns; int max_insns; bool singlestep_enabled; + bool plugin_enabled; void *host_addr[2]; } DisasContextBase; diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 1a6a5448c8..37f8dadbbd 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -156,6 +156,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns, tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */ plugin_enabled = plugin_gen_tb_start(cpu, db, cflags & CF_MEMI_ONLY); + db->plugin_enabled = plugin_enabled; while (true) { *max_insns = ++db->num_insns;