Date: Tue, 24 Oct 2023 04:44:49 GMT From: Zhenlei Huang <zlei@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 350e79edf9a8 - stable/13 - amd64 pmap: Prefer consistent naming for loader tunable Message-ID: <202310240444.39O4incw005020@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=350e79edf9a8f65c9a9d17aa86ec90b436d638f8 commit 350e79edf9a8f65c9a9d17aa86ec90b436d638f8 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2023-10-20 07:31:44 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310240444.39O4incw005020>