CVSROOT:        /cvs
Module name:    src
Changes by:     kette...@cvs.openbsd.org        2025/01/18 09:35:31

Modified files:
        sys/arch/arm64/arm64: pmap.c 
        sys/arch/arm64/include: pmap.h 
        sys/uvm        : uvm_fault.c uvm_pmap.h 

Log message:
The pmap_enter(9) function may fail even if we have enough free physical
memory.  This happens if we can't allocate KVA to map that memory.  This
is especially likely to happen with the arm64 pmap (and the riscv64 pmap
that is derived from it) since lock contention on the kernel map will
make us fail to allocate the required KVA.  But this may happen on other
architectures as well, especially those that don't define
__HAVE_PMAP_DIRECT.

Fix this issue by introducing a new pmap_populate() interface that may be
called to populate the page tables such that a subsequent pmap_enter(9)
call that uses the same virtual address will succeed.  Use this in the
uvm fault handler after a failed pmap_enter(9) call before we retry the
fault.

tested by phessler@, mglocker@
ok mpi@

Reply via email to