Message ID | 20210619172626.875885-5-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | accel/tcg: Fix for #360 and other i/o alignment issues | expand |
On 6/19/21 7:26 PM, Richard Henderson wrote: > Data read watchpoints do not apply to code reads. > Watchpoints for code are called breakpoints, and > are handled by the translator. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > accel/tcg/cputlb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index ba21487138..23a97849be 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1930,7 +1930,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi, iotlbentry = &env_tlb(env)->d[mmu_idx].iotlb[index]; /* Handle watchpoints. */ - if (unlikely(tlb_addr & TLB_WATCHPOINT)) { + if (!code_read && unlikely(tlb_addr & TLB_WATCHPOINT)) { /* On watchpoint hit, this will longjmp out. */ cpu_check_watchpoint(env_cpu(env), addr, size, iotlbentry->attrs, BP_MEM_READ, retaddr);
Data read watchpoints do not apply to code reads. Watchpoints for code are called breakpoints, and are handled by the translator. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- accel/tcg/cputlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1