kernel - Remove MAP_VPAGETABLE
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 7 Jan 2021 19:54:11 +0000 (11:54 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 7 Jan 2021 19:54:11 +0000 (11:54 -0800)
commit4d4f84f5f26bf5e9fe4d0761b34a5f1a3784a16f
treefe97c8eb3a8ff8a303b38635b8f98d87c5905ba3
parent383048aca08c2de51d27aa8638a36982a0d74550
kernel - Remove MAP_VPAGETABLE

* This will break vkernel support for now, but after a lot of mulling
  there's just no other way forward.  MAP_VPAGETABLE was basically a
  software page-table feature for mmap()s that allowed the vkernel
  to implement page tables without needing hardware virtualization support.

* The basic problem is that the VM system is moving to an extent-based
  mechanism for tracking VM pages entered into PMAPs and is no longer
  indexing individual terminal PTEs with pv_entry's.

  This means that the VM system is no longer able to get an exact list of
  PTEs in PMAPs that a particular vm_page is using.  It just has a
  flag 'this page is in at least one pmap' or 'this page is not in any
  pmaps'.  To track down the PTEs, the VM system must run through the
  extents via the vm_map_backing structures hanging off the related
  VM object.

  This mechanism does not work with MAP_VPAGETABLE.  Short of scanning
  the entire real pmap, the kernel has no way to reverse-index a page
  that might be indirected through MAP_VPAGETABLE.

* We will need actual hardware mmu virtualization to get the vkernel
  working again.
sys/platform/vkernel64/platform/init.c
sys/sys/mman.h
sys/vfs/procfs/procfs_map.c
sys/vm/vm.h
sys/vm/vm_fault.c
sys/vm/vm_map.c
sys/vm/vm_map.h
sys/vm/vm_mmap.c
sys/vm/vm_object.c
sys/vm/vm_vmspace.c