From patchwork Thu Nov 30 20:56:00 2023 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: 748522 Delivered-To: patch@linaro.org Received: by 2002:adf:e9c2:0:b0:32d:baff:b0ca with SMTP id l2csp1117322wrn; Thu, 30 Nov 2023 12:57:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpmt+lv5DSI6m8uLHu+pi4TUs5WA7U/wxmRZFMX/YyZ0dK9B33rKyQgyfBR67FmGK9eVxR X-Received: by 2002:a05:6214:57c2:b0:67a:9171:b15 with SMTP id lw2-20020a05621457c200b0067a91710b15mr1127638qvb.28.1701377821766; Thu, 30 Nov 2023 12:57:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701377821; cv=none; d=google.com; s=arc-20160816; b=fMBGd+I/n7uOVxEYYVP/aXlvsqJOzhRTpHCU/3ZMmpDetUK8wOFPvo3FPQX57GuBlj Cf3NfohEhsm+b6PAS3/OmXFzya9OqITq5CwexO6js1zOXAWn6heVXsxH9yMk6ALyRWTl vRwGUzt5T61xsYlzjv8TD2GZK9d0egiOAIBtXMMbu+ljGuDD3dlhu2GfHJX/w7X/aJ8q UG2f11fNd1OYt5lTyaXCFAEKbZ0BEuKxP4yHyU8qKX9uiPddGKMamN0gMA7OYpDXGpJu PyFbl+gQ603DynXMnofl3H6IAiiicvuaRZlmbqwhH7sox87piKIcHvETBMtCv3R3Tbj2 py2g== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=QTr2rPu2VpCo6RhTJ/nuIiKy4X7g6aQOJ9u1LKnoSgY=; fh=byEGgDMbusD2wgHnhVzqb7JVzaCPtzpq+p8zDtk6fJE=; b=ASRwDgUIZQKJngUOFO8EkOUx2CeWynMcTmhehGBgGR9jl7W6SpmbBjdN1uu+hIzIVd bErcWOwr4/H0M7MrDXNGkpDwW5Wj6TSt1QmJqfBe+j6r0hvO4cH0KgKR0wyCXMNUvxuv Y/QE/zgAIy3K7u/Q0xBmj0XAbFKMXUUQW0OwLXXEaxQLH9HkhoX6ilyy1HXHxdJa9+sJ zj4I5uzJzT3MwidxEs5goXOTblXrT9AceHxSDqSiaY1PZ9fQ+DNs/h0XrzrdecOkVk+X YoNVejCY0L14aWEcQ5APY5mhSR6w22pL/rnAdJPL6G3XQ1qs0qB/IqAOQck73cqrd+SF fZBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T1ya5xYc; 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 w2-20020a0cc242000000b0067a1557eb78si1767852qvh.198.2023.11.30.12.57.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Nov 2023 12:57:01 -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=T1ya5xYc; 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 1r8o4w-0007q4-41; Thu, 30 Nov 2023 15:56:10 -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 1r8o4u-0007pf-7B for qemu-devel@nongnu.org; Thu, 30 Nov 2023 15:56:08 -0500 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8o4s-0002GK-3F for qemu-devel@nongnu.org; Thu, 30 Nov 2023 15:56:07 -0500 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-50bc8e37b5fso2029282e87.0 for ; Thu, 30 Nov 2023 12:56:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701377764; x=1701982564; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QTr2rPu2VpCo6RhTJ/nuIiKy4X7g6aQOJ9u1LKnoSgY=; b=T1ya5xYcki+/UFBxQXaahK4UUnNGRmXsW9zLWvp/trUtujXeKBsLhuRyLPBI/rwk37 jKaFOBhfpeGR/h5Ki0QjErdrrerwYmF8TTJ5h3ovTCO+bMD5T2aDH0D7WOsOhEQzMqwS Pon2eJWIqBE8HWx5nTjFMF7mjn5Y11aH/4BS5vK5BnRYqim1yKyPJXdUIKDqbp29d0I+ 4niS8x76hsBXmtHoL8UoLdvsar/ryB8K+yDZPv5YkZ+iTDfgNVyIitaqrX6Vo/Sk6Tnq fHYFwJe1N2DOvp0eSzqqEbnwUxiPv0GNBt7KWWkXNbGMBOk+PsxyxnkAG4vvLZmkMEQ0 OUdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701377764; x=1701982564; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QTr2rPu2VpCo6RhTJ/nuIiKy4X7g6aQOJ9u1LKnoSgY=; b=HH2DVHre3xvNKBkBUAb+gPQr63D74LweoyozpL1/Exf1srXie4czdOg83iXvl8wg1d gwV6wD4AWe0qacV11WbgUXWi7QRxVJZWiTrpN/qFRv8fmCMBtgHI1NHL0/rHHl9TubvM sb4LaRCRv91e52A128bDTpCHODpJLB4yvtyQiAnCGM8PeeuIbi2xXDO5KGhoifvgoVin lejRCBhr50NOkcz5IpYbRaZo6luVJXXFKFclMLS/anmkWFl4myqZDLSDUjSSaJoYu6Vw RnxbPoeYXYeUQiOo3j8jUNjZF5uYMK0CdHm3POnsDnXdyWqXyGJXEPuFFsN1Haj4DI8A 3gXw== X-Gm-Message-State: AOJu0YzdgWgmejeg46QHBMl6hIMPybfu9yD2Z2aHl+t1MfjGeVH0mxHs PnIlLyOc1l+lwBCip2824rIuFc83BmOG9bQAMtYWfQ== X-Received: by 2002:ac2:55a6:0:b0:50b:d764:76f1 with SMTP id y6-20020ac255a6000000b0050bd76476f1mr85291lfg.128.1701377764127; Thu, 30 Nov 2023 12:56:04 -0800 (PST) Received: from m1x-phil.lan (sev93-h02-176-184-17-116.dsl.sta.abo.bbox.fr. [176.184.17.116]) by smtp.gmail.com with ESMTPSA id x5-20020aa7d385000000b0054866f0c1b8sm908659edq.69.2023.11.30.12.56.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 30 Nov 2023 12:56:03 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Max Filippov , Richard Henderson , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH-for-9.0] accel/tcg: Remove tb_invalidate_phys_page() from system emulation Date: Thu, 30 Nov 2023 21:56:00 +0100 Message-ID: <20231130205600.35727-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=philmd@linaro.org; helo=mail-lf1-x132.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=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 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é Reviewed-by: Richard Henderson --- Based-on: <20231130203241.31099-1-philmd@linaro.org> --- 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.