<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>In the next week I hope I will finish the vkernel work: refactoring the vkernel bootstraping with the new model in mind (master and slaves), modify the pmap code of the VKERNEL (those inval* functions) and modify the pagetable creation for the new processes. Also I will have to make an assesment of the copyin/copyout of the VKERNEL functions to see if there is something to be modified in there. There is still much work to do.</div>
</div></div></div></blockquote><div>I manage to refactor the whole bootstrap process of a VMM process. Basically now if someone wants to run as a VMM guest, will call vmm_guest_ctl(VMM_RUN) and will come back executing the code after this call in VMM mode, preserving all the attributes (registers, current stack, etc).</div>
<div><br></div><div>Also I've modified the vkernel bootstrap process in order to create a real pagetable and guard all the vmspace_* calls. The switch between vkernel and user processes is done through the vmspace_ctl(VMSPACE_CTL_RUN) call but this call is guarded accordingly and doesn't replace the vmspace at all. It only sets the new CR3 for the user process in place.</div>
<div><br></div><div>I've also added a hook in madvice syscall, in the MADV_INVAL branch to not do anything if the call is from the VMM thread. For an TLB invalidation, it's sufficient to take a VMEXIT --> the VMEXIT is done when the madvice syscall is made. We can't execute invplg from VMM thread because we are running at user privilege. In the vkernel64/pmap_inval.c, I've also added a hook so that the invalidation functions to be executed on each CPU that has the pmap active (like the real kernel does).</div>
<div><br></div><div>I've also been loosing my time with some wierd bugs (writing at an address from real kernel and when reading from the vkernel the value was 0 - due to the fact I wasn't manually walking ok the pagetables - a typo:( - pte vs pde).</div>
<div><br></div><div>Right now the vkernel boots up until "Mounting root from ufs:vkd0s0a". I will keep debugging it.</div><div><br></div><div>Thanks,</div><div>Mihai</div></div></div></div>