Changeset 7953 in vbox for trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
- Timestamp:
- Apr 14, 2008 3:42:43 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllGst.h
r7866 r7953 414 414 */ 415 415 RTGCUINTPTR GCPtr = (RTGCUINTPTR)pVM->pgm.s.GCPtrCR3Mapping + PAGE_SIZE; 416 for (unsigned i = 0; i < 4; i++, GCPtr += PAGE_SIZE)416 for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++, GCPtr += PAGE_SIZE) 417 417 { 418 418 if (pVM->pgm.s.CTXSUFF(pGstPaePDPT)->a[i].n.u1Present) … … 473 473 pVM->pgm.s.pGstPaePDPTHC = 0; 474 474 pVM->pgm.s.pGstPaePDPTGC = 0; 475 /** PAE todo: pVM->pgm.s.apGstPaePDsHC? -> unmap?? */ 475 for (unsigned i=0; i < X86_PG_PAE_PDPE_ENTRIES; i++) 476 { 477 pVM->pgm.s.apGstPaePDsHC[i] = 0; 478 pVM->pgm.s.apGstPaePDsGC[i] = 0; 479 pVM->pgm.s.aGCPhysGstPaePDs[i] = NIL_RTGCPHYS; 480 } 476 481 477 482 #elif PGM_GST_TYPE == PGM_TYPE_AMD64 … … 542 547 543 548 #if PGM_GST_TYPE == PGM_TYPE_PAE 549 /* Monitor the PDPT page */ 550 # ifndef PGMPOOL_WITH_MIXED_PT_CR3 551 AssertFailed(); 552 # else 553 rc = pgmPoolMonitorMonitorCR3(pVM->pgm.s.CTXSUFF(pPool), PGMPOOL_IDX_PDPT, GCPhysCR3); 554 # endif 544 555 /* 545 556 * Do the 4 PDs. 546 557 */ 547 for (unsigned i = 0; i < 4; i++)558 for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++) 548 559 { 549 560 if (CTXSUFF(pVM->pgm.s.pGstPaePDPT)->a[i].n.u1Present) … … 565 576 } 566 577 # else /* PGMPOOL_WITH_MIXED_PT_CR3 */ 567 /** PAE todo */ 568 AssertFailed(); 569 rc = pgmPoolMonitorMonitorCR3(pVM->pgm.s.CTXSUFF(pPool), 570 pVM->pgm.s.enmShadowMode == PGMMODE_PAE 571 || pVM->pgm.s.enmShadowMode == PGMMODE_PAE_NX 572 ? PGMPOOL_IDX_PAE_PD 573 : PGMPOOL_IDX_PD, 574 GCPhys); 578 Assert( pVM->pgm.s.enmShadowMode == PGMMODE_PAE 579 || pVM->pgm.s.enmShadowMode == PGMMODE_PAE_NX); 580 581 rc = pgmPoolMonitorMonitorCR3(pVM->pgm.s.CTXSUFF(pPool), PGMPOOL_IDX_PAE_PD, GCPhys); 575 582 # endif /* PGMPOOL_WITH_MIXED_PT_CR3 */ 576 583 if (VBOX_FAILURE(rc)) … … 635 642 636 643 # if PGM_GST_TYPE == PGM_TYPE_PAE 644 /* The PDPT page */ 645 # ifndef PGMPOOL_WITH_MIXED_PT_CR3 646 AssertFailed(); 647 # else 648 rc = pgmPoolMonitorUnmonitorCR3(pVM->pgm.s.CTXSUFF(pPool), PGMPOOL_IDX_PDPT); 649 AssertRC(rc); 650 # endif 651 637 652 /* The 4 PDs. */ 638 for (unsigned i = 0; i < 4; i++)653 for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++) 639 654 if (pVM->pgm.s.aGCPhysGstPaePDsMonitored[i] != NIL_RTGCPHYS) 640 655 { … … 642 657 int rc2 = PGMHandlerPhysicalDeregister(pVM, pVM->pgm.s.aGCPhysGstPaePDsMonitored[i]); 643 658 # else /* PGMPOOL_WITH_MIXED_PT_CR3 */ 644 /** PAE todo */ 645 AssertFailed(); 646 int rc2 = pgmPoolMonitorUnmonitorCR3(pVM->pgm.s.CTXSUFF(pPool), 647 pVM->pgm.s.enmShadowMode == PGMMODE_PAE 648 || pVM->pgm.s.enmShadowMode == PGMMODE_PAE_NX 649 ? PGMPOOL_IDX_PAE_PD 650 : PGMPOOL_IDX_PD); 659 Assert(pVM->pgm.s.enmShadowMode == PGMMODE_PAE || pVM->pgm.s.enmShadowMode == PGMMODE_PAE_NX); 660 int rc2 = pgmPoolMonitorUnmonitorCR3(pVM->pgm.s.CTXSUFF(pPool), PGMPOOL_IDX_PAE_PD); 651 661 # endif /* PGMPOOL_WITH_MIXED_PT_CR3 */ 652 662 AssertRC(rc2); … … 986 996 * We'll simply check all of them instead of figuring out which one/two to check. 987 997 */ 988 for (unsigned i = 0; i < 4; i++)998 for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++) 989 999 { 990 1000 if ( CTXSUFF(pVM->pgm.s.pGstPaePDPT)->a[i].n.u1Present … … 1052 1062 */ 1053 1063 RTGCUINTPTR i; 1054 for (i = 0; i < 4; i++)1064 for (i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++) 1055 1065 if (CTXSUFF(pVM->pgm.s.pGstPaePDPT)->a[i].u == (GCPhysFault & X86_PTE_PAE_PG_MASK)) 1056 1066 {
Note:
See TracChangeset
for help on using the changeset viewer.