From patchwork Wed May 15 07:52:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 796875 Delivered-To: patch@linaro.org Received: by 2002:a5d:452e:0:b0:34e:ceec:bfcd with SMTP id j14csp2853502wra; Wed, 15 May 2024 00:53:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUGOcIGP7XX/W1mp+LHqR/3k3owaqRT+bVWxVeVo2OreXt2ZjiiDL+llKJ/u66VdktQzZbuudZBZ8GO6uDCY6Rb X-Google-Smtp-Source: AGHT+IHxtvqUcX9p8t/Hewl00h3xRdUbwJysF2kjoJxei5T3+CHoBUhkXe5tWprKuM4rqVdS9i62 X-Received: by 2002:a05:6214:4602:b0:6a0:e827:d8e with SMTP id 6a1803df08f44-6a16822b743mr184779726d6.40.1715759615449; Wed, 15 May 2024 00:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715759615; cv=none; d=google.com; s=arc-20160816; b=QD5IA9slvdsm7HwgfTMNx8Xfyq6sCjZ2k2AKHHRM0XtS0GUwD2vooapArFl0Zf/V0C BCq4GSAERmbTXrkK0I26Ax9NrQ29GFe9Zpc5Ew8wdtvlhuGWBi7XJpROCa5ql7jWE3um 7HAS/OuBNhtKbsfS9/SuEd7JXTEq0zChjvGuAM2xGCkUejutWKsMwsOelFzk/Hy3Img3 2hnQGYw9rK7bT/Z22a0/KWz1yCUsq+AwONihev5my0s+rQUUJ0fnFYV6R7AdN8jpcaVA 2MWwX+Ob5LuASU6PRp8FkeieLOEM8MMuWqq4hyTXSLw/Jo9HFB7WH3uaE4sxfuWfAPeg n6pQ== 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=1Iqnca+HhnCCBvOshaH/DqsUrANLuNbYvwccCz1eMgU=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=hFFVxDyJR9Kc66OgQeLBxBK2fjDlnaOJl3Dt6WwMEKTMTRnpVHtbX3nOHREqvRr0P1 B7FeIVur1cO8MsYqgIDWhp85yaYHcnnvh/Ba6/8Ag7NCBchx1PRvEUaUmT3v4EtdizzI jEwtwBowOECGCnAqg4JOr296V3zLbcTVFNLUxeq23xUDVvIb8pE3PoMQZevWL6SbLVv7 TmITjfhcuXITkeqn+N5tBF/Nk7GE5WM94tFsjtKyZK83EtSmi3iYipuhnJpNHwzIYLs4 xEOizOOPcQKNXVG8MTAV19MDaDrYKb3+VXTmE33cBbXGY5hz3f7q6nZBNM2gzK6cll4c gwug==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ZMbpsqZ/"; 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 6a1803df08f44-6a15f2eda0asi136658806d6.466.2024.05.15.00.53.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2024 00:53: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="ZMbpsqZ/"; 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 1s79Rf-00047b-2n; Wed, 15 May 2024 03:53:03 -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 1s79Rc-000459-9F for qemu-devel@nongnu.org; Wed, 15 May 2024 03:53:00 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s79RZ-0001Yx-Vs for qemu-devel@nongnu.org; Wed, 15 May 2024 03:52:59 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-41fc53252ceso45478335e9.0 for ; Wed, 15 May 2024 00:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715759575; x=1716364375; 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=1Iqnca+HhnCCBvOshaH/DqsUrANLuNbYvwccCz1eMgU=; b=ZMbpsqZ/JpCVkNuwB18S4EZkjyaFzI3hd/m0OMxvVKoj+4zwITahTAZwG7e5Q+toEU K6UdNgMnX+cqVRFmMTL1tzDF2odygnkFvb2Rm+wh8EpupJWgZ/sybQ9pjrydJyap2h3S Twsh5bYVlAhtVqZLj/XaQWPfTbyKP5XBR6RDEWHyyRT/TAGUWnSEGQId9kGI24emWZmH 7xtaDWBELcRrjhuwMqEpLLVi7OJZ5a6L29i4mgOwIoJYjavHzz/ARKmhPMACtA4nfN8J f5keGQ/hGlz8dW7Ai+6iPPRbNNFZHkX50GA8nysrHQFkCJcmruiCM2CUU83ThyV/9Fwi v3Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715759575; x=1716364375; 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=1Iqnca+HhnCCBvOshaH/DqsUrANLuNbYvwccCz1eMgU=; b=UWvDpvetA7YFGmDUt5pTMkayqpSUqF7Sfg25odD1ElBel+meRnRh5S+CWOY4aXfmsT hNpRuHOiygTVvjwdpoeYjYZn4hDGheGTOU/DzPYmEtI9PBCrtPoN+POuQkhJagItlbe4 TcqQhiCMhmGtqezafoga3Wo+txTujwCJwfmrxj+/CWcFfOJyTf+EGmdqeih7H3anP6qO kg9BS9vPbQyf/ccFqIPZArKW5JNDcsPJOd5PYKue3ryUl48TPj48UcAK6+GeVTX0Edbv cHUYlwPEdUQkfSAO6BcJzuivBx94zTYGf9iCGnk3+WHxQhwH8Pp6hr3c29SEXtPfiOCW ouPA== X-Gm-Message-State: AOJu0Yx5Usq5Du2gsUzn6CYZ/HolaRVApop2vwe9wub3qoO+ZtVAbpGv HxM11z1EPDi6KB1Dj5R8OIw3sl0BDteifQV6mflgLj6oua3UQ29Csmbi+M39rmBjQDjb1xR/H/k eHw0= X-Received: by 2002:a05:600c:3c83:b0:418:ed13:302d with SMTP id 5b1f17b1804b1-41feac55135mr125046055e9.26.1715759575266; Wed, 15 May 2024 00:52:55 -0700 (PDT) Received: from stoup.. ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccee9292sm222611855e9.37.2024.05.15.00.52.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 00:52:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 08/34] accel/tcg: Record DisasContextBase in tcg_ctx for plugins Date: Wed, 15 May 2024 09:52:21 +0200 Message-Id: <20240515075247.68024-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240515075247.68024-1-richard.henderson@linaro.org> References: <20240515075247.68024-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x332.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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 + accel/tcg/plugin-gen.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 135e36d729..2a1c080bab 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -537,6 +537,7 @@ struct TCGContext { * space for instructions (for variable-instruction-length ISAs). */ struct qemu_plugin_tb *plugin_tb; + const struct DisasContextBase *plugin_db; /* descriptor of the instruction being translated */ struct qemu_plugin_insn *plugin_insn; diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 49f5d1c2e4..842da97204 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -329,6 +329,7 @@ bool plugin_gen_tb_start(CPUState *cpu, const DisasContextBase *db, tcg_gen_plugin_cb(PLUGIN_GEN_FROM_TB); } + tcg_ctx->plugin_db = db; tcg_ctx->plugin_insn = NULL; return ret;