[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 05/24] accel/tcg: Assert most of cpu_handle_interrupt() is sysemu
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 05/24] accel/tcg: Assert most of cpu_handle_interrupt() is sysemu-specific |
Date: |
Thu, 2 Sep 2021 17:16:56 +0200 |
To prove TCGCPUOps::cpu_exec_interrupt() is limited to system
emulation, start by asserting it is not called under user emulation.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
accel/tcg/cpu-exec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 3e387c944c5..5f4836946c1 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -725,6 +725,9 @@ static inline bool cpu_handle_interrupt(CPUState *cpu,
qemu_mutex_unlock_iothread();
return true;
}
+#if defined(CONFIG_USER_ONLY)
+ g_assert_not_reached();
+#endif
if (replay_mode == REPLAY_MODE_PLAY && !replay_has_interrupt()) {
/* Do nothing */
} else if (interrupt_request & CPU_INTERRUPT_HALT) {
--
2.31.1
- [PATCH 00/24] accel/tcg: Restrict TCGCPUOps::cpu_exec_interrupt() to sysemu, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH 01/24] target/xtensa: Restrict do_transaction_failed() to sysemu, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH 02/24] target/i386: Restrict sysemu-only fpu_helper helpers, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH 03/24] target/i386: Simplify TARGET_X86_64 #ifdef'ry, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH 05/24] accel/tcg: Assert most of cpu_handle_interrupt() is sysemu-specific,
Philippe Mathieu-Daudé <=
- [RFC PATCH 04/24] accel/tcg: Rename user-mode do_interrupt hack as fake_user_exception, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH 06/24] target/alpha: Restrict cpu_exec_interrupt() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/02
- [PATCH 08/24] target/avr: Restrict cpu_exec_interrupt() handler to sysemu, Philippe Mathieu-Daudé, 2021/09/02