aboutsummaryrefslogtreecommitdiff
path: root/accel/tcg
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-04-03 09:31:49 -1000
committerRichard Henderson <richard.henderson@linaro.org>2024-05-15 08:55:18 +0200
commite501325991815e09297a048ffb0be81411bbe34a (patch)
tree2ad0d48a904af15dc89beb874d02f0d2a262fe97 /accel/tcg
parent36bc99bc789fd564facea93feb2a22e4942b84d0 (diff)
plugins: Read mem_only directly from TB cflags
Do not pass around a boolean between multiple structures, just read it from the TranslationBlock in the TCGContext. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'accel/tcg')
-rw-r--r--accel/tcg/plugin-gen.c4
-rw-r--r--accel/tcg/translator.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c
index 716c8ec753..2aa1e08c17 100644
--- a/accel/tcg/plugin-gen.c
+++ b/accel/tcg/plugin-gen.c
@@ -303,8 +303,7 @@ static void plugin_gen_inject(struct qemu_plugin_tb *plugin_tb)
}
}
-bool plugin_gen_tb_start(CPUState *cpu, const DisasContextBase *db,
- bool mem_only)
+bool plugin_gen_tb_start(CPUState *cpu, const DisasContextBase *db)
{
bool ret = false;
@@ -323,7 +322,6 @@ bool plugin_gen_tb_start(CPUState *cpu, const DisasContextBase *db,
ptb->vaddr2 = -1;
ptb->haddr1 = db->host_addr[0];
ptb->haddr2 = NULL;
- ptb->mem_only = mem_only;
ptb->mem_helper = false;
tcg_gen_plugin_cb(PLUGIN_GEN_FROM_TB);
diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c
index 986045154c..157b447810 100644
--- a/accel/tcg/translator.c
+++ b/accel/tcg/translator.c
@@ -144,7 +144,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns,
ops->tb_start(db, cpu);
tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */
- plugin_enabled = plugin_gen_tb_start(cpu, db, cflags & CF_MEMI_ONLY);
+ plugin_enabled = plugin_gen_tb_start(cpu, db);
db->plugin_enabled = plugin_enabled;
while (true) {