summaryrefslogtreecommitdiffstats
path: root/include/hw/core
diff options
context:
space:
mode:
authorDavid Hildenbrand2019-08-23 12:07:40 +0200
committerRichard Henderson2019-09-03 17:30:39 +0200
commit0026348b48fe532279e8c12b100c16c1aa991373 (patch)
treecbb0e35f93d6dff9770be449729c95441cc423c6 /include/hw/core
parentexec: Move user-only watchpoint stubs inline (diff)
downloadqemu-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.h7
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
/**