From nobody Mon Jan 23 12:37:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P0qPZ687nz3bSxc; Mon, 23 Jan 2023 12:37:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P0qPZ5FKGz3CMv; Mon, 23 Jan 2023 12:37:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674477458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OoN6Cm9AgTCUebHPEtFOcujeI7oMOVBmXOY8piUurz8=; b=nbL/aaGuAprKuaW3DP92MM2Ntb4FggcVDxBJzW2U2vqIWLkpBJOMfNrKsT1Ug0bIy67N/j W/IF51qt+FomE8eFC0me+hIYz39EulqmsiLLuDZIW8pL0dplK+xwLZhi9H3seHMuw/1wPr Y0/O6/F2x40eY812Gm54DANJnZkvEhY3e11aFeGcEtQ0+H1XAdTKKa+Hje3CeXPYLd8bs4 5ViuGXEs2OXxttm1PzpE2t0NVJAOQ7f3eu+rteO0CSxMG8HUvERiRVY6CnGKtoyLvdpgo3 S2BPFHXGbRLycDi2zM+1Ka/3rVNVDQI+/cbqvRjr3pOmH+53Syqc/4WpmynPww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674477458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OoN6Cm9AgTCUebHPEtFOcujeI7oMOVBmXOY8piUurz8=; b=pXwKhrphMa5tUiG6wosHLd/c75bVhV7mtXprnPq5AUeyLtfTkldOVjXuA5u49EFepX5O1N Al3rbg+w/wVjtV0s0+aLNdO6aZ7uawTZ6vzuKgtPBmO1csjMDXj1K8sCX+bKJKPbhJRpdW VQIoEZK1IzU/5qKJoBLKXzMnwneQhY2Gk6znK4QgtmVN7W6iK6XByd6zluK3yntxXPta7P EthHo2j3EP1Evw2mfEJI1knq/tyhTrfB/e/MRC834qNe9Hd6Q+NyK3mlO6yICrQMZRnrVw 9JpWaOLtzqr711Kxs+s7IbFq4AghTdSUxKkujus8YotDbaNHTT6WJpOag8SREw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674477458; a=rsa-sha256; cv=none; b=nRgttcWS1STBzh4tZQBZV3L/XGy4p5Z2nFBfjmYsCrLHNFi1/365vDVfOtchiEBiY2xE33 N876gytM4Bq76D9MOMKuufeYDMnLXPU1wvHBtHad+ZCH9P8h4/7YQW4agpI36Ob1XxbPdA TyozNxbkfhaDbysqNyeMM5OaMG/C+/1iIeGMeORXx0MXr7H0x5wcTcZCod7lbX+WR/Cxrh 776pmT7vfy0rrCO8U0LGsu7S0enPNb1oxjdh5eKFKOwXgkJ70Aunq4b1ZKYu447luQtBaR xKhE0qDj457Q1XpPfnKJL1bHPHucg6Et1gHPIWfofcPiitGtBWCpnqyHrM8H8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P0qPZ4LsVzTHK; Mon, 23 Jan 2023 12:37:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30NCbceW085371; Mon, 23 Jan 2023 12:37:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30NCbc9A085370; Mon, 23 Jan 2023 12:37:38 GMT (envelope-from git) Date: Mon, 23 Jan 2023 12:37:38 GMT Message-Id: <202301231237.30NCbc9A085370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 339990879cf4 - stable/13 - Disable superpage use for stage 2 arm64 mappings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 339990879cf4837aa20d509bcbddf403107d10a0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=339990879cf4837aa20d509bcbddf403107d10a0 commit 339990879cf4837aa20d509bcbddf403107d10a0 Author: Andrew Turner AuthorDate: 2022-11-07 11:21:42 +0000 Commit: Andrew Turner CommitDate: 2023-01-23 12:36:27 +0000 Disable superpage use for stage 2 arm64 mappings When modifying a stage 2 mapping we may need to call into the hypervisor to invalidate the TLB. Until it is known if the cost of this operation is less than the performance gains superpages offers disable their use. Reviewed by: kib. markj Sponsored by: Innovate UK Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37299 (cherry picked from commit 0b976be033c2d7ad774da341e66aa69bfdb7f0ce) --- sys/arm64/arm64/pmap.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index f2a94769b40d..6f268c83e503 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -601,8 +601,15 @@ pmap_pte(pmap_t pmap, vm_offset_t va, int *level) } bool -pmap_ps_enabled(pmap_t pmap __unused) +pmap_ps_enabled(pmap_t pmap) { + /* + * Promotion requires a hypervisor call when the kernel is running + * in EL1. To stop this disable superpage support on non-stage 1 + * pmaps for now. + */ + if (pmap->pm_stage != PM_STAGE1) + return (false); return (superpages_enabled != 0); }