From 90aa39a1cc4837360889f0e033ca25cc82100308 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sat, 9 Apr 2016 01:00:23 +0300 Subject: tcg: Allow goto_tb to any target PC in user mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In user mode, there's only a static address translation, TBs are always invalidated properly and direct jumps are reset when mapping change. Thus the destination address is always valid for direct jumps and there's no need to restrict it to the pages the TB resides in. Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov Cc: Riku Voipio Cc: Blue Swirl Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- tcg/tcg-op.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tcg') diff --git a/tcg/tcg-op.h b/tcg/tcg-op.h index ace39619ef..f217e80747 100644 --- a/tcg/tcg-op.h +++ b/tcg/tcg-op.h @@ -759,9 +759,12 @@ static inline void tcg_gen_exit_tb(uintptr_t val) * * See tcg/README for more info about this TCG operation. * - * NOTE: Direct jumps with goto_tb are only safe within the pages this TB - * resides in because we don't take care of direct jumps when address mapping - * changes, e.g. in tlb_flush(). + * NOTE: In softmmu emulation, direct jumps with goto_tb are only safe within + * the pages this TB resides in because we don't take care of direct jumps when + * address mapping changes, e.g. in tlb_flush(). In user mode, there's only a + * static address translation, so the destination address is always valid, TBs + * are always invalidated properly, and direct jumps are reset when mapping + * changes. */ void tcg_gen_goto_tb(unsigned idx); -- cgit v1.2.3