Hi - Here's the VM context patch set. We've now got a VMM using native VM contexts in Akaros, meaning that a VM/guest physical core is just another type of uthread.
Let me know if you spot any issues. Barret The following changes since commit 915eac00a7e0f578f9e921af2b205b6efa3739b5: Slices: A growable list of pointers. (2016-01-25 11:02:20 -0500) are available in the git repository at: [email protected]:brho/akaros.git vmctx for you to fetch changes up to 9b89ca30a0f44212e824e058ad066e9d3754df4a: VMM: Rename vmx_vcpu -> guest_pcore (XCC) (2016-02-02 12:40:09 -0500) ---------------------------------------------------------------- Barret Rhoden (32): Allow copy_*_user to be included from umem.h Provide a syscall to pop a user context (XCC) x86: Use a common lock for printing all trapframes Stub out kernel support for VM contexts (XCC) Add user support for VM contexts Move trap reflection bits into their own header Make HW trap reflection more arch-independent Change the 2LS reflected fault op to take a ctx Split up reflect_unhandled_trap() VMM: init the vmexit counters when initing the VMM VMM: perform per-guest-pcore init at setup (XCC) Restrict uva2kva() to only work for user addresses x86: Add a helper for loading cr2 VMM: refactor MSR emulation VMM: Add helpers for vmcs_read() and vmcs_write() VMM: Add helpers for loading guest pcores x86: Remove x86_get_ip_hw() VMM: Add a helper to emulate MSRs [1/4] VMM: Clear upper 32 bits on MSR reads [2/4] VMM: Decouple MSR emulation from VMX [3/4] VMM: Move MSR emulation to vmm.c [4/4] VMM: Add a gva2gpa() helper x86: Enumerate reserved eflags (XCC) VMM: Clean up per-cpu VMCS state Stop zeroing current_ctx before popping a TF VMM: Add custom exit reasons (XCC) x86: Factor out irq_dispatch() from handle_irq() VMM: Add kernel support for VM contexts [1/2] VMM: Use VM contexts [2/2] VMM: Remove unused code (XCC) VMM: Clean up VMX setup VMM: Rename vmx_vcpu -> guest_pcore (XCC) GanShun (1): Suppressed prints for CPUID exit RIPS and removed timer thread kern/arch/riscv/pmap.c | 6 + kern/arch/riscv/process.c | 3 +- kern/arch/riscv/ros/trapframe.h | 4 + kern/arch/riscv/ros/vmm.h | 3 + kern/arch/riscv/trap.c | 13 +- kern/arch/riscv/trap.h | 12 + kern/arch/x86/pmap64.c | 41 ++ kern/arch/x86/process64.c | 309 +++++++--- kern/arch/x86/ros/mmu.h | 2 + kern/arch/x86/ros/trapframe64.h | 48 ++ kern/arch/x86/ros/vmm.h | 8 + kern/arch/x86/ros/vmx.h | 30 +- kern/arch/x86/trap.c | 246 +++++++- kern/arch/x86/trap64.c | 48 +- kern/arch/x86/trap64.h | 36 +- kern/arch/x86/trapentry64.S | 40 ++ kern/arch/x86/vmm/intel/vmx.c | 1177 +++++-------------------------------- kern/arch/x86/vmm/intel/vmx.h | 39 +- kern/arch/x86/vmm/vmm.c | 314 +++++++++- kern/arch/x86/vmm/vmm.h | 35 +- kern/arch/x86/x86.h | 5 + kern/drivers/dev/cons.c | 30 +- kern/include/ros/bits/syscall.h | 1 + kern/include/ros/trapframe.h | 6 +- kern/include/ros/vmm.h | 3 - kern/include/smp.h | 4 +- kern/include/trap.h | 3 + kern/include/umem.h | 6 +- kern/src/process.c | 3 +- kern/src/syscall.c | 53 +- kern/src/trap.c | 106 ++-- kern/src/umem.c | 14 +- tests/vmm/vmrunkernel.c | 209 ++++++- user/parlib/include/riscv/trap.h | 45 ++ user/parlib/include/riscv/vcore.h | 25 - user/parlib/include/uthread.h | 3 +- user/parlib/include/x86/trap.h | 62 ++ user/parlib/include/x86/vcore64.h | 56 +- user/parlib/signal.c | 5 +- user/parlib/thread0_sched.c | 28 +- user/parlib/uthread.c | 25 +- user/parlib/x86/vcore.c | 47 +- user/pthread/pthread.c | 65 +- user/vmm/vmx.c | 51 +- user/vmm/vmx.h | 46 -- 45 files changed, 1805 insertions(+), 1510 deletions(-) create mode 100644 user/parlib/include/riscv/trap.h create mode 100644 user/parlib/include/x86/trap.h delete mode 100644 user/vmm/vmx.h -- You received this message because you are subscribed to the Google Groups "Akaros" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
