VirtualBox

Ignore:
Timestamp:
Apr 14, 2008 3:42:43 PM (17 years ago)
Author:
vboxsync
Message:

PAE monitoring changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r7866 r7953  
    414414             */
    415415            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)
    417417            {
    418418                if (pVM->pgm.s.CTXSUFF(pGstPaePDPT)->a[i].n.u1Present)
     
    473473    pVM->pgm.s.pGstPaePDPTHC = 0;
    474474    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    }
    476481
    477482#elif PGM_GST_TYPE == PGM_TYPE_AMD64
     
    542547
    543548#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
    544555    /*
    545556     * Do the 4 PDs.
    546557     */
    547     for (unsigned i = 0; i < 4; i++)
     558    for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++)
    548559    {
    549560        if (CTXSUFF(pVM->pgm.s.pGstPaePDPT)->a[i].n.u1Present)
     
    565576            }
    566577# 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);
    575582# endif /* PGMPOOL_WITH_MIXED_PT_CR3 */
    576583            if (VBOX_FAILURE(rc))
     
    635642
    636643# 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
    637652    /* The 4 PDs. */
    638     for (unsigned i = 0; i < 4; i++)
     653    for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++)
    639654        if (pVM->pgm.s.aGCPhysGstPaePDsMonitored[i] != NIL_RTGCPHYS)
    640655        {
     
    642657            int rc2 = PGMHandlerPhysicalDeregister(pVM, pVM->pgm.s.aGCPhysGstPaePDsMonitored[i]);
    643658# 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);
    651661# endif /* PGMPOOL_WITH_MIXED_PT_CR3 */
    652662            AssertRC(rc2);
     
    986996         * We'll simply check all of them instead of figuring out which one/two to check.
    987997         */
    988         for (unsigned i = 0; i < 4; i++)
     998        for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++)
    989999        {
    9901000            if (    CTXSUFF(pVM->pgm.s.pGstPaePDPT)->a[i].n.u1Present
     
    10521062         */
    10531063        RTGCUINTPTR i;
    1054         for (i = 0; i < 4; i++)
     1064        for (i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++)
    10551065            if (CTXSUFF(pVM->pgm.s.pGstPaePDPT)->a[i].u == (GCPhysFault & X86_PTE_PAE_PG_MASK))
    10561066            {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette