diff options
author | David Hildenbrand | 2019-08-23 12:07:40 +0200 |
---|---|---|
committer | Richard Henderson | 2019-09-03 17:30:39 +0200 |
commit | 0026348b48fe532279e8c12b100c16c1aa991373 (patch) | |
tree | cbb0e35f93d6dff9770be449729c95441cc423c6 /include/hw/core | |
parent | exec: Move user-only watchpoint stubs inline (diff) | |
download | qemu-0026348b48fe532279e8c12b100c16c1aa991373.tar.gz qemu-0026348b48fe532279e8c12b100c16c1aa991373.tar.xz qemu-0026348b48fe532279e8c12b100c16c1aa991373.zip |
exec: Factor out core logic of check_watchpoint()
We want to perform the same checks in probe_write() to trigger a cpu
exit before doing any modifications. We'll have to pass a PC.
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20190823100741.9621-9-david@redhat.com>
[rth: Use vaddr for len, like other watchpoint functions;
Move user-only stub to static inline.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/hw/core')
-rw-r--r-- | include/hw/core/cpu.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 6de688059d..7bd8bed5b2 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1091,6 +1091,11 @@ static inline void cpu_watchpoint_remove_by_ref(CPUState *cpu, static inline void cpu_watchpoint_remove_all(CPUState *cpu, int mask) { } + +static inline void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, + MemTxAttrs atr, int fl, uintptr_t ra) +{ +} #else int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, int flags, CPUWatchpoint **watchpoint); @@ -1098,6 +1103,8 @@ int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, vaddr len, int flags); void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint); void cpu_watchpoint_remove_all(CPUState *cpu, int mask); +void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, + MemTxAttrs attrs, int flags, uintptr_t ra); #endif /** |