Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/vmm/vmm_instruction_emul.c
Show First 20 Lines • Show All 2,183 Lines • ▼ Show 20 Lines | if ((pte & PG_V) == 0) { | ||||
vm_inject_pf(vm, vcpuid, pfcode, gla); | vm_inject_pf(vm, vcpuid, pfcode, gla); | ||||
} | } | ||||
goto fault; | goto fault; | ||||
} | } | ||||
ptpphys = pte; | ptpphys = pte; | ||||
nlevels = 2; | nlevels = 2; | ||||
} else | } else if (paging->paging_mode == PAGING_MODE_64_LA57) { | ||||
nlevels = 5; | |||||
} else { | |||||
nlevels = 4; | nlevels = 4; | ||||
} | |||||
while (--nlevels >= 0) { | while (--nlevels >= 0) { | ||||
/* Zero out the lower 12 bits and the upper 12 bits */ | /* Zero out the lower 12 bits and the upper 12 bits */ | ||||
ptpphys >>= 12; ptpphys <<= 24; ptpphys >>= 12; | ptpphys >>= 12; ptpphys <<= 24; ptpphys >>= 12; | ||||
ptpbase = ptp_hold(vm, vcpuid, ptpphys, PAGE_SIZE, &cookie); | ptpbase = ptp_hold(vm, vcpuid, ptpphys, PAGE_SIZE, &cookie); | ||||
if (ptpbase == NULL) | if (ptpbase == NULL) | ||||
goto error; | goto error; | ||||
▲ Show 20 Lines • Show All 737 Lines • Show Last 20 Lines |