opnsense-src/sys/amd64
Mark Johnston 8bebdbe494 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

(cherry picked from commit 0b29f5efcc)
2022-10-09 11:21:10 -04:00
..
acpica amd64 wakeup: rework trampoline page allocation 2021-09-20 03:47:21 +03:00
amd64 amd64: Make it possible to grow the KERNBASE region of KVA 2022-10-09 11:21:10 -04:00
cloudabi32 fork: Allow ABI to specify fork return values for child. 2022-06-17 22:33:28 +03:00
cloudabi64 fork: Allow ABI to specify fork return values for child. 2022-06-17 22:33:28 +03:00
conf Add FIB_ALGO to GENERIC on amd64/arm64. 2022-09-14 23:01:41 +02:00
ia32 x86: Add a NT_X86_SEGBASES register set. 2022-05-13 09:45:19 -07:00
include vmm: add tunable to trap WBINVD 2022-06-20 17:05:36 +02:00
linux linux(4): To reuse MD linux.h hide kernel dependencies unde _KERNEL constraint 2022-07-06 14:02:15 +03:00
linux32 linux(4): To reuse MD linux.h hide kernel dependencies unde _KERNEL constraint 2022-07-06 14:02:15 +03:00
pci pci_cfgreg.c: Use io port config access for early boot time. 2019-04-09 18:07:17 +00:00
sgx Convert remaining cap_rights_init users to cap_rights_init_one 2021-01-12 13:16:10 +00:00
vmm bhyve: Validate host PAs used to map passthrough BARs. 2022-08-25 09:38:56 -07:00
Makefile Bring the tags and links entries for amd64 up to date. 2021-10-07 16:01:46 -07:00