[GSOC] Implement hardware nested page table support for vkernels

Mihai Carabas mihai.carabas at gmail.com
Mon Jul 22 01:48:00 PDT 2013


Hello,

This week I've managed to enter and execute instructions in the VMX
non-root context (GUEST context). Also I've developed the logic of
entering/leaving the GUEST context. I had to handle all the pending
interrupts and the ASTs in order to let run other processes between my
vmlaunch-es (running a simple infinite loop and that system acts ok - it
remains interactive).

I also begin treating VMEXIT conditions,. Until now I handled the hardware
interrupts and exceptions. I enabled all exception types in the bitmap
exception of the VMCS (like page-faults, undefined instructions, etc). The
page-faults of the guest and the faults due to system call execution. Now
I'm able to execute system calls in guest context. A write(1, "test",4)
prints to console just ok.

The system calls exception are generated by disabling the EFER_SCE in GUEST
context, rising an UD exception (execution of ASM syscall raise UD if SCE
is disabled). Right now I consider the syscall ASM instruction the only one
that can throw UD exception. I have to create a mechanism to identify the
instruction that raised the UD by copying the instruction from the GUEST
memory and decode it using the DragonFly debugger code (I will reuse chunks
from there).

I have some problems with the stack mapping (I get some wierd page-faults
at address 0 when accessing the stack - I missed something about the stack
growing I guess). I will investigate this issue in order to go further and
run the vkernel process in the GUEST context.

The next week I will start running the vkernel and implement other VMexit
conditions (more will come like execution of instruction cpuid).

Thanks,
Mihai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20130722/b23ed3a6/attachment.html>


More information about the Kernel mailing list