ref: 5883986336a9854a564da025eccebe7ab0076a79
parent: cabfa4e9160d0fbaec57eab5e9d264dc555e0275
author: aiju <devnull@localhost>
date: Thu Jun 22 03:31:35 EDT 2017
vmx(1): fix translateflat on 64-bit
--- a/sys/src/cmd/vmx/x86.c
+++ b/sys/src/cmd/vmx/x86.c
@@ -16,10 +16,11 @@
static uintptr
translateflat(uintptr va, uintptr *pa, uintptr)
{
+ if(sizeof(uintptr) != 4 && va >> 32 != 0) return 0;
*pa = va;
if(va == 0)
- return -1;
- return 0;
+ return 0xFFFFFFFFUL;
+ return -va;
}
static uintptr