[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 25/28] accel/tcg/cpu-exec: Restrict watchpoint code to system
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v4 25/28] accel/tcg/cpu-exec: Restrict watchpoint code to system emulation |
Date: |
Wed, 3 Mar 2021 22:47:05 +0100 |
We can not use watchpoints in user-mode emulation because we
need the softmmu slow path to detect accesses to watchpointed
memory. Add #ifdef'ry around it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
accel/tcg/cpu-exec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 16e4fe3ccd8..3a6436013ea 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -471,13 +471,16 @@ static inline bool cpu_handle_halt(CPUState *cpu)
static inline void cpu_handle_debug_exception(CPUState *cpu)
{
CPUClass *cc = CPU_GET_CLASS(cpu);
- CPUWatchpoint *wp;
+#ifndef CONFIG_USER_ONLY
if (!cpu->watchpoint_hit) {
+ CPUWatchpoint *wp;
+
QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) {
wp->flags &= ~BP_WATCHPOINT_HIT;
}
}
+#endif
if (cc->tcg_ops->debug_excp_handler) {
cc->tcg_ops->debug_excp_handler(cpu);
--
2.26.2
- RE: [PATCH v4 16/28] cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.c, (continued)
- [PATCH v4 17/28] linux-user: Remove dead code, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 18/28] gdbstub: Remove watchpoint dead code in gdbserver_fork(), Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 19/28] target/arm/internals: Fix code style for checkpatch.pl, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 20/28] target/arm: Move code blocks around, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 21/28] target/arm: Refactor some function bodies, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 22/28] target/arm: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 23/28] target/i386: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 24/28] target/xtensa: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 25/28] accel/tcg/cpu-exec: Restrict watchpoint code to system emulation,
Philippe Mathieu-Daudé <=
- [PATCH v4 26/28] cpu: Remove watchpoint stubs for user emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 27/28] cpu: Fix code style for checkpatch.pl, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 28/28] cpu: Move sysemu specific declarations to 'sysemu-cpu-ops.h', Philippe Mathieu-Daudé, 2021/03/03
- Re: [PATCH v4 00/28] cpu: Introduce SysemuCPUOps structure, remove watchpoints from usermode, Richard Henderson, 2021/03/03