MAP_VPAGETABLE support part 3/3.
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 13 Sep 2006 17:10:42 +0000 (17:10 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 13 Sep 2006 17:10:42 +0000 (17:10 +0000)
commitafeabdcaf7079e0221601eb3283dce791e646784
treee202197c164351f535adab5f0f3a3daf6418778c
parent5c60a82493a502fd0028612ac136c584d713e11b
MAP_VPAGETABLE support part 3/3.

Implement a new system call called mcontrol() which is an extension of
madvise(), adding an additional 64 bit argument.  Add two new advisories,
MADV_INVAL and MADV_SETMAP.

MADV_INVAL will invalidate the pmap for the specified virtual address
range.  You need to do this for the virtual addresses effected by changes
made in a virtual page table.

MADV_SETMAP sets the top-level page table entry for the virtual page table
governing the mapped range.  It only works for memory governed by a virtual
page table and strange things will happen if you only set the root
page table entry for part of the virtual range.

Further refine the virtual page table format.  Keep with 32 bit VPTE's for
the moment, but properly implement VPTE_PS and VPTE_V.  VPTE_PS can be
used to suport 4MB linear maps in the top level page table and it can also
be used when specifying the 'root' VPTE to disable the page table entirely
and just linear map the backing store.  VPTE_V is the 'valid' bit (before
it was inverted, now it is normal).
16 files changed:
lib/libc/sys/Makefile.inc
lib/libc/sys/madvise.2
sys/kern/init_sysent.c
sys/kern/syscalls.c
sys/kern/syscalls.master
sys/sys/mman.h
sys/sys/syscall-hide.h
sys/sys/syscall.h
sys/sys/syscall.mk
sys/sys/sysproto.h
sys/sys/sysunion.h
sys/sys/vkernel.h
sys/vm/vm_fault.c
sys/vm/vm_map.c
sys/vm/vm_map.h
sys/vm/vm_mmap.c