]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
accel/tcg: Record DisasContextBase in tcg_ctx for plugins
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 3 Apr 2024 05:59:49 +0000 (19:59 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 15 May 2024 06:55:10 +0000 (08:55 +0200)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/plugin-gen.c
include/tcg/tcg.h

index 49f5d1c2e43a233d27e0ea01501f156145271be1..842da97204cf9bd8052b64b8b28f6b267c31b1ba 100644 (file)
@@ -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;
index 135e36d729e2cb30997411f0e76badbd0b1d55a8..2a1c080babb29e3d4c428c0a283aa506a0ffdad2 100644 (file)
@@ -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;