@@ -29,7 +29,6 @@ void page_collection_unlock(struct page_collection *set);
void tb_invalidate_phys_page_fast(struct page_collection *pages,
tb_page_addr_t start, int len,
uintptr_t retaddr);
-void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr);
#ifdef CONFIG_USER_ONLY
int page_unprotect(target_ulong address, uintptr_t pc);
@@ -15,7 +15,7 @@ struct TCGModuleOps {
void (*tcg_exec_realizefn)(CPUState *cpu, Error **errp);
void (*tb_flush)(CPUState *cpu);
void (*tb_invalidate_phys_range)(tb_page_addr_t start, tb_page_addr_t end);
-
+ void (*tb_check_watchpoint)(CPUState *cpu, uintptr_t retaddr);
};
extern struct TCGModuleOps tcg;
@@ -29,6 +29,10 @@ static void tb_invalidate_phys_range_stub(tb_page_addr_t start, tb_page_addr_t e
{
}
+static void tb_check_watchpoint_stub(CPUState *cpu, uintptr_t retaddr)
+{
+}
+
struct TCGModuleOps tcg = {
.tlb_flush = update_cpu_stub,
.tlb_flush_page = tlb_flush_page_stub,
@@ -40,4 +44,5 @@ struct TCGModuleOps tcg = {
.tcg_exec_unrealizefn = update_cpu_stub,
.tb_flush = update_cpu_stub,
.tb_invalidate_phys_range = tb_invalidate_phys_range_stub,
+ .tb_check_watchpoint = tb_check_watchpoint_stub,
};
@@ -1910,7 +1910,7 @@ static bool tb_invalidate_phys_page(tb_page_addr_t addr, uintptr_t pc)
#endif
/* user-mode: call with mmap_lock held */
-void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr)
+static void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr)
{
TranslationBlock *tb;
@@ -2439,6 +2439,7 @@ static void tcg_module_ops_tb(void)
{
tcg.tb_flush = tb_flush;
tcg.tb_invalidate_phys_range = tb_invalidate_phys_range;
+ tcg.tb_check_watchpoint = tb_check_watchpoint;
}
type_init(tcg_module_ops_tb);
@@ -937,7 +937,7 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len,
cpu->watchpoint_hit = wp;
mmap_lock();
- tb_check_watchpoint(cpu, ra);
+ tcg.tb_check_watchpoint(cpu, ra);
if (wp->flags & BP_STOP_BEFORE_ACCESS) {
cpu->exception_index = EXCP_DEBUG;
mmap_unlock();
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- include/exec/translate-all.h | 1 - include/tcg/tcg-module.h | 2 +- accel/tcg/tcg-module.c | 5 +++++ accel/tcg/translate-all.c | 3 ++- softmmu/physmem.c | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-)