VMM: Fix gpa address lookup
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 25 Apr 2016 20:28:34 +0000 (16:28 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 2 May 2016 21:11:15 +0000 (17:11 -0400)
commite9be2aad8452b3df96fb33513356d4f0e8d3bb88
tree80104d6ee674236ea72adbff847186a279c72ceb
parentd765ea3d80c7e3fa59945dea0982fc9fdf937521
VMM: Fix gpa address lookup

First, use a helper instead of assuming 0xfff is the PGOFF mask.  Second,
those checks against e.g. 0xfec would also hit if the address was
0xfff00000, since 0xfff00000 & 0xfec00000 == 0xfec00000.  Finally, the 4096
check is really about emulating the first page, PG_ADDR == 0.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/vmm/vmrunkernel.c