<div dir="ltr">Hi all,<div class="gmail_extra"><br><br><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 class="gmail_extra">
<div class="gmail_quote"><div>Right now the vkernel boots up until "Mounting root from ufs:vkd0s0a". I will keep debugging it.</div></div></div></div></blockquote><div>This last week I've managed to boot-up the vkernel with EPT/VMX enabled (there were some bugs un how I was manually walking the guest page tables at a copyin/copyout call). I've also tested my code on different Intel machines. At the beginning the vkernel was failing due to the fact that the machine didn't support 1GB pages (these were for the vkernel DMAPs). I refactor the code to build 2MB pages if 1GB was not supported (detected through the cpuid instruction).</div>
<div><br></div><div>Another problem was that the vkernel threads were not idle-ing even though they were executing umtxsleep. This was because umtxsleep was using addresses sent from userspace, which were virtual addresses of the guest and needed to be translated to GPA (guest physical addresses).</div>
<div><br></div><div>I also needed to make synchronious invalidation of a pmap entry (be sure that no one is using the pmap while I am invalidating it). I copied the pmap_inval_interlock code from the native kernel into the vkernel, but this code created a very big contention when running the vkernel with more virtual cpus than the hardware had. Dillon adjusted the yield() code in order to not be so contended, but still they were running slow (too many syscalls in order for the virtual CPUs to synchronize). I dropped out the pmap_inval_interlock and I created a new system call (vmm_guest_sync_addr) which sets a value to a specific address, synchronizing all the active VMM cpus (I created a new vmm_cpumask which tracks down all CPUs that run a VMM thread from the current process). The vkernel now seems to not move too slowly, or get contended. Dillon will assess the code for my new system call on Monday. Also he will be dealing with a bug that he has discovered when running a buildworld on the vkernel.<br>
</div><div><br></div><div>I made some tests comparing the two vkernels (non-EPT and EPT) and seems the perfomance is about the same (make nativekernel -j2, tuxload from stress tests). It remains to look with Dillon at the vkernel perfomance to see if we can improve something or not.</div>
<div><br></div><div>I've polished the code a little and add some comments here and there, in the places where important hooks reside. All my code is in my repos now.</div><div><br></div><div>In /usr/src/test/vmm/vmm_test.c I've developed a simple test program that builds it's own pagetable and enters VMM mode and executing code in there. It's very simple and helped me get things working.</div>
<div><br></div><div>Thanks,</div><div>Mihai</div></div></div></div>