- Timestamp:
- Jan 23, 2009 10:51:24 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r16172 r16194 918 918 bool fNestedPaging = HWACCMIsNestedPagingActive(pVM); 919 919 PPGMPOOLPAGE pShwPage; 920 X86PML4E Pml4eGst;921 920 int rc; 922 921 … … 928 927 if (!fNestedPaging) 929 928 { 930 /** @todo why are we looking up the guest PML4E here? Isn't pGstPml4e 931 * trustworthy? (Remove pgmGstGetLongModePML4E if pGstPml4e and pGstPdpe 932 * are fine.) */ 929 Assert(pGstPml4e && pGstPdpe); 933 930 Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 934 Pml4eGst = pgmGstGetLongModePML4E(&pVM->pgm.s, iPml4); 935 936 rc = pgmPoolAlloc(pVM, Pml4eGst.u & X86_PML4E_PG_MASK, 931 932 rc = pgmPoolAlloc(pVM, pGstPml4e->u & X86_PML4E_PG_MASK, 937 933 PGMPOOLKIND_64BIT_PDPT_FOR_64BIT_PDPT, pVM->pgm.s.CTX_SUFF(pShwPageCR3)->idx, iPml4, &pShwPage); 938 934 } 939 935 else 940 936 { 937 /* AMD-V nested paging. (Intel EPT never comes here) */ 941 938 RTGCPTR64 GCPml4 = (RTGCPTR64)iPml4 << EPT_PML4_SHIFT; 942 939 rc = pgmPoolAlloc(pVM, GCPml4 + RT_BIT_64(63) /* hack: make the address unique */, … … 972 969 if (!fNestedPaging) 973 970 { 974 /** @todo why are we looking up the guest PDPTE here? Isn't pGstPdpe 975 * trustworthy? */ 976 Pml4eGst = pgmGstGetLongModePML4E(&pVM->pgm.s, iPml4); 977 PX86PDPT pPdptGst; 978 rc = PGM_GCPHYS_2_PTR(pVM, Pml4eGst.u & X86_PML4E_PG_MASK, &pPdptGst); 979 AssertRCReturn(rc, rc); 980 971 Assert(pGstPml4e && pGstPdpe); 981 972 Assert(!(pPdpe->u & X86_PDPE_PG_MASK)); 982 973 /* Create a reference back to the PDPT by using the index in its shadow page. */ 983 rc = pgmPoolAlloc(pVM, p PdptGst->a[iPdPt].u & X86_PDPE_PG_MASK, PGMPOOLKIND_64BIT_PD_FOR_64BIT_PD, pShwPage->idx, iPdPt, &pShwPage);974 rc = pgmPoolAlloc(pVM, pGstPdpe->u & X86_PDPE_PG_MASK, PGMPOOLKIND_64BIT_PD_FOR_64BIT_PD, pShwPage->idx, iPdPt, &pShwPage); 984 975 } 985 976 else 986 977 { 978 /* AMD-V nested paging. (Intel EPT never comes here) */ 987 979 RTGCPTR64 GCPdPt = (RTGCPTR64)iPdPt << EPT_PDPT_SHIFT; 988 980
Note:
See TracChangeset
for help on using the changeset viewer.