Support flushing translation blocks and flush when we don't need count hook

This commit is contained in:
2022-04-26 00:45:49 +02:00
parent fbf4078d65
commit 4e22744679
4 changed files with 27 additions and 2 deletions

View File

@@ -985,6 +985,10 @@ static void tb_htable_init(struct uc_struct *uc)
}
static void uc_tb_flush(struct uc_struct *uc) {
tb_flush(uc->cpu);
}
static void uc_invalidate_tb(struct uc_struct *uc, uint64_t start_addr, size_t len)
{
tb_page_addr_t start, end;
@@ -1095,6 +1099,7 @@ void tcg_exec_init(struct uc_struct *uc, unsigned long tb_size)
/* Invalidate / Cache TBs */
uc->uc_invalidate_tb = uc_invalidate_tb;
uc->uc_gen_tb = uc_gen_tb;
uc->tb_flush = uc_tb_flush;
/* Inline hooks optimization */
uc->add_inline_hook = uc_add_inline_hook;