[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 22/22] accel/tcg: also suppress asynchronous IRQs for cpu_io_reco
From: |
Alex Bennée |
Subject: |
[PATCH 22/22] accel/tcg: also suppress asynchronous IRQs for cpu_io_recompile |
Date: |
Thu, 9 Jan 2025 17:06:19 +0000 |
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.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Julian Ganz <neither@nut.email>
---
accel/tcg/translate-all.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 453eb20ec9..d56ca13cdd 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);
--
2.39.5
- Re: [PATCH 08/22] system/vl: more error exit into config enumeration code, (continued)
[PATCH 11/22] tests/tcg/plugins/insn: remove unused callback parameter, Alex Bennée, 2025/01/09
[PATCH 22/22] accel/tcg: also suppress asynchronous IRQs for cpu_io_recompile,
Alex Bennée <=
[PATCH 17/22] contrib/plugins/hotblocks: fix 32-bit build, Alex Bennée, 2025/01/09
[PATCH 15/22] contrib/plugins/stoptrigger: fix 32-bit build, Alex Bennée, 2025/01/09
[PATCH 20/22] contrib/plugins/hotpages: fix 32-bit build, Alex Bennée, 2025/01/09
[PATCH 21/22] configure: reenable plugins by default for 32-bit hosts, Alex Bennée, 2025/01/09
[PATCH 19/22] contrib/plugins/hwprofile: fix 32-bit build, Alex Bennée, 2025/01/09
[PATCH 18/22] contrib/plugins/cflow: fix 32-bit build, Alex Bennée, 2025/01/09