From: Richard Henderson <richard.henderson(a)linaro.org>
Signed-off-by: Richard Henderson <richard.henderson(a)linaro.org>
Message-Id: <20230824181233.1568795-2-richard.henderson(a)linaro.org>
Signed-off-by: Alex Bennée <alex.bennee(a)linaro.org>
---
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;
--
2.39.2