<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Nothing tested yet with EPT. Hope tomorrow to do some tests to see what errors EPT would throw me :).</div>
</div></blockquote><div> I managed to run a little test program with EPT activated and my VMM module resolving EPT page-faults.</div><div><br></div><div>In the meantime I had a long chat with Dillon and made an assesment of what should I need in order to close up the GSoC project.</div>
<div>This week I've been refactoring my VMM module to fulfil the things EPT needs. First of all we need only the FIRST thread of the VKERNEL to init the EPT space (pagetable). So I created the notion of "master" thread which does the initialization of the address-space and slaves which takes from the master the EPT pagetable pointer only.</div>
<div><br></div><div>Going further with the assesment, because the VKERNEL has a different pagetable (GUEST pagetable) than the HOST (EPT pagetable) all the functions accessing the user-space from the kernel needs to be modified (won't work in this form). To maintain compatibility I created a wrapper for those functions and added pointers to specific implementation for each one (copyin, copyout, copyinstr, fuword, etc) in the struct pmap (the original ones were renamed in std_copyin, std_copyout, etc). This was done only for pc64/x86_64 (for the others remained untouched). The wrappers are not inline functions because some dependencies were broken between *.h files and the solution was to create a secondary header (systm2.h) where to add the inline functions. I had to touch too many .c files and I give up at inline wrappers for the moment.</div>
<div><br></div><div>I implemented the copyin/copyout for the EPT pagetables through manual walking of GUEST pagetable and vm_fault_page in EPT pagetable. All the other functions are calling the copyin/coyout (like the VKERNEL currently does). I've tested these implementations with a simple program that does printf (-> copyin call).</div>
<div><br></div><div>I've also modified the VPTE_* bits to be fully compatible with the standard X86 PG_* bits. In the vkernel pmap code we should take in consideration the invalidating functions that does the madvice syscall (this would have to be replace with inv* calls).</div>
<div><br></div><div>Right now I'm polishing the modified code in order to push it (no commit is done yet).</div><div><br></div><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><br>Thanks,</div><div>Mihai</div></div></div></div>