Skip to content

Commit 27f347e

Browse files
committed
accel/tcg: also suppress asynchronous IRQs for cpu_io_recompile
While it would be technically correct to allow an IRQ to happen (as the offending instruction never really completed) it messes up instrumentation. We already take care to only use memory instrumentation on the block, we should also suppress IRQs. Reviewed-by: Pierrick Bouvier <[email protected]> Reviewed-by: Julian Ganz <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Alex Bennée <[email protected]> Message-Id: <[email protected]>
1 parent db7a06a commit 27f347e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

accel/tcg/translate-all.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,9 +633,10 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr)
633633
* Exit the loop and potentially generate a new TB executing the
634634
* just the I/O insns. We also limit instrumentation to memory
635635
* operations only (which execute after completion) so we don't
636-
* double instrument the instruction.
636+
* double instrument the instruction. Also don't let an IRQ sneak
637+
* in before we execute it.
637638
*/
638-
cpu->cflags_next_tb = curr_cflags(cpu) | CF_MEMI_ONLY | n;
639+
cpu->cflags_next_tb = curr_cflags(cpu) | CF_MEMI_ONLY | CF_NOIRQ | n;
639640

640641
if (qemu_loglevel_mask(CPU_LOG_EXEC)) {
641642
vaddr pc = cpu->cc->get_pc(cpu);

0 commit comments

Comments
 (0)