From patchwork Mon Sep 25 14:48:44 2023 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: 726034 Delivered-To: patch@linaro.org Received: by 2002:adf:ea87:0:b0:31d:da82:a3b4 with SMTP id s7csp2435762wrm; Mon, 25 Sep 2023 07:59:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEz4kPUudqfUzAi1jwdYMZu65q3+cSEJ1pr/3Hphs5mBCPsFQsH7laU7H5r21Z1OGucN7HM X-Received: by 2002:a0c:9a99:0:b0:65a:c525:5de6 with SMTP id y25-20020a0c9a99000000b0065ac5255de6mr10901891qvd.28.1695653963851; Mon, 25 Sep 2023 07:59:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695653963; cv=none; d=google.com; s=arc-20160816; b=eo1rejtHosxxV40JBKLo+FN3CZjIPkthe3KQ21G8S8IdkLDFiltd/KhdHEeFXmfJIH W8glmDlZNAvGJEIG4hStxT6Ve0HDBOf9GHbuVGYGE1mGPgBM2Utro6xKw7dRbP8J+5Fc d1Wn+q9PKLsKUzu3BiLO7avBi1EkDEGPAa2CvigF4mE/iYQlkr7cOZcrtOFnjOYp/4MX c9hQkG50SBSbccrLL2j/BJ7fJRfjWtliTOtKF3xDA8yv61ZVqvFRI1Zyolhyasm8ztON +MkRq2lPg5jaNsjgytwZUU6xdTyDf6x0zUSGxWQLXYfreHy8B1Z/njRy71qCoGfj/EJY gjsg== 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=aeCFFwXCm+A4QdL8cQip0cKdXWBZunNX9KWO8pZi6hE=; fh=f1HG4YWa+ndoxgBhrv2wvoi5B5rsQCa0P0+M/9TAKns=; b=Q8oaTB7gNI9S4FD8i8SU9BhaYcW6hwuqbG1kv2V+huNvPtaSsGiJW946rSjSP7H29w aARBKSX+Y2goF1eVEYtOsQMmK7QGZgUOjGF4oCjmsIgCaenaKvIELZvodQBbV39xGcWy /1JcsOsaGiKajVcRVHq03JQ4fYYPtr8Tohnj6YbgSG0+bPzN/S3ufKI4QtPLj+sC6Ujg qeI8XmqRivcNbH2DmGC5S3gACN02pQ0kkEfI9D+TtWiYtRhNCUY20JgQkEfybQ44cbf/ iCZG8YerOvalHBh7STtXlDkrthdVRhoNoA5NjnpvqIk8ibYEhjyvkEAq4CDuasBm7Kho SPxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wmBBpzmv; 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 n9-20020a0ce489000000b00628418847adsi5896540qvl.492.2023.09.25.07.59.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Sep 2023 07:59:23 -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=wmBBpzmv; 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 1qkn3J-00006a-E3; Mon, 25 Sep 2023 10:59:13 -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 1qkn2u-0008GV-Nx for qemu-devel@nongnu.org; Mon, 25 Sep 2023 10:58:48 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qkn2o-0002Bd-Ux for qemu-devel@nongnu.org; Mon, 25 Sep 2023 10:58:48 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40572aeb673so33363565e9.0 for ; Mon, 25 Sep 2023 07:58:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695653921; x=1696258721; 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=aeCFFwXCm+A4QdL8cQip0cKdXWBZunNX9KWO8pZi6hE=; b=wmBBpzmvlxnyPj3VQiJZH7Mb3RFKwuZJZo3hPp97bpXDGqOBR9F+W41j3SKzmPRiWA VH/OL9LL7/g9SVmHd1srLS0LzrgOfGDT0GbW8Eb4kiL1aRtetTkVEFCwmrtlvTgs5739 33Thjx9IttZSIhd4XXZ1QlsaOCfDFsuyEl3TwTuvK8Dudhv1oubGVA2Jzzui2I87JzWV wM6uVxvJ8QkyDBqYfAUXHqNG/ksXx+7Z6ANFWLZE3XPKLNKJz3EkHjLuZc7a/L5xkDiP wo2Wmkb3W44DeP4WS3IO8lOzWwK8OBGgfgC9xlzBCBzgFSioCsyCPeACgjxu2mQ6Xghc gKGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695653921; x=1696258721; 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=aeCFFwXCm+A4QdL8cQip0cKdXWBZunNX9KWO8pZi6hE=; b=h9WO4WF5Iucbds9gY9aZBaiVkZCJiQGviH//+aUDuu3j4hFxzocnhm5ZjDsKGAEo21 wreJzNMaMzJGjqGaHro+QqA7U7s5LWFphfa87zBblT+9+AIFJoaBXe6YR+hoKDR4rc2w rXgIja/0KXHZQofAAUqFxD72zziCy1jcn1so1WO/xXKvPSTb+7Ns2nWnTye6TUW2pyQ9 z9HwR4IHqwNbLjI7yyporrS4RDjFdx9pk2t+QDLCSZcKg4usD4Z/J35U6exvbTmbIav7 yfAFE1JXp9A0KNrRcK7QmZRWn9I08v0hy0ellQM4djRjws0oIj2XDH2rwdW9cYJFP0zs GIEw== X-Gm-Message-State: AOJu0YzyzLdCHIfDb7rJTzATL0r04ZXeMqPqTlcWuvkPnkZ/CY1f/MPC XpRcporS0kxQIEyWKMN4I1iO+Q== X-Received: by 2002:adf:e4ce:0:b0:321:6414:5869 with SMTP id v14-20020adfe4ce000000b0032164145869mr7303953wrm.58.1695653920841; Mon, 25 Sep 2023 07:58:40 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d29-20020adfa41d000000b003197869bcd7sm6970991wra.13.2023.09.25.07.58.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 07:58:40 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 99E231FFCC; Mon, 25 Sep 2023 15:48:57 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alistair Francis , =?utf-8?q?C=C3=A9dric_Le_Go?= =?utf-8?q?ater?= , Marcin Juszkiewicz , John Snow , libvir-list@redhat.com, =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , qemu-s390x@nongnu.org, Song Gao , Daniel Henrique Barboza , Marcel Apfelbaum , Bastian Koppelmann , Liu Zhiwei , Weiwei Li , Nicholas Piggin , Radoslaw Biernacki , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Cleber Rosa , Paolo Bonzini , Mahmoud Mandour , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Richard Henderson , Bin Meng , Alexandre Iooss , Xiaojuan Yang , qemu-ppc@nongnu.org, David Hildenbrand , =?utf-8?q?Alex_Benn=C3=A9e?= , Yanan Wang , Peter Maydell , qemu-riscv@nongnu.org, qemu-arm@nongnu.org, Palmer Dabbelt , Ilya Leoshkevich , Laurent Vivier , Yoshinori Sato , Leif Lindholm , Beraldo Leal Subject: [PATCH 21/31] accel/tcg: Add plugin_enabled to DisasContextBase Date: Mon, 25 Sep 2023 15:48:44 +0100 Message-Id: <20230925144854.1872513-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230925144854.1872513-1-alex.bennee@linaro.org> References: <20230925144854.1872513-1-alex.bennee@linaro.org> MIME-Version: 1.0 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: -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=unavailable 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 From: Richard Henderson Signed-off-by: Richard Henderson Message-Id: <20230824181233.1568795-2-richard.henderson@linaro.org> Signed-off-by: Alex Bennée --- 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 4e17c4f401..bf5bac260a 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;