Implement nearly all the remaining items required to allow the virtual kernel
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 7 Jan 2007 08:37:37 +0000 (08:37 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 7 Jan 2007 08:37:37 +0000 (08:37 +0000)
commit135d71994d02bc01e026e9a5c89f9fcbd96e031f
tree7bf19fe5fc305fcf440719e86bcdffad69cdb43b
parentd13d0ee2799f86ccdfaa029206fcce8b01633763
Implement nearly all the remaining items required to allow the virtual kernel
to actually execute code on behalf of a virtualized user process.  The
virtual kernel is now able to execute the init binary through to the point
where it sets up a TLS segment.

* Create a pseudo tf_trapno called T_SYSCALL80 to indicate system call traps.

* Add MD shims when creating or destroying a struct vmspace, allowing the
  virtual kernel to create and destroy real-kernel vmspaces along with.

  Add appropriate calls to vmspace_mmap() and vmspace_mcontrol() to map
  memory inside the user process vmspace.  The memory is mapped VPAGETABLE
  and the page table directory is set to point to the pmap page directory.

* Clean up user_trap, handle T_PAGEFLT properly.

* Implement go_user().  It calls vmspace_ctl(... VMSPACE_CTL_RUN) and
  user_trap() in a loop, allowing the virtual kernel to 'run' a user
  mode context under its control.

* Reduce VM_MAX_USER_ADDRESS to 0xb8000000 for now, until I figure out the
  best way to have the virtual kernel query the actual max user address from
  the real kernel.

* Correct a pm_pdirpte assignment.  We can't look up the PTE until after
  we have entered it into the kernel pmap.
sys/cpu/i386/include/trap.h
sys/platform/pc32/i386/trap.c
sys/platform/pc32/i386/vm_machdep.c
sys/platform/vkernel/i386/trap.c
sys/platform/vkernel/i386/userldt.c
sys/platform/vkernel/include/md_var.h
sys/platform/vkernel/include/vmparam.h
sys/platform/vkernel/platform/pmap.c
sys/sys/systm.h
sys/vm/vm_map.c