Changeset 8458 in vbox for trunk/src/VBox
- Timestamp:
- Apr 29, 2008 12:00:53 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30321
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMInternal.h
r8454 r8458 3401 3401 return 0ULL; 3402 3402 } 3403 3404 /** 3405 * Gets the page directory entry for the specified address. 3406 * 3407 * @returns Pointer to the page directory entry in question. 3408 * @returns NULL if the page directory is not present or on an invalid page. 3409 * @param pPGM Pointer to the PGM instance data. 3410 * @param GCPtr The address. 3411 */ 3412 DECLINLINE(PX86PDEPAE) pgmGstGetLongModePDEPtr(PPGM pPGM, RTGCUINTPTR64 GCPtr) 3413 { 3414 const unsigned iPml4e = (GCPtr >> X86_PML4_SHIFT) & X86_PML4_MASK; 3415 3416 if (pPGM->pHCPaePML4->a[iPml4e].n.u1Present) 3417 { 3418 PX86PDPT pPdptTemp; 3419 int rc = PGM_GCPHYS_2_PTR(PGM2VM(pPGM), pPGM->pHCPaePML4->a[iPml4e].u & X86_PML4E_PG_MASK, &pPdptTemp); 3420 if (VBOX_FAILURE(rc)) 3421 { 3422 AssertFailed(); 3423 return NULL; 3424 } 3425 3426 const unsigned iPdPt = (GCPtr >> X86_PDPT_SHIFT) & X86_PDPT_MASK_AMD64; 3427 if (pPdptTemp->a[iPdPt].n.u1Present) 3428 { 3429 PX86PDPAE pPD; 3430 3431 rc = PGM_GCPHYS_2_PTR(PGM2VM(pPGM), pPdptTemp->a[iPdPt].u & X86_PDPE_PG_MASK, &pPD); 3432 if (VBOX_FAILURE(rc)) 3433 { 3434 AssertFailed(); 3435 return NULL; 3436 } 3437 const unsigned iPD = (GCPtr >> X86_PD_PAE_SHIFT) & X86_PD_PAE_MASK; 3438 return &pPD->a[iPD]; 3439 } 3440 } 3441 return NULL; 3442 } 3443 3403 3444 #endif /* !IN_GC */ 3404 3445 -
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r8455 r8458 271 271 || PGM_GST_TYPE == PGM_TYPE_AMD64 272 272 273 #if PGM_GST_TYPE == PGM_TYPE_AMD64274 /* later */275 /* check level 3 & 4 bits as well (r/w, u/s, nxe) */276 AssertFailed();277 return VERR_NOT_IMPLEMENTED;278 #endif279 280 273 for (;;) 281 274 { … … 285 278 #if PGM_GST_TYPE == PGM_TYPE_32BIT 286 279 PX86PDE pPde = &CTXSUFF(pVM->pgm.s.pGuestPD)->a[GCPtr >> X86_PD_SHIFT]; 287 #el se /* PAE */280 #elif PGM_GST_TYPE == PGM_TYPE_PAE 288 281 /* pgmGstGetPaePDEPtr will return 0 if the PDPTE is marked as not present 289 282 * All the other bits in the PDPTE are only valid in long mode (r/w, u/s, nx) 290 283 */ 291 284 PX86PDEPAE pPde = pgmGstGetPaePDEPtr(&pVM->pgm.s, GCPtr); 285 Assert(pPde); 286 if (!pPde) 287 return VERR_PAGE_TABLE_NOT_PRESENT; 288 #elif PGM_GST_TYPE == PGM_TYPE_AMD64 289 /** @todo Setting the r/w, u/s & nx bits might have no effect depending on the pdpte & pml4 values */ 290 PX86PDEPAE pPde = pgmGstGetLongModePDEPtr(&pVM->pgm.s, GCPtr); 292 291 Assert(pPde); 293 292 if (!pPde) … … 375 374 Pde.u = pgmGstGetPaePDE(&pVM->pgm.s, GCPtr); 376 375 # elif PGM_GST_TYPE == PGM_TYPE_AMD64 377 X86PDEPAE 376 X86PDEPAE Pde; 378 377 Pde.u = pgmGstGetLongModePDE(&pVM->pgm.s, GCPtr); 379 378 # endif … … 731 730 Pde.u = pgmGstGetPaePDE(&pState->pVM->pgm.s, GCPtr); 732 731 #elif PGM_GST_TYPE == PGM_TYPE_AMD64 733 X86PDEPAE 732 X86PDEPAE Pde; 734 733 Pde.u = pgmGstGetLongModePDE(&pState->pVM->pgm.s, GCPtr); 735 734 #endif
Note:
See TracChangeset
for help on using the changeset viewer.