VMM: Add helpers for loading guest pcores
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 1 Feb 2016 16:03:03 +0000 (11:03 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 2 Feb 2016 22:43:52 +0000 (17:43 -0500)
commit13b011e7a91d7acf362c9a8b541ba037bff677b3
treed1c604c719b9999c69832f6503c8a60fcf792f49
parentc4f721c7d534c9125e55f522af45f6f57167ad5c
VMM: Add helpers for loading guest pcores

These are similar to the old vmx_{get,put}_cpu().  Those are somewhat of a
mess.

These helpers deal with concurrency (multiple cores trying to load the same
VM core at a time) and don't have any of the baggage from KVM/Dune.
Specifically, we don't need things like 'launched' or to handle cases where
the VMCS was already loaded.

I attempted, perhaps in vain, to keep most of this vendor-independent.  For
the most part, Intel or AMD will need to do the same things in
load_guest_pcore(), minus the VMCS particulars (maybe?).  Also, struct
vmx_vcpu will eventually be guest_pcore or something.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/vmm/intel/vmx.c
kern/arch/x86/vmm/intel/vmx.h
kern/arch/x86/vmm/vmm.c
kern/arch/x86/vmm/vmm.h
kern/include/smp.h
kern/src/process.c