VMM: Use safe MSR accessors
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 28 Apr 2016 20:24:23 +0000 (16:24 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 2 May 2016 21:11:15 +0000 (17:11 -0400)
commit693ec68ebf0cdd4f7ee910d7cf150ceed208507c
tree6eed9d4b8a8d1a3ffbf43a55c0e8225d9edcf5ae
parent708913f0e7bdb7a5a5d80655c88a890a0a16be0b
VMM: Use safe MSR accessors

We clearly need write_msr_safe.  The guest could give us an unacceptable
value that could trigger a GPF.  For read, better safe than sorry.  It's
possible we add an MSR that we allow the guest to read, but that isn't on
every piece of hardware.  In that case, we could also trigger a GPF.

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