VirtualBox

Changeset 17559 in vbox


Ignore:
Timestamp:
Mar 9, 2009 9:55:07 AM (16 years ago)
Author:
vboxsync
Message:

Update

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGMShw.h

    r17558 r17559  
    191191
    192192    Assert(HWACCMIsNestedPagingActive(pVM));
    193 
    194     /* Free the old CR3 root. */
    195     if (pVM->pgm.s.CTX_SUFF(pShwPageCR3))
    196     {
    197         PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool);
    198 
    199         /* Mark the page as unlocked; allow flushing again. */
    200         pgmPoolUnlockPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3));
    201 
    202         pgmPoolFreeByPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3), pVM->pgm.s.iShwUser, pVM->pgm.s.iShwUserTable);
    203         pVM->pgm.s.pShwPageCR3R3 = 0;
    204         pVM->pgm.s.pShwPageCR3R0 = 0;
    205         pVM->pgm.s.pShwPageCR3RC = 0;
    206         pVM->pgm.s.iShwUser      = 0;
    207         pVM->pgm.s.iShwUserTable = 0;
    208     }
     193    Assert(!pVM->pgm.s.pShwPageCR3R3);
    209194
    210195    int rc = pgmPoolAlloc(pVM, GCPhysCR3, PGMPOOLKIND_ROOT_NESTED, PGMPOOL_IDX_NESTED_ROOT, GCPhysCR3 >> PAGE_SHIFT, &pNewShwPageCR3);
     
    262247PGM_SHW_DECL(int, Exit)(PVM pVM)
    263248{
    264 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
     249#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
     250# if PGM_SHW_TYPE == PGM_TYPE_NESTED || PGM_SHW_TYPE == PGM_TYPE_EPT
     251    if (pVM->pgm.s.CTX_SUFF(pShwPageCR3))
     252    {
     253        PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool);
     254
     255        Assert(pVM->pgm.s.iShwUser == PGMPOOL_IDX_NESTED_ROOT);
     256
     257        /* Mark the page as unlocked; allow flushing again. */
     258        pgmPoolUnlockPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3));
     259
     260        pgmPoolFreeByPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3), pVM->pgm.s.iShwUser, pVM->pgm.s.iShwUserTable);
     261        pVM->pgm.s.pShwPageCR3R3 = 0;
     262        pVM->pgm.s.pShwPageCR3R0 = 0;
     263        pVM->pgm.s.pShwPageCR3RC = 0;
     264        pVM->pgm.s.iShwUser      = 0;
     265        pVM->pgm.s.iShwUserTable = 0;
     266    }
     267# endif
     268# else
    265269# if PGM_SHW_TYPE == PGM_TYPE_NESTED
    266270    Assert(HWACCMIsNestedPagingActive(pVM));
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r17558 r17559  
    42594259    int rc = PGM_BTH_PFN(UnmapCR3, pVM)(pVM);
    42604260    AssertRC(rc);
     4261
     4262    /* Exit the current shadow paging mode as well; nested paging and EPT use a root CR3 which will get flushed here. */
     4263    rc = PGM_SHW_PFN(Exit, pVM)(pVM);
     4264    AssertRC(rc);
    42614265#endif
    42624266
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