The real-kernel madvise and mcontrol system calls handle SMP interactions
when manipulating virtual page tables. Construct a new set of functions
for the virtual kernel to take advantage of this.
Add a cpu cache mask to the pmap structure for the virtual kernel which
allows us to invalidate per-cpu page table mappings simply by clearing
the mask. Also reload PT1pde after a successful cache hit if the cpu
mask bit is found to be 0.
Redo most of the PTE handling code for the virtual kernel. Use the new
invalidation function set and carefully deal with race conditions between
cpus. Race conditions are far more serious with a SMP virtual kernel then
with a real kernel because there are effectively two levels of page table
caching instead of one, since the real kernel maintains a separate pmap
for each VM space under the virtual kernel's control in addition to the
standard TLB interactions.