aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2023-10-20 07:31:44 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2023-10-21 01:31:58 +0000
commit9e7f349ff10691c2e3fb03898dbc942794a47566 (patch)
tree6dab7941a5abbd98763704ec457e8a2a1fa79f75 /sys/amd64
parent196787f79e67374527a1d528a42efa8b31acd9af (diff)
downloadsrc-9e7f349ff10691c2e3fb03898dbc942794a47566.tar.gz
src-9e7f349ff10691c2e3fb03898dbc942794a47566.zip
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
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/pmap.c3
1 files changed, 3 insertions, 0 deletions
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