From nobody Tue Oct 24 04:44:49 2023 X-Original-To: dev-commits-src-branches@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 4SDzxY2qmzz4xV7Z; Tue, 24 Oct 2023 04:44:49 +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 4SDzxY1xmQz3JrJ; Tue, 24 Oct 2023 04:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122689; 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=6PWP3h9eAnu4PUc/r1qk/cy5lCbsMSYw1rPXu3t923o=; b=QWAoz1/kvAAGMyN4xTH3PKgAc/YH6Kl5jz3cu0xD9Dj2Gh5g1MdKX9mvurMg0rdTiBeOJs VgYPSIjZkO5LgcRTToIRKERZIxTvzB9eNTm2BpMQyu5pBprsLBoNythC0w0hpEBV2bsmJf gdLRV2t7ykC6FvAqhtBMKX6AR6IOv+Nm77LgCAVL+T6DixzpavXL64C8VsOYZuo0Gk+p15 nqDC5X1+r9OioHvACM/UmDXNsyQqrJxtdQlM2m8m+upY7fhP/S3HZyultiKK8E8k3d1DRO mvsB7pjkQ/T2WUkPJNMDDP7U2CQj78nJqKdzhJsL58KJIRfmxWyeQDT+lfcHmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698122689; a=rsa-sha256; cv=none; b=u0EjUjSnN+cLajJZjCmRktXElsXIT+NNj4CCDa+ZZmvFrUfYU7O2mQX1kpyAZcaoHsJVDv 90IHYYUK4n3vjxt9LrspzzCaYg3vvG6nksfSJRWi/18fmUrLr0ybLm4RJAi7GCl8W3eBj5 BafshzJZ5MEhdLMiTArPvnXvOeq+CiYoWofkGXqqEoOvQt+40yrMcOfKFoVg9fPADliCHB M//lAxKa28i+hz7u+mjgFqgQIyMalhvZc1iQ5I9VEodmlyV5KGQMs37az9SoCOoR5CUAWm /R9j3gjw71Sco6z3/gatiXEfEv7GwbWTYuSHkeBObYxOKhbxDagvWba1WPp4qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122689; 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=6PWP3h9eAnu4PUc/r1qk/cy5lCbsMSYw1rPXu3t923o=; b=HMGzbHuGlE6Je+AI7FWtTs241WDI5SXGusXs/b1yGyA4clgJU3RtnbHs1XVlxWUA2zTGU/ IyH0mU+pUlD3RsS9JSsXwys6EG3d0vK1TkSqZPVJx/rmTKC/MbO1a45jL5TYn2FFvp3pzL b58zVrNqOXsy0BaIH14S6+mEyTYBEuWe95w0xDFMB/vFRpQeGoQfKGb5i5hUrgfYscaX0S iYbkcBj4CG/eE2ueLxNmYzsrYs2LTp13LzFFMrHU1rttLeYD2i6oUkz07bKwq4xp6JpsS5 bB9++u82N8++9lkGFMTd+Nc7ZCcGDNfXx7ZOm7KsDGt03+0K0aoYrL7ykXRxJA== 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 4SDzxY0n93z17vW; Tue, 24 Oct 2023 04:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O4inbM005022; Tue, 24 Oct 2023 04:44:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O4incw005020; Tue, 24 Oct 2023 04:44:49 GMT (envelope-from git) Date: Tue, 24 Oct 2023 04:44:49 GMT Message-Id: <202310240444.39O4incw005020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 350e79edf9a8 - stable/13 - amd64 pmap: Prefer consistent naming for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 350e79edf9a8f65c9a9d17aa86ec90b436d638f8 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=350e79edf9a8f65c9a9d17aa86ec90b436d638f8 commit 350e79edf9a8f65c9a9d17aa86ec90b436d638f8 Author: Zhenlei Huang AuthorDate: 2023-10-20 07:31:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 04:43:56 +0000 amd64 pmap: Prefer consistent naming for loader tunable The sysctl knob 'vm.pmap.allow_2m_x_ept' is loader tunable and have public document entry in security(7) but is fetched from kernel environment 'hw.allow_2m_x_ept'. That is inconsistent and obscure. As there is public security advisory FreeBSD-SA-19:25.mcepsc [1], people may refer to it and use 'hw.allow_2m_x_ept', let's keep old name for compatibility. [1] https://www.freebsd.org/security/advisories/FreeBSD-SA-19:25.mcepsc.asc Reviewed by: kib Fixes: c08973d09c95 Workaround for Intel SKL002/SKL012S errata MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42311 (cherry picked from commit 9e7f349ff10691c2e3fb03898dbc942794a47566) (cherry picked from commit 8784b153a31fc0b3a12449a2f0377eb038e6fb7b) --- sys/amd64/amd64/pmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 5e2cd4235823..4fba61269352 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2257,7 +2257,10 @@ pmap_allow_2m_x_ept_recalculate(void) CPUID_TO_MODEL(cpu_id) == 0x57 || /* Knights */ CPUID_TO_MODEL(cpu_id) == 0x85)))) pmap_allow_2m_x_ept = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.allow_2m_x_ept", &pmap_allow_2m_x_ept); +#endif + TUNABLE_INT_FETCH("vm.pmap.allow_2m_x_ept", &pmap_allow_2m_x_ept); } static bool