diff options
author | Richard Henderson | 2022-08-12 18:15:15 +0200 |
---|---|---|
committer | Richard Henderson | 2022-10-04 05:53:31 +0200 |
commit | b21af662c15522b83a973bc2ffd51d0117c0e039 (patch) | |
tree | f2870a0dbb87cd4474f9942569642157d1f3670c /include | |
parent | accel/tcg: Use bool for page_find_alloc (diff) | |
download | qemu-b21af662c15522b83a973bc2ffd51d0117c0e039.tar.gz qemu-b21af662c15522b83a973bc2ffd51d0117c0e039.tar.xz qemu-b21af662c15522b83a973bc2ffd51d0117c0e039.zip |
accel/tcg: Use DisasContextBase in plugin_gen_tb_start
Use the pc coming from db->pc_first rather than the TB.
Use the cached host_addr rather than re-computing for the
first page. We still need a separate lookup for the second
page because it won't be computed for DisasContextBase until
the translator actually performs a read from the page.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/plugin-gen.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/exec/plugin-gen.h b/include/exec/plugin-gen.h index f92f169739..5004728c61 100644 --- a/include/exec/plugin-gen.h +++ b/include/exec/plugin-gen.h @@ -19,7 +19,8 @@ struct DisasContextBase; #ifdef CONFIG_PLUGIN -bool plugin_gen_tb_start(CPUState *cpu, const TranslationBlock *tb, bool supress); +bool plugin_gen_tb_start(CPUState *cpu, const struct DisasContextBase *db, + bool supress); void plugin_gen_tb_end(CPUState *cpu); void plugin_gen_insn_start(CPUState *cpu, const struct DisasContextBase *db); void plugin_gen_insn_end(void); @@ -48,8 +49,8 @@ static inline void plugin_insn_append(abi_ptr pc, const void *from, size_t size) #else /* !CONFIG_PLUGIN */ -static inline -bool plugin_gen_tb_start(CPUState *cpu, const TranslationBlock *tb, bool supress) +static inline bool +plugin_gen_tb_start(CPUState *cpu, const struct DisasContextBase *db, bool sup) { return false; } |