Message ID | 20250313034524.3069690-13-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | accel/tcg, codebase: Build once patches | expand |
On 13/3/25 04:44, Richard Henderson wrote: > The mmap_lock is user-only, whereas watchpoint.c > is only compiled for system mode. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > accel/tcg/watchpoint.c | 3 --- > 1 file changed, 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
On 3/12/25 20:44, Richard Henderson wrote: > The mmap_lock is user-only, whereas watchpoint.c > is only compiled for system mode. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > accel/tcg/watchpoint.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/accel/tcg/watchpoint.c b/accel/tcg/watchpoint.c > index 65b21884ce..cfb37a49e7 100644 > --- a/accel/tcg/watchpoint.c > +++ b/accel/tcg/watchpoint.c > @@ -124,17 +124,14 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, > } > cpu->watchpoint_hit = wp; > > - mmap_lock(); > /* This call also restores vCPU state */ > tb_check_watchpoint(cpu, ra); > if (wp->flags & BP_STOP_BEFORE_ACCESS) { > cpu->exception_index = EXCP_DEBUG; > - mmap_unlock(); > cpu_loop_exit(cpu); > } else { > /* Force execution of one insn next time. */ > cpu->cflags_next_tb = 1 | CF_NOIRQ | curr_cflags(cpu); > - mmap_unlock(); > cpu_loop_exit_noexc(cpu); > } > } else { Hum, how can we link that today? Answer to myself: a stub in page-protection.h. Maybe would be worth to add a g_assert_not_reached() in mmap_lock, and do the small cleanup for concerned places. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
diff --git a/accel/tcg/watchpoint.c b/accel/tcg/watchpoint.c index 65b21884ce..cfb37a49e7 100644 --- a/accel/tcg/watchpoint.c +++ b/accel/tcg/watchpoint.c @@ -124,17 +124,14 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, } cpu->watchpoint_hit = wp; - mmap_lock(); /* This call also restores vCPU state */ tb_check_watchpoint(cpu, ra); if (wp->flags & BP_STOP_BEFORE_ACCESS) { cpu->exception_index = EXCP_DEBUG; - mmap_unlock(); cpu_loop_exit(cpu); } else { /* Force execution of one insn next time. */ cpu->cflags_next_tb = 1 | CF_NOIRQ | curr_cflags(cpu); - mmap_unlock(); cpu_loop_exit_noexc(cpu); } } else {
The mmap_lock is user-only, whereas watchpoint.c is only compiled for system mode. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- accel/tcg/watchpoint.c | 3 --- 1 file changed, 3 deletions(-)