From patchwork Wed Dec 21 05:03:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 635601 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3320539pvb; Tue, 20 Dec 2022 21:09:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXuTSfTS/mmZzifui8vaL/n4WOzR55B+OZ7zouoSXQogOP5PY675gPem2JCO180EKh4JfzMa X-Received: by 2002:a05:622a:2284:b0:3a8:55c:a893 with SMTP id ay4-20020a05622a228400b003a8055ca893mr563653qtb.0.1671599350759; Tue, 20 Dec 2022 21:09:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671599350; cv=none; d=google.com; s=arc-20160816; b=fWhDw7K2nLPvNS5buuUC7w8yY4rbE6oLlxqR4O+L3gpleVD7gHJU1P4SeHujArNjPG j8tHmj1iVLDxSEC6tw4WYe4l1IbGRnX0aZBwT/VOAPGPlVLdToWVJPsfnXERowQx0ZFx nbwqTrti8ZB7slHCBWNCOP3Apv1vMNWxzQradikt23dBhqzyw2IaWD4UBW931dEVT1+K 5vYdUIUPKiAkb+odnosaz80tyZ13j+kuvWev1CwURo0C6JkBKChjLnXLvn0dVv0UV3Jw IHJsVDxKH1z74AnSbDnJ0ZrGVUh+BdfpHHymalEAcX89BUV7y+hjEIKacb4RXFgsTYv1 EBtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KNHQY/4RRXvJU0V3H4/K7OQJyFUdroRHt7gYQp+f6XQ=; b=Pycfr/bsCbxnZrgLvtqo+E39RT0pUz4qqKfbOBy96Q1QheynIcfwmhAvS7bWYWyirm IVaLwvvFNR4ov7uRShNNRV5lR48RBJzjxEWw3bnlqfuSqWAJ1cayMG/Dhyg8xsZ+/z/D u0GtzRgc7bBwfPZ5w8WUIDMpJ09WXj4JP2XzFYAUui21/ezuh1UP3bsh8c1+I25wAW6e iHlUn1op+Yr9sZ6FuJC5FSlj8jTYsyGScGo0dqT+KxWm3L8/faXnYpg3Uu1I8zbfN0Yt Nln9Tvzs21tkZPSloLRx8Kj9lG4wA0zxiDsm3XiwqrGEm13ppNLCDmF1g8rX9IfxQzxr YEYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=vbluLpy9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x6-20020a05620a448600b006fc7553fa6asi6382062qkp.216.2022.12.20.21.09.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Dec 2022 21:09:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=vbluLpy9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7rGR-0002KP-3F; Wed, 21 Dec 2022 00:03:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7rGP-0002Ju-VB for qemu-devel@nongnu.org; Wed, 21 Dec 2022 00:03:33 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7rGL-0003NB-8j for qemu-devel@nongnu.org; Wed, 21 Dec 2022 00:03:33 -0500 Received: by mail-pl1-x631.google.com with SMTP id u7so6249122plq.11 for ; Tue, 20 Dec 2022 21:03:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KNHQY/4RRXvJU0V3H4/K7OQJyFUdroRHt7gYQp+f6XQ=; b=vbluLpy9B0k95RrQGhOzSiacC2gpg7TmcfHKdq0jwtwjLEhMnGIom/ZK9D+rruaAho fs3TN7oCJgP9N9U3YKHfWCdL2mRHU3jmWNnjuCHZvWbQdYHXp1xYOz8m0u7lPED3Rpmc aJKCte0Xen3ZYZKNfOo/Hfxp3yFo+ZUEmqSfssE3pIpo/UQ4KmZ9Q71YWRiVmjreuWix +s3CKNc2UMlkzc5ebyIjjX/11dnDg0AtJvJ5at3Y8HVBDTj2zy+u719VqqcIN8Xd9su2 rHKPhz94Aipd6U1Q1Kypd5P4H6Hl+2rDBv+lvbs9W2cGHLPZobJ4zkEKANrpbj5K+2S7 J6FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KNHQY/4RRXvJU0V3H4/K7OQJyFUdroRHt7gYQp+f6XQ=; b=7Z5irC0pvJ3rZtcNT/JNCkFh30kF5VA8svz29EQbVqySRc//hNXQ46a+LiNG9FxAk/ jjvJCwwycfpzgyB9QTNKk+pFUlVUt3l1sdFTv+P1hetf/1UtGCVN2mGgZXMbVPUfhtPr EqTWJmF78dJ0A05sBUyAvJ889V52dbW0hVFs0H2wZ0rgE4LGxr2mtstqSzyyiLF3qtMh 7cESkGyiX8SaPLrp7SDAyUNgIVVOqCfrDe59dF6F/DQphm57C7py1HSqmLnfitSqeeFu CwQz3+OOsxRF5xjcu6xRmWciw2z+EkrPq8KKxFTqhUutdJQUu3ZtMun3RYLHIz/pi3UO jkjQ== X-Gm-Message-State: AFqh2kqRtPsD9HLU0LllkmIqaKKLy3z9V3CRMTrnQxbiY2/lQXeGieqB vnWUoIHxDcoHTRLFXDnhd/0ORo1Y+gtsqt+l X-Received: by 2002:a17:90b:b0c:b0:223:9e00:85bd with SMTP id bf12-20020a17090b0b0c00b002239e0085bdmr712224pjb.40.1671599008202; Tue, 20 Dec 2022 21:03:28 -0800 (PST) Received: from stoup.. ([2602:47:d48c:8101:3efa:624c:5fb:32c0]) by smtp.gmail.com with ESMTPSA id a8-20020a17090a688800b002135e8074b1sm390645pjd.55.2022.12.20.21.03.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 21:03:27 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= Subject: [PULL v2 12/14] accel/tcg: Rename tb_invalidate_phys_page_fast{, __locked}() Date: Tue, 20 Dec 2022 21:03:11 -0800 Message-Id: <20221221050313.2950701-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221221050313.2950701-1-richard.henderson@linaro.org> References: <20221221050313.2950701-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Emphasize this function is called with pages locked. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Message-Id: <20221209093649.43738-4-philmd@linaro.org> [rth: Use "__locked" suffix, to match other instances.] Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 6 +++--- accel/tcg/cputlb.c | 2 +- accel/tcg/tb-maint.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h index 35419f3fe1..d10ab69ed0 100644 --- a/accel/tcg/internal.h +++ b/accel/tcg/internal.h @@ -37,9 +37,9 @@ void page_table_config_init(void); #ifdef CONFIG_SOFTMMU struct page_collection; -void tb_invalidate_phys_page_fast(struct page_collection *pages, - tb_page_addr_t start, int len, - uintptr_t retaddr); +void tb_invalidate_phys_page_fast__locked(struct page_collection *pages, + tb_page_addr_t start, int len, + uintptr_t retaddr); struct page_collection *page_collection_lock(tb_page_addr_t start, tb_page_addr_t end); void page_collection_unlock(struct page_collection *set); diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index ac459478f4..f7963d3af8 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1510,7 +1510,7 @@ static void notdirty_write(CPUState *cpu, vaddr mem_vaddr, unsigned size, if (!cpu_physical_memory_get_dirty_flag(ram_addr, DIRTY_MEMORY_CODE)) { struct page_collection *pages = page_collection_lock(ram_addr, ram_addr + size); - tb_invalidate_phys_page_fast(pages, ram_addr, size, retaddr); + tb_invalidate_phys_page_fast__locked(pages, ram_addr, size, retaddr); page_collection_unlock(pages); } diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 1676d359f2..8edfd910c4 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -1190,9 +1190,9 @@ void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end) * * Call with all @pages in the range [@start, @start + len[ locked. */ -void tb_invalidate_phys_page_fast(struct page_collection *pages, - tb_page_addr_t start, int len, - uintptr_t retaddr) +void tb_invalidate_phys_page_fast__locked(struct page_collection *pages, + tb_page_addr_t start, int len, + uintptr_t retaddr) { PageDesc *p;