diff options
author | Claudio Fontana <cfontana@suse.de> | 2021-02-04 17:39:21 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-02-05 10:24:14 -1000 |
commit | 9ea9087bb4a86893e4ac6ff643837937dc9e5849 (patch) | |
tree | 18d5e4836991b95e527f3f81eba767cd3bb63a0f /softmmu/physmem.c | |
parent | 79fc8d45116b4b07eeab53feea1d209955b0ecdd (diff) | |
download | qemu-9ea9087bb4a86893e4ac6ff643837937dc9e5849.zip qemu-9ea9087bb4a86893e4ac6ff643837937dc9e5849.tar.gz qemu-9ea9087bb4a86893e4ac6ff643837937dc9e5849.tar.bz2 |
cpu: move adjust_watchpoint_address to tcg_ops
commit 40612000599e ("arm: Correctly handle watchpoints for BE32 CPUs")
introduced this ARM-specific, TCG-specific hack to adjust the address,
before checking it with cpu_check_watchpoint.
Make adjust_watchpoint_address optional and move it to tcg_ops.
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20210204163931.7358-14-cfontana@suse.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'softmmu/physmem.c')
-rw-r--r-- | softmmu/physmem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 51ed600..3d9a9c3 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -894,7 +894,10 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, return; } - addr = cc->adjust_watchpoint_address(cpu, addr, len); + if (cc->tcg_ops.adjust_watchpoint_address) { + /* this is currently used only by ARM BE32 */ + addr = cc->tcg_ops.adjust_watchpoint_address(cpu, addr, len); + } QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) { if (watchpoint_address_matches(wp, addr, len) && (wp->flags & flags)) { |