From patchwork Fri Jan 19 11:34:37 2024 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: 763918 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a08:0:b0:337:62d3:c6d5 with SMTP id m8csp398914wrq; Fri, 19 Jan 2024 03:41:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IG/L2elDzu6yx8KR2bj7WGLag8Fj4TqG+NQmTQ/CXcwMMGZ07YQ6jeWyS+/OwbSFZ0gqo1d X-Received: by 2002:a05:620a:c4a:b0:783:3ca1:9d6a with SMTP id u10-20020a05620a0c4a00b007833ca19d6amr1488780qki.58.1705664500802; Fri, 19 Jan 2024 03:41:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705664500; cv=none; d=google.com; s=arc-20160816; b=PNf6uWfytHi8ZgEOekfH7ijOZtUpFktWG8uSODSrkvT561Dgr4LiPBomICrJUW1dKU MCpwYFL9A0Mi69My9HaaIYXk7zDzn5axXb7bPPK4pyHh70l5D1zJ7/Ac5mHRBp6UfDl2 lOaftbNKPuG+kY0kg+luk4dUwKYq3uWyfguzu4j8ijNmMTPAXSa+2nkxhz/kYAboRuTR 9iggBpNZ/hI3S5HIDFxd3WCzYYG7HBNV+s7XfWsSh84CR5K83n0q/g8cumfps508TtXJ np+1obMPxx6NHUrExSyM7NP+vksSrcWI6Vv752N5XL1vvqXSea0n7bWfCF1yBvHs0CgM pOnw== 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=PRuBRVEWPg8k5cL0C9qDEuFeMVHGZcEBcpFoyN0cEVQ=; fh=0x3oxSDM+3B1iq7MNcEDPiiYDxF4jnBXeQY/LXh8Yxc=; b=ORfV9U8hzTfKhuF5lhG6nOJuNBwz3Io/6wdFgLuAPFNN44uAGGB/L3o5IzP/Q4YgHV FnGo+jw1eXj+EWhRpr2pA2icc8yI2eJYvBtrDoGrjGGjQIuysEk+W7xxZkHmr15SDfyu H78ihSrxwoJ//7Y2cSjh5rm/iJKMZxKkCAm6fyXDX/2o5tibSFMJ2L2hr8E0/kVZupjW yhgxjyjL/aRDXJg0EPtI8dGYEn5K2tBtZHXk2P0LXnKf6kbihsElKn4Rr0qyh0ggkrxV 564Td5h4AlUB1uU/mKoZxklQgOKPwoEzctHmXv6tJ4/PfUojRbJYy94+h2TKY1R9vtOS rdbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EMVAxAMr; 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 h13-20020a05620a13ed00b0077fb765a788si16006434qkl.5.2024.01.19.03.41.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 19 Jan 2024 03:41:40 -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=EMVAxAMr; 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 1rQnA7-00022B-GA; Fri, 19 Jan 2024 06:35:51 -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 1rQnA5-0001zo-7t for qemu-devel@nongnu.org; Fri, 19 Jan 2024 06:35:49 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQnA2-0000J4-J5 for qemu-devel@nongnu.org; Fri, 19 Jan 2024 06:35:48 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40e800461baso7220485e9.3 for ; Fri, 19 Jan 2024 03:35:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705664145; x=1706268945; darn=nongnu.org; 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=PRuBRVEWPg8k5cL0C9qDEuFeMVHGZcEBcpFoyN0cEVQ=; b=EMVAxAMrrzUnjsnO7ApWlfOIu7VNaPwPDdRXqzgzqvcoRUYR2UMjH/dU9JDn5o3tB2 g4sPh+YrgMNowicgedvP/qPWXRDTJeB0mQurnCO2bBAUROZwOh18nksK2ZfsfD1cT6j5 pB42Hh4d1+usxIxhOaTkSnzG1mBnu9xD/LEUO+65bmGlUXtfgwgrkot5T/bzfkEctact 7z5N8TIYa8AOpxVWyWRgXhnc5G4JjeNNUna2QJUho23GrzfWr3dW5pOb0/UI9gFqa3rN op4PS+HMsB0neOKJgtyPbp0njObQjitiAJixKF4AgFpGh4eyPS+ZRE4ApmY8+yJ0ezRC RFoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705664145; x=1706268945; 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=PRuBRVEWPg8k5cL0C9qDEuFeMVHGZcEBcpFoyN0cEVQ=; b=g3E+KPHib0zbGDUMHRUYapmt6wCbglh3zfW6G+X4hjGlenIF1BJDnvxInqStxhkG30 qoK7+PqONT2yLm4uKWwjJWvGTgugX2y9ly3VkXW2FZj4gHr4RgAB6TE9QKqy26YlDrt+ kN68W0oun/6COtwgOh7OrZGFoV+EWEclErterx62oTMY1Hgtqx4qDJGgOsM4geocR0Mx IzYRmaoASgpaYI1NOOLaWKdiyKD8HNWjhmPgHUm3yoU6wUJicTQYZvPcgLEVlnMZDMHb HgsZ1OlkbPhPx5PVibbfTmVUe4vzMYTmGKagouFj2tnElIQJci2ZnPjHr8xAhwZdol0G OuGw== X-Gm-Message-State: AOJu0Yz4GvMzua+g6DRaCuF1StKe02KUu773CcuIgFwqdDpHBrnGHH+3 9wYlkTgILwUEheZD3KCAu+18zio0HyCKGW9hGO9fV0vUh6yL7A5m8QMn1bi+q1oRu+gEssRtuA+ vOtjazg== X-Received: by 2002:a7b:c4d4:0:b0:40e:7611:e52f with SMTP id g20-20020a7bc4d4000000b0040e7611e52fmr568136wmk.315.1705664144965; Fri, 19 Jan 2024 03:35:44 -0800 (PST) Received: from localhost.localdomain (91-163-26-170.subs.proxad.net. [91.163.26.170]) by smtp.gmail.com with ESMTPSA id r19-20020a05600c459300b0040e42391a12sm28532667wmo.13.2024.01.19.03.35.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 19 Jan 2024 03:35:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, qemu-s390x@nongnu.org, qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Paolo Bonzini Subject: [PULL 08/36] accel/tcg: Remove tb_invalidate_phys_page() from system emulation Date: Fri, 19 Jan 2024 12:34:37 +0100 Message-ID: <20240119113507.31951-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240119113507.31951-1-philmd@linaro.org> References: <20240119113507.31951-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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 Since previous commit, tb_invalidate_phys_page() is not used anymore in system emulation. Make it static for user emulation and remove its public declaration in "exec/translate-all.h". Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20231130205600.35727-1-philmd@linaro.org> Reviewed-by: Richard Henderson --- include/exec/translate-all.h | 1 - accel/tcg/tb-maint.c | 24 +----------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/include/exec/translate-all.h b/include/exec/translate-all.h index 88602ae8d8..85c9460c7c 100644 --- a/include/exec/translate-all.h +++ b/include/exec/translate-all.h @@ -23,7 +23,6 @@ /* translate-all.c */ -void tb_invalidate_phys_page(tb_page_addr_t addr); void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr); #ifdef CONFIG_USER_ONLY diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 3d2a896220..da39a43bd8 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -1021,7 +1021,7 @@ void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t last) * Called with mmap_lock held for user-mode emulation * NOTE: this function must not be called while a TB is running. */ -void tb_invalidate_phys_page(tb_page_addr_t addr) +static void tb_invalidate_phys_page(tb_page_addr_t addr) { tb_page_addr_t start, last; @@ -1160,28 +1160,6 @@ tb_invalidate_phys_page_range__locked(struct page_collection *pages, #endif } -/* - * Invalidate all TBs which intersect with the target physical - * address page @addr. - */ -void tb_invalidate_phys_page(tb_page_addr_t addr) -{ - struct page_collection *pages; - tb_page_addr_t start, last; - PageDesc *p; - - p = page_find(addr >> TARGET_PAGE_BITS); - if (p == NULL) { - return; - } - - start = addr & TARGET_PAGE_MASK; - last = addr | ~TARGET_PAGE_MASK; - pages = page_collection_lock(start, last); - tb_invalidate_phys_page_range__locked(pages, p, start, last, 0); - page_collection_unlock(pages); -} - /* * Invalidate all TBs which intersect with the target physical address range * [start;last]. NOTE: start and end may refer to *different* physical pages.