]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix handling of KVA in kmem_bootstrap_free().
authorMark Johnston <markj@FreeBSD.org>
Fri, 27 Jul 2018 15:46:34 +0000 (15:46 +0000)
committerMark Johnston <markj@FreeBSD.org>
Fri, 27 Jul 2018 15:46:34 +0000 (15:46 +0000)
commit6c85795a256fac2ca714542b7241c6b28f1023da
treeea52a5967e79d25549fb8b1942b6d037eb2d4ee6
parent45ed991d964fb6b2d3978ead8c43e656e0bd7f71
Fix handling of KVA in kmem_bootstrap_free().

Do not use vm_map_remove() to release KVA back to the system.  Because
kernel map entries do not have an associated VM object, with r336030
the vm_map_remove() call will not update the kernel page tables.  Avoid
relying on the vm_map layer and instead update the pmap and release KVA
to the kernel arena directly in kmem_bootstrap_free().

Because the pmap updates will generally result in superpage demotions,
modify pmap_init() to insert PTPs shadowed by superpage mappings into
the kernel pmap's radix tree.

While here, port r329171 to i386.

Reported by: alc
Reviewed by: alc, kib
X-MFC with: r336505
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D16426
sys/amd64/amd64/pmap.c
sys/i386/i386/pmap.c
sys/vm/vm_kern.c