diff options
author | Alan Cox <alc@FreeBSD.org> | 2023-07-28 20:13:13 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2023-07-28 20:13:13 +0000 |
commit | 3d7c37425ee07186c65d424306c1b295c30fa592 (patch) | |
tree | 44fef2211a1624e5db3b4bf600f250daf64c9dcb /sys/amd64 | |
parent | e474a8e24391b173a93c279341c452ae12d5997b (diff) | |
download | src-3d7c37425ee07186c65d424306c1b295c30fa592.tar.gz src-3d7c37425ee07186c65d424306c1b295c30fa592.zip |
amd64 pmap: Catch up with pctrie changes
Recent changes to the pctrie code make it necessary to initialize the
kernel pmap's rangeset for PKU.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index a4b8c6dc4c06..c1968fc11844 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1995,6 +1995,10 @@ pmap_bootstrap(vm_paddr_t *firstaddr) kernel_pmap->pm_stats.resident_count = res; vm_radix_init(&kernel_pmap->pm_root); kernel_pmap->pm_flags = pmap_flags; + if ((cpu_stdext_feature2 & CPUID_STDEXT2_PKU) != 0) { + rangeset_init(&kernel_pmap->pm_pkru, pkru_dup_range, + pkru_free_range, kernel_pmap, M_NOWAIT); + } /* * The kernel pmap is always active on all CPUs. Once CPUs are |