From patchwork Fri Dec 9 09:36:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 632248 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp738793pvb; Fri, 9 Dec 2022 01:38:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf7YR/Si0B7THHdeRbDGsa/Et4YJyUF2jjeNhOQBj/4uYNIZJSUIoSmVzdrnGQqOfFe+GNGY X-Received: by 2002:ac8:5508:0:b0:39c:da20:688 with SMTP id j8-20020ac85508000000b0039cda200688mr8127726qtq.43.1670578714971; Fri, 09 Dec 2022 01:38:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670578714; cv=none; d=google.com; s=arc-20160816; b=pNU6+ZLWEOTiAfxR33BWPR4KIKgRWnLQVvFTyDpjROAVQWBDQL/szCAZqlxb2+XrKo uN6RgBGOO3Ydlm4GRz1OmvFs8gcPOMyuYRRj65h8RPbO8Ya2ePjEIesc9dfycZyyN0lB WzEO7HaaQtt9i86roT3J+o+5x6UTS4JO1qBftKRyJFhiJi3BflyyHV9zfwzCYd6pAt0O 7EJsgMUT/CvREHluURz8/Q/bXAanvGoI0n9O8CvRo4TievtH5fmzMBhstLRT7i9XHlZp zPFoFvrys9Xh10WQp28ftBR/jftLVbSfx49ff7Tjeus638YyM9E1AqMGj92KZodBuE0R ykBw== 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=jtD3cpuCTB6yMKA5ClAo1diuH6m3+hdvzhmmIRgg5HE=; b=gUOz4UKjdR1InQ0IsTzFtUOuYd7uDvWShUdii1PxiQuChBANKDdKRrFuzfLYnBQpo5 Bc/ttx0lj6bNcq2sxwm+QCJLLkWepU5Y46KYWRNSLW4hbGUuumtmRa7GuKNMrFCpM+MT lJM1U4bsTpPREQzaQWybp1iU1A9pVu8CcCY7nUznNdPKaDqYrwdUlf+On2430OpfmFNi Qzdn6WtnV/XvGiYdLtpHB7iZRieEL1yrdLne7teuzE1dI2B2/L4faMhkDy7YnIFdIa7Y 2w8A9ywRETy9OQ821hofHiYS7Bq3YpBIj02rW3bZrZct9jMWitz5UF0EzNAq0Oqqz2Ot tGqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lOlFCqBy; 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=pass (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 k26-20020ac8479a000000b0039d0b7ce2c0si415387qtq.258.2022.12.09.01.38.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Dec 2022 01:38:34 -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=pass header.i=@linaro.org header.s=google header.b=lOlFCqBy; 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=pass (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 1p3Zod-0004F3-JF; Fri, 09 Dec 2022 04:37:11 -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 1p3Zob-0004Es-V9 for qemu-devel@nongnu.org; Fri, 09 Dec 2022 04:37:10 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p3ZoZ-0003rP-TR for qemu-devel@nongnu.org; Fri, 09 Dec 2022 04:37:09 -0500 Received: by mail-wm1-x32c.google.com with SMTP id o7-20020a05600c510700b003cffc0b3374so2996933wms.0 for ; Fri, 09 Dec 2022 01:37:07 -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=jtD3cpuCTB6yMKA5ClAo1diuH6m3+hdvzhmmIRgg5HE=; b=lOlFCqByZ4cS00mQB2jKY/1Wr3FKi0+2dqNoHIV3dNHRrLblN8ThIj9W/mTa/RfV4Z 1UJKwJ7uCnklG+AFgzA79BtKUP4+BXSaTchBdZKo/Wyrvmqb7Vuc5KLdqVTY8lCPz8KB Phb021wJ9n8vMeG2fnCRMwbSa1PGrKcebh8rx/IICyWHjMmKUysy9Vvu0j0Oct5UR+dz EPcN/B9r96yVatkv7Qkdu1VVTJ7Gyjcdk325mN4NV9mTjQ0eTflaAPEl9yTEZxPvdA/B l2ZWBSJaS/1sjqOSXir4VkKsiU3/2NYdquDQTqfS/P87Ucb620gOSz45i4DxaPCq1QkR w5Ng== 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=jtD3cpuCTB6yMKA5ClAo1diuH6m3+hdvzhmmIRgg5HE=; b=68C4luoWbFSiXLAGiHWg8lm+SC7MxHDcs5cmPxme0JJ9hMi1AuH/UI7KUjApyQq7BC zdNKO/2sGYtoPEYtmwoR8Vsx9ao0ZHTFM8eOHh96AUceyX0FeTHOg6zO99T67s0m3eAr lv6nqS7JQO3RbA0qhVzZW0wRZM7QaOFDGVVRcBs0pWpFyzRhyzWUSHsSy92BpmtnRXpD kFLU1XcSFUiAkkwGqczHOdC2q8kFGlJBmFLkRIA89fDMgaBm4MihJCFF4jkK3sfKvDMR qEHqBRu4lfSoUuxVd6JpNlCUSNk//yO40BedMopGeDF+APidLkREBN+0tYIOxmxfGXvc ZMgw== X-Gm-Message-State: ANoB5pnW0xbqRlXCsO/ABYW1vqIl5O+/Yyk+fSzcv5shxt5oYzqEwMNU vUKMnduKM5cmd40PoWFx4GM9Wlqh4eLptKo+BqU= X-Received: by 2002:a05:600c:a54:b0:3cf:a41d:844b with SMTP id c20-20020a05600c0a5400b003cfa41d844bmr4416500wmq.5.1670578626232; Fri, 09 Dec 2022 01:37:06 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h22-20020a05600c351600b003cfd4e6400csm1291300wmq.19.2022.12.09.01.37.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 09 Dec 2022 01:37:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Paolo Bonzini , Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-8.0 3/5] accel/tcg: Rename tb_invalidate_phys_page_[locked_]fast() Date: Fri, 9 Dec 2022 10:36:47 +0100 Message-Id: <20221209093649.43738-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221209093649.43738-1-philmd@linaro.org> References: <20221209093649.43738-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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 Emphasize this function is called with pages locked. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- accel/tcg/cputlb.c | 2 +- accel/tcg/internal.h | 6 +++--- accel/tcg/tb-maint.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index ac459478f4..6402fe11c1 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_locked_fast(pages, ram_addr, size, retaddr); page_collection_unlock(pages); } diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h index 35419f3fe1..d8b58c1e70 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_locked_fast(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/tb-maint.c b/accel/tcg/tb-maint.c index 0c56e81d8c..bf84728910 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -1200,9 +1200,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_locked_fast(struct page_collection *pages, + tb_page_addr_t start, int len, + uintptr_t retaddr) { PageDesc *p;