From nobody Sat Oct 21 01:32:42 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 4SC3qG3swGz4xFYC; Sat, 21 Oct 2023 01:32:42 +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 4SC3qG3L4Sz3Xxn; Sat, 21 Oct 2023 01:32:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697851962; 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=7gb68wf2l06WR0x7Sp4CSLNqakXBALTPe3NBMwyvVqQ=; b=mbGHFGfMvdmpme+Ybo7ffmQ4T1nwe6cGQjbDEkwaSknjBdr5bre9pTnlZpk/9zQNytvVWt wH+Jmq4uyFLmi4HQqY5PtObsoJmzfcs5TSn0NCLRe72PljRzcBHQcJ+DcYAcVtvpf0mY8F eeGQZ3VzRlFjRRppf7Z1up4uZcVF9o8LpLwXhzUGzFnP1CmScklqgq85WNYfRXkazggc00 4q5A1BQPzCHGOYQ7CRW/tdok2b9SFwwXTEoTaFkgyF+dl+d6Azk929HDa9oERSMIdq/PvR 1Om8Jh6zVt8IGe2kC78q3BnST7qmEwHSRnAH3bIMVvcbmd/psaqz9ZJusWTffg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697851962; a=rsa-sha256; cv=none; b=DZ7w7RvlVZFEwytPwOqpCAsxIVvkSKSxcxpsFYGa9PSUfDsjt3tDyELQ0CLZxjq+gjaR2U 4WnCcYD0/jjmN/15iG1QgqJPC2ikOZ3PpOKGgayPLsaNatKwIAixZ4iRqHI+iXbegm5cUA oq1ZZJhM9vj8/75oFj3Iy1LYFI2Btbrx5hD2Fmfcgk+75IztyFPDMo33mtV4Whx3N6EqLG QdxTNIhlGwykbNMahwsK7OzKJjNyj2ILU6EtJjHtGm1ptxubwLuPOo2vJpK7MlActf2PJy ZO8rHFpwH8aSXnWVIZ/vMv4wHZvSAOnC1YDyFgZAiyVPYjeJWeTP1UigB0+Geg== 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=1697851962; 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=7gb68wf2l06WR0x7Sp4CSLNqakXBALTPe3NBMwyvVqQ=; b=B55lmerIIJ1nbcOV0syyw5zc3YUP/ue9edIpp9KzTZ4fao0/74EiDXM+plIiHeouhjQo58 WrrdUYhCXfQeA0s5/fbxzm3ONHuJlTzR6gF5+q4GnI+22Gxaow6J3dvq46GPYTXcUHHzrs pw8HWce8NNE8T3nQxocYNvACjj0aTRB3SZKqE8a0bwUYnNT0yAuDjs/tn6uzl+zDvTRewx XW0FVtRohHPf99KyPudvPQzy+h/QYOLd86iuH1sCCtTiebIPoCeRwkf23qPSd+tNl+/kEy g5c/pMYrTRdQfXZCyDf5+DKszLJBjaKDi/iGsAoYfsXQvz3ZzZTuKM+Nqkel9w== 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 4SC3qG2NbHzwnq; Sat, 21 Oct 2023 01:32:42 +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 39L1Wg3C088498; Sat, 21 Oct 2023 01:32:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39L1WgSu088494; Sat, 21 Oct 2023 01:32:42 GMT (envelope-from git) Date: Sat, 21 Oct 2023 01:32:42 GMT Message-Id: <202310210132.39L1WgSu088494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 9e7f349ff106 - main - amd64 pmap: Prefer consistent naming for loader tunable 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e7f349ff10691c2e3fb03898dbc942794a47566 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9e7f349ff10691c2e3fb03898dbc942794a47566 commit 9e7f349ff10691c2e3fb03898dbc942794a47566 Author: Zhenlei Huang AuthorDate: 2023-10-20 07:31:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-21 01:31:58 +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 --- 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 8c438cfb4639..cc463832babf 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