Received: from eggs.gnu.org ([2001:4830:134:3::10]:52857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agYHd-0002OM-8C for qemu-devel@nongnu.org; Thu, 17 Mar 2016 09:48:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agYHa-0008EY-2m for qemu-devel@nongnu.org; Thu, 17 Mar 2016 09:48:13 -0400 Received: from mail-lf0-x235.google.com ([2a00:1450:4010:c07::235]:35668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agYHZ-0008EN-HL for qemu-devel@nongnu.org; Thu, 17 Mar 2016 09:48:09 -0400 Received: by mail-lf0-x235.google.com with SMTP id v130so15784028lfd.2 for ; Thu, 17 Mar 2016 06:48:09 -0700 (PDT) From: sergey.fedorov@linaro.org Date: Thu, 17 Mar 2016 16:46:18 +0300 Message-Id: <1458222382-6498-2-git-send-email-sergey.fedorov@linaro.org> In-Reply-To: <1458222382-6498-1-git-send-email-sergey.fedorov@linaro.org> References: <1458222382-6498-1-git-send-email-sergey.fedorov@linaro.org> Subject: [Qemu-devel] [PATCH 1/5] tcg: code_bitmap is not used by user-mode emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Sergey Fedorov , Richard Henderson , Peter Crosthwaite , Sergey Fedorov , Paolo Bonzini From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Sergey Fedorov --- translate-all.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/translate-all.c b/translate-all.c index e9f409b762ab..f17ace1ae899 100644 --- a/translate-all.c +++ b/translate-all.c @@ -784,6 +784,9 @@ void tb_free(TranslationBlock *tb) static inline void invalidate_page_bitmap(PageDesc *p) { +#ifndef CONFIG_SOFTMMU + assert(p->code_bitmap == NULL); +#endif g_free(p->code_bitmap); p->code_bitmap = NULL; p->code_write_count = 0; @@ -1018,6 +1021,7 @@ void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr) tcg_ctx.tb_ctx.tb_phys_invalidate_count++; } +#ifdef CONFIG_SOFTMMU static void build_page_bitmap(PageDesc *p) { int n, tb_start, tb_end; @@ -1046,6 +1050,7 @@ static void build_page_bitmap(PageDesc *p) tb = tb->page_next[n]; } } +#endif /* Called with mmap_lock held for user mode emulation. */ TranslationBlock *tb_gen_code(CPUState *cpu, @@ -1294,6 +1299,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, #endif } +#ifdef CONFIG_SOFTMMU /* len must be <= 8 and start must be a multiple of len */ void tb_invalidate_phys_page_fast(tb_page_addr_t start, int len) { @@ -1331,8 +1337,7 @@ void tb_invalidate_phys_page_fast(tb_page_addr_t start, int len) tb_invalidate_phys_page_range(start, start + len, 1); } } - -#if !defined(CONFIG_SOFTMMU) +#else /* Called with mmap_lock held. */ static void tb_invalidate_phys_page(tb_page_addr_t addr, uintptr_t pc, void *puc, -- 2.7.3