Page fault handling in vpagetable area clarification

Aggelos Economopoulos aoiko at cc.ece.ntua.gr
Thu Feb 8 08:22:21 PST 2007


Hello Matt,

in your Sep 2 mail announcing the start of vkernel development you claim that:

"when a virtual process running under a virtual kernel takes a page fault, it 
must chain through the virtual kernel and cannot short-cut directly to the 
real kernel to handle the page fault"

I'm missing something here. Reading the code, in case of a page fault, trap() 
(the one in platform/pc32/i386/trap.c) calls trap_pfault() which calls 
vm_fault() with the map contained in p->p_vmspace as an argument. vm_fault() 
notices it's dealing with a VM_MAPTYPE_VPAGETABLE map and calls into 
vm_fault_vpagetable() which walks the vpagetable in the vkernel's vmspace to 
find out what to map and vm_fault() finishes up returning KERN_SUCCESS. This 
gets propagated as 0 to trap() which then jumps to out:, allowing the vkernel 
process to continue in the alternate vmspace. I don't see the vkernel being 
involved (other than having set up the pagetable). Can you (or anyone else) 
give me a hint?

TIA,
Aggelos





More information about the Kernel mailing list