Module Name: src Committed By: maxv Date: Thu Jun 15 13:42:56 UTC 2017
Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: Fix a subtle but important bug in pmap_growkernel. When adding new toplevel slots to pmap_kernel, we are implicitly using the recursive slot; but this slot is in the active pmap, which may not be pmap_kernel. Therefore, adding L4 slots is fine in itself, but when adding L3 slots the kernel faults since the L4 slots that were just added are not active on the cpu. So far this has never been triggered, because the current va limit makes it impossible to add a new L4 slot, and i386 only has one level so the kernel cannot fault in a lower level. Now the tree is grown in the current pmap (cpm), copied into pmap_kernel, and propagated in the other pmaps as expected. Note that we're using CPUF_PRESENT, because this function may be called early, before cpu0 is attached. It does add to the current mess in the cpu attach code, so it will probably have to be revisited later. To generate a diff of this commit: cvs rdiff -u -r1.249 -r1.250 src/sys/arch/x86/x86/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.