freebsd-nq/sys/amd64
Mark Johnston 0b29f5efcc amd64: Make it possible to grow the KERNBASE region of KVA
pmap_growkernel() may be called when mapping a region above KERNBASE,
typically for a kernel module.  If we have enough PTPs left over from
bootstrap, pmap_growkernel() does nothing.  However, it's possible to
run out, and in this case pmap_growkernel() will try to grow the kernel
map all the way from kernel_vm_end to somewhere past KERNBASE, which can
easily run the system out of memory.  This happens with large kernel
modules such as the nvidia GPU driver.  There is also a WIP dtrace
provider which needs to map KVA in the region above KERNBASE (to provide
trampolines which allow a copy of traced kernel instruction to be
executed), and its allocations could potentially trigger this scenario.

This change modifies pmap_growkernel() to manage the two regions
separately, allowing them to grow independently.  The end of the
KERNBASE region is tracked by modifying "nkpt".

PR:		265019
Reviewed by:	alc, imp, kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D36673
2022-09-24 09:27:50 -04:00
..
acpica pmap_unmapdev/bios: Accept a pointer instead of a vm_offset_t. 2022-09-22 15:08:52 -07:00
amd64 amd64: Make it possible to grow the KERNBASE region of KVA 2022-09-24 09:27:50 -04:00
conf tcp: make CUBIC the default congestion control mechanism. 2022-09-13 12:09:21 +02:00
ia32 Introduce the PROC_SIGCODE() macro 2022-07-18 16:27:26 +02:00
include pmap_unmapdev/bios: Accept a pointer instead of a vm_offset_t. 2022-09-22 15:08:52 -07:00
linux Rework how shared page related data is stored 2022-07-18 16:27:32 +02:00
linux32 Rework how shared page related data is stored 2022-07-18 16:27:32 +02:00
pci pci_cfgreg.c: Use io port config access for early boot time. 2019-04-09 18:07:17 +00:00
sgx sgx: Remove unused variable. 2022-04-07 17:01:28 -07:00
vmm Revert "vmm: permit some IPIs to be handled by userspace" 2022-09-09 15:55:01 +02:00
Makefile Bring the tags and links entries for amd64 up to date. 2021-09-27 20:04:51 -07:00