From nobody Tue Oct 24 04:40:48 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 4SDzrw5B23z4xTLB; Tue, 24 Oct 2023 04:40:48 +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 4SDzrw34Qxz3HT9; Tue, 24 Oct 2023 04:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122448; 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=fTf3r8igSkILacFcEKhvbPBKP1inHeihoNW15qVkgIg=; b=yz/DYSMzgXjHovIhHOrKBcXZJTolHV24SqCA8Eu6N6tPni6eTmOVULNXTuzWmYctBitmkD EsUBfmbS6O86KCAFdARF9/hQm2KF2uc1IGK7oWNH1IwKmTeMEqRL85sRHxNy0Z6FxOem7X GCxu8/fRrapNrm9hYnlxHAeblI1a0nvKaakzVSmH+hgvabHksvx2k0m2y7R8XrfXKl+9fK uGYwG71VtlB2rlI+YU3jQ2coom+iiVCT0ZlbEDSBSP3Psqu4mAaxyjsH1eaMCfFx6eqDvK 3KQo/VyJGyoUpy14cMFIMwuB8ViLz7Ga0J89lUYExzGxhuUF4ZZ8Grtw7btK+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698122448; a=rsa-sha256; cv=none; b=qOEMekqEbtLXR/kBD5yw52aHENWIO4QOs+HcKpav+LTfs0hfHUIqAs9rCZLX1sY4ihWrjN pcU7aRS02uFVT+fcsTlEaZ47OG3BpQrPcFNYSS6Hri9/KOkwC8+G4BEvSBH5EPOQZdva+e GFkNm2slD1F500VPRccDBPNQJRVK6XthzzJGGKTVkR4YQRoFvODejqEdi2Ia4C6jhuqFcY LQv/OGDnYnu+Ow1zs8Jt9ZEJoa6fUOZxPL6uXwBmv29wqEEz3hHxDLOnVS7E8CKf1tfwl3 PaXZJJc2KKbZ0skjraiBAoq7nC1OoTeo3svmM9P/GiX/Te3YbXjcmClPo3jKBA== 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=1698122448; 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=fTf3r8igSkILacFcEKhvbPBKP1inHeihoNW15qVkgIg=; b=Accq//6nCHHPMSsjLOvFdZq6NpEALey3//Cofoy1E/p9g/bM0aViR5rWjGZQdEIpB+O+10 jsrQJt9FgzEzfJbkDHQYGrlg1/txMA1MJ8i0mcFT5Ir0qqlMO4+bXaDM+FjCyb7sybnL0Z W18Oh2bxM2k+Eryj1KCG7HbE9R8EqzzbW4EiNBZ8782rksPLQJkNXkwsbq/9DsdEZ7oBfv kBlzdDzWp5LBrBbTMPPA2OYvdgg1+NLllsYppDeboiO8sOvCz0fZ4fngUZq8aerg4A1NwQ xPnrIkRRg0Vb4FJYe58SWpYtzlz8hF48yxWmH5CfLWmcHvWLZaaBMOuXOmCxIg== 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 4SDzrw1wMsz17FL; Tue, 24 Oct 2023 04:40:48 +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 39O4emb9099452; Tue, 24 Oct 2023 04:40:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O4emut099450; Tue, 24 Oct 2023 04:40:48 GMT (envelope-from git) Date: Tue, 24 Oct 2023 04:40:48 GMT Message-Id: <202310240440.39O4emut099450@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: 8784b153a31f - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 8784b153a31fc0b3a12449a2f0377eb038e6fb7b Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8784b153a31fc0b3a12449a2f0377eb038e6fb7b commit 8784b153a31fc0b3a12449a2f0377eb038e6fb7b Author: Zhenlei Huang AuthorDate: 2023-10-20 07:31:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 04:39:32 +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) --- 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 ff83d8749313..eedbf8fd8067 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2342,7 +2342,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