aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2025-01-16 16:02:51 +0000
committerAlex Bennée <alex.bennee@linaro.org>2025-01-17 10:44:59 +0000
commit27f347e6a1d269c533633c812321cabb249eada8 (patch)
tree1b3b74e67d4f1e2365d83b3516fda7e1350864f3
parentdb7a06ade11eb380aeef0b7c204b699878bdd799 (diff)
downloadqemu-27f347e6a1d269c533633c812321cabb249eada8.zip
qemu-27f347e6a1d269c533633c812321cabb249eada8.tar.gz
qemu-27f347e6a1d269c533633c812321cabb249eada8.tar.bz2
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 <pierrick.bouvier@linaro.org> Reviewed-by: Julian Ganz <neither@nut.email> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20250116160306.1709518-23-alex.bennee@linaro.org>
-rw-r--r--accel/tcg/translate-all.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 453eb20..d56ca13 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -633,9 +633,10 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr)
* Exit the loop and potentially generate a new TB executing the
* just the I/O insns. We also limit instrumentation to memory
* operations only (which execute after completion) so we don't
- * double instrument the instruction.
+ * double instrument the instruction. Also don't let an IRQ sneak
+ * in before we execute it.
*/
- cpu->cflags_next_tb = curr_cflags(cpu) | CF_MEMI_ONLY | n;
+ cpu->cflags_next_tb = curr_cflags(cpu) | CF_MEMI_ONLY | CF_NOIRQ | n;
if (qemu_loglevel_mask(CPU_LOG_EXEC)) {
vaddr pc = cpu->cc->get_pc(cpu);