From nobody Tue Nov 15 12:38:06 2022 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 4NBQgy2dJHz4d7gR; Tue, 15 Nov 2022 12:38:06 +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 4NBQgy26Csz4NhM; Tue, 15 Nov 2022 12:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668515886; 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=fR/mQCV/yMJA/i0r7BokBzSc4/wj2NrpvIyGko21ngg=; b=E1GZMSTaA/Nj7BwDIXVZwXo46MjHenQL558dPEXAVmac3gZVYP3jcJYhktgcF/dat/RtWd TnRNj3Z5QnRcHz+/NKxF4Xl4ymGC01VWOFnInC/mR3AsioyVh9oU33K0o99Uq0DZeDiXxN unB9fLYqRYGRXhfG9WiRv7R//N4Rl0Qt9n1wxk4V27bTDQn7gWIiSpNPOrBF8/bNFdevIi QtvBxA8koXRYfrNKhzCZvAhVq4WfMjZFzCIuZIF6SSHm05r1Si0XpVsqAALlpFEMGTHxlB FpQNpJs6lhQ5bxzJ35EQi3kzltOEqCGB5R3moKsGqMsOD3kifrSnAZXiC6u30A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668515886; 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=fR/mQCV/yMJA/i0r7BokBzSc4/wj2NrpvIyGko21ngg=; b=t6zGiiSWw7uuswGemXfFQCYuR9MnAhR0jRk6mPThet84bmmRKGpMt0bIHUdwqyfHOKqF7t r+zyEA6Fmtu2jkDvhtCQjvIuR67v71K4Q9P39eE34KtmhJBY3i7mO1KVBD9jw940BAG7BX fbZC73ZI2+WPQ1kt9rMsIm1RNVWRCqdX07uSmZew348DimX9sf+u1z69JvHSUfIVPV5Jqf mIPGDzziGvpyWTWOxBNDcNRIpY45lYWUlZncBYO+77dmAvI5N3Odq9r2pPe27vozqZRzx2 g5tzbSpUgQ1Nv1sTOy598+diOPJkShKJrfi4onnBofY8/sWLX/cvwK88XNVDkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668515886; a=rsa-sha256; cv=none; b=e64LlQmnQ/ehl/QJVaY9t+wfOrP99zazP2MFFUek2jCFBxaEZF90vY1rKyYqpC48EuSdSY n4EgUlsZQRdkxM8yW/2kz0DOVL0/keC1LQXEH7oNkdaL8g8m1lxSr13kEPyi4vARVfje/A +dcS0VZyYfrR/mY4CjkmQAfNnabIb+xFw/jIDicqgK27zS8jgmYJjIBxs/eNrGKNySavns v+uNj4I2F/VmNGBqBbdTKqe3c2Wig6VSAHrCORMZgnnhOdVirNC2Ec+90EbRcS3pJOhIgo ezs7Ygm26/CYGbddbVGGIJvizjjW3hpPm+jczf4g/OCD80GX3TA0O9ujXcPZwA== 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 4NBQgy17F1zMfL; Tue, 15 Nov 2022 12:38:06 +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 2AFCc6U3087546; Tue, 15 Nov 2022 12:38:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AFCc6Ds087545; Tue, 15 Nov 2022 12:38:06 GMT (envelope-from git) Date: Tue, 15 Nov 2022 12:38:06 GMT Message-Id: <202211151238.2AFCc6Ds087545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 0b976be033c2 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 0b976be033c2d7ad774da341e66aa69bfdb7f0ce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=0b976be033c2d7ad774da341e66aa69bfdb7f0ce commit 0b976be033c2d7ad774da341e66aa69bfdb7f0ce Author: Andrew Turner AuthorDate: 2022-11-07 11:21:42 +0000 Commit: Andrew Turner CommitDate: 2022-11-15 12:33:39 +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 --- 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 8a73fb1c5180..1fefcb491e06 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -685,8 +685,15 @@ pmap_pte_exists(pmap_t pmap, vm_offset_t va, int level, const char *diag) } 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); }