VMM: Add helpers for vmcs_read() and vmcs_write()
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 1 Feb 2016 15:40:17 +0000 (10:40 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 2 Feb 2016 22:43:52 +0000 (17:43 -0500)
commitc4f721c7d534c9125e55f522af45f6f57167ad5c
tree971bb8fa24cb77af9a4b0f44ef3c83d16c50b5a6
parentb1730263dfdc644980f2f8daf1ada7c8d4c19cba
VMM: Add helpers for vmcs_read() and vmcs_write()

VMCS read and write always transfer 64 bits (since we're in 64 bit mode)
regardless of the size of the field.

Additionally, I added a return value to vmcs_write(), so that callers can
check if a write failed.

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