On Jan 08 11:47, Emilio Cota wrote: > We were mistakenly checking tcg_ctx->plugin_insn as a canary to know > whether the TB had emitted helpers that might have accessed memory. > > The problem is that tcg_ctx->plugin_insn gets updated on every > instruction in the TB, which results in us wrongly performing the > optimization (i.e. not clearing cpu->plugin_mem_cbs) way too often, > since it's not rare that the last instruction in the TB doesn't > use helpers. > > Fix it by tracking a per-TB canary. > > While at it, expand documentation. > > Related: #1381 > > Signed-off-by: Emilio Cota <c...@braap.org> > --- > accel/tcg/plugin-gen.c | 26 ++++++++++++++++++-------- > include/qemu/plugin.h | 7 +++++++ > 2 files changed, 25 insertions(+), 8 deletions(-)
Tested-by: Aaron Lindsay <aa...@os.amperecomputing.com>