From patchwork Thu Mar 17 13:46:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sergey.fedorov@linaro.org X-Patchwork-Id: 8612011 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A1454C0553 for ; Thu, 17 Mar 2016 14:51:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EEB5E2035E for ; Thu, 17 Mar 2016 14:51:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D69BE2026C for ; Thu, 17 Mar 2016 14:51:08 +0000 (UTC) Received: from localhost ([::1]:35481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agZGW-0000Pb-6a for patchwork-qemu-devel@patchwork.kernel.org; Thu, 17 Mar 2016 10:51:08 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=J1xn0ssd6LFcedRuMHqAnI+ap1fQEKH+o6a4Abgm0jY=; b=UPwGQK4yxoVujzfPU1EKyx4sbHU75UnsnRfm/3KvOaVRrTog/ITJ1i6YEkYR9bI5+E 80lQmNTQOiew4VHnlvZGqalNmTuvScsXI+dvNMIW+evPTDUKdH7+F3XNFZjr43OCjWup O4/qwkWDkWNUNM6cWwg09qm1BnZy5sVMoM5fw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=J1xn0ssd6LFcedRuMHqAnI+ap1fQEKH+o6a4Abgm0jY=; b=ZEh47+7igBHI0T9Jqr4sCF2OP+9hcOcfqVGHB8L3U6xPXYdciF7SWnmbN267ORY8as 62FQVukjE+nDLh2i0Eu5z5AEKERCG8UHwBCfjfF5LS+3s/Rc+PPbhoSaGAuY5WpHBl5W n8EAT4zClfZ07f+03gUG/TDXdVkiDc3riMWREb3ER6UTXqEB/Xu1Rm7ODOwKUPh0QbU5 efhPJjGwHfJ/J4L1SBE6rGUKRTGF3+qMh7PuqTyZg5VtPvNCRePGbkbFrzjN9xs8NNoU tUh6jystKZSTaVk4bvOV2pFftCzRwSTW7AIUvBG0z2N/4tj74jo2ucqX3676bDMzXmKY wdwA== X-Gm-Message-State: AD7BkJJFY+o190gA5gPQAbMtdK4WWbBNOEo8Pklok1BerxnBftCJjJjKVZUkb4PijAjQT0sF X-Received: by 10.25.158.136 with SMTP id h130mr3755166lfe.108.1458222488774; Thu, 17 Mar 2016 06:48:08 -0700 (PDT) Received: from localhost.localdomain ([89.208.20.115]) by smtp.gmail.com with ESMTPSA id wj2sm1371399lbb.5.2016.03.17.06.48.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Mar 2016 06:48:07 -0700 (PDT) From: sergey.fedorov@linaro.org To: qemu-devel@nongnu.org Date: Thu, 17 Mar 2016 16:46:18 +0300 Message-Id: <1458222382-6498-2-git-send-email-sergey.fedorov@linaro.org> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1458222382-6498-1-git-send-email-sergey.fedorov@linaro.org> References: <1458222382-6498-1-git-send-email-sergey.fedorov@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::235 X-Mailman-Approved-At: Thu, 17 Mar 2016 10:44:16 -0400 Cc: Sergey Fedorov , Richard Henderson , Peter Crosthwaite , Sergey Fedorov , Paolo Bonzini Subject: [Qemu-devel] [PATCH 1/5] tcg: code_bitmap is not used by user-mode emulation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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,