Skip to content

Commit

Permalink
Fix mismerge that breaks instruction tracing.
Browse files Browse the repository at this point in the history
A previous merge moved the tcg cflags logic to the tcg_cpu_init_cflags
function. This is only called when a vcpu is started to precompute
cflags. In order to ensure that TB cflags are compared correctly,
curr_cflags must set CF_LOG_INSTR dynamically.
  • Loading branch information
qwattash committed Jul 8, 2024
1 parent 90d7e31 commit 0e11f73
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion include/exec/exec-all.h
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,14 @@ static inline uint32_t tb_cflags(const TranslationBlock *tb)
/* current cflags for hashing/comparison */
static inline uint32_t curr_cflags(CPUState *cpu)
{
return cpu->tcg_cflags;
uint32_t cflags = cpu->tcg_cflags;

#ifdef CONFIG_TCG_LOG_INSTR
if (cpu->log_state.loglevel_active && qemu_loglevel_mask(CPU_LOG_INSTR)) {
cflags |= CF_LOG_INSTR;
}
#endif
return cflags;
}

/* TranslationBlock invalidate API */
Expand Down

0 comments on commit 0e11f73

Please sign in to comment.