Fix parsing of a 1GB page table entry.

Use 'pdpe' to extract the PA of the 1GB page instead of 'pde' (which was
a copy and paste bug from the 2MB page case further down).

CID:		1341467
Reported by:	pfg
This commit is contained in:
John Baldwin 2016-03-28 18:41:48 +00:00
parent cd4a821c2f
commit ad3ecc2025

View File

@ -227,7 +227,7 @@ _amd64_vatop(kvm_t *kd, kvaddr_t va, off_t *pa)
/* /*
* No next-level page table; pdpe describes one 1GB page. * No next-level page table; pdpe describes one 1GB page.
*/ */
a = (pde & AMD64_PG_1GB_FRAME) + (va & AMD64_PDPMASK); a = (pdpe & AMD64_PG_1GB_FRAME) + (va & AMD64_PDPMASK);
s = _kvm_pa2off(kd, a, pa); s = _kvm_pa2off(kd, a, pa);
if (s == 0) { if (s == 0) {
_kvm_err(kd, kd->program, _kvm_err(kd, kd->program,