Message ID | 1522980788-1252-9-git-send-email-cota@braap.org |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=braap.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=braap.org header.i=@braap.org header.b="2CJKoK4U"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="E5hNzXbK"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40HNcl0QmDz9s24 for <incoming@patchwork.ozlabs.org>; Fri, 6 Apr 2018 12:17:11 +1000 (AEST) Received: from localhost ([::1]:44010 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1f4Gw9-0005FD-3N for incoming@patchwork.ozlabs.org; Thu, 05 Apr 2018 22:17:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <cota@braap.org>) id 1f4GsL-0002G8-4K for qemu-devel@nongnu.org; Thu, 05 Apr 2018 22:13:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <cota@braap.org>) id 1f4GsJ-0003Ut-DA for qemu-devel@nongnu.org; Thu, 05 Apr 2018 22:13:13 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:48677) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <cota@braap.org>) id 1f4GsJ-0003UL-7P for qemu-devel@nongnu.org; Thu, 05 Apr 2018 22:13:11 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E1D4020B49; Thu, 5 Apr 2018 22:13:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 05 Apr 2018 22:13:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=DYQhoCXYz6knjCoh3M9zPNV5kv 7E18y5ZIFLZtuC7Pk=; b=2CJKoK4Up6AUH8hFMNsIoBZlGNv/+YZJlH2zp9dh3j CYtktSlbH1VI3BQCtbxoMQ4GBsNOCof6fBDdWBersHaNVcvi6AphnnBhMGdtPQW6 BEDmzFqrfd9iz+aUYgsvtt7gjCRUWsf0V9oNDc3HGh8+BJfyg1k9/4Fiso7tMlQ/ 0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=DYQhoC XYz6knjCoh3M9zPNV5kv7E18y5ZIFLZtuC7Pk=; b=E5hNzXbKpRKz2WD9WAifaT fg+uOC2/Ayp6JgTYUZ8kiSVw2nygzIFix/06Pc6q85XpPsmvHzY/zFUw7/3dmx36 s0EPJkI8JOXJuydIQmS9BCME8WzWJp8EZeE2sBaKBxTqZ3fclgEa1K/EfOBcz6dE VmBdP05mPENmiQZwet4mAp7gPjPIwCLBU2//agV+JAA4yP289NXDTZF9nRAV77bf 5EGt0O5TaI7ebBIkqIUBTWLnRwadxS6/CTifxB3X3XUolRbm22iX775D0lMn4KDH pst58/NIfyvGUfWUBhzLfK4CKv7YwUgFhZlgh1PyoJZFTBaFr60IzTknLGB9iiFw == X-ME-Sender: <xms:ttfGWi63t9xm4NJlSD002Ml5Ua5GUAwkb2wcdIMr4HxIwUH4yeAx7Q> Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id A5D57E47F2; Thu, 5 Apr 2018 22:13:10 -0400 (EDT) From: "Emilio G. Cota" <cota@braap.org> To: qemu-devel@nongnu.org Date: Thu, 5 Apr 2018 22:12:59 -0400 Message-Id: <1522980788-1252-9-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522980788-1252-1-git-send-email-cota@braap.org> References: <1522980788-1252-1-git-send-email-cota@braap.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.29 Subject: [Qemu-devel] [PATCH v2 08/17] translate-all: work page-by-page in tb_invalidate_phys_range_1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Richard Henderson <richard.henderson@linaro.org>, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= <alex.bennee@linaro.org>, Paolo Bonzini <pbonzini@redhat.com> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
tcg: tb_lock_removal redux v2
|
expand
|
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 7c72354..b27aacc 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -1378,10 +1378,14 @@ TranslationBlock *tb_gen_code(CPUState *cpu, */ static void tb_invalidate_phys_range_1(tb_page_addr_t start, tb_page_addr_t end) { - while (start < end) { - tb_invalidate_phys_page_range(start, end, 0); - start &= TARGET_PAGE_MASK; - start += TARGET_PAGE_SIZE; + tb_page_addr_t next; + + for (next = (start & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE; + start < end; + start = next, next += TARGET_PAGE_SIZE) { + tb_page_addr_t bound = MIN(next, end); + + tb_invalidate_phys_page_range(start, bound, 0); } }