diff options
Diffstat (limited to 'translate-all.c')
-rw-r--r-- | translate-all.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/translate-all.c b/translate-all.c index e753a50640..5a5499ffb6 100644 --- a/translate-all.c +++ b/translate-all.c @@ -773,6 +773,7 @@ static TranslationBlock *tb_alloc(target_ulong pc) tb = &tcg_ctx.tb_ctx.tbs[tcg_ctx.tb_ctx.nb_tbs++]; tb->pc = pc; tb->cflags = 0; + tb->invalid = false; return tb; } @@ -994,6 +995,8 @@ void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr) uint32_t h; tb_page_addr_t phys_pc; + atomic_set(&tb->invalid, true); + /* remove the TB from the hash list */ phys_pc = tb->page_addr[0] + (tb->pc & ~TARGET_PAGE_MASK); h = tb_hash_func(phys_pc, tb->pc, tb->flags); |