VirtualBox

Changeset 28840 in vbox


Ignore:
Timestamp:
Apr 27, 2010 3:35:48 PM (15 years ago)
Author:
vboxsync
Message:

Flip RW bit for EPT pages as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r28800 r28840  
    30503050        case PGMPOOLKIND_PAE_PT_FOR_PAE_2MB:
    30513051        case PGMPOOLKIND_PAE_PT_FOR_PHYS:
     3052        case PGMPOOLKIND_EPT_PT_FOR_PHYS:   /* physical mask the same as PAE; RW bit as well; be careful! */
    30523053        {
    30533054            const uint64_t  u64 = PGM_PAGE_GET_HCPHYS(pPhysPage) | X86_PTE_P;
     
    31153116#endif
    31163117            AssertFatalMsgFailed(("cRefs=%d iFirstPresent=%d cPresent=%d u64=%RX64 poolkind=%x\n", cRefs, pPage->iFirstPresent, pPage->cPresent, u64, pPage->enmKind));
    3117             break;
    3118         }
    3119 
    3120         case PGMPOOLKIND_EPT_PT_FOR_PHYS:
    3121         {
    3122             const uint64_t  u64 = PGM_PAGE_GET_HCPHYS(pPhysPage) | X86_PTE_P;
    3123             PEPTPT          pPT = (PEPTPT)PGMPOOL_PAGE_2_PTR(pVM, pPage);
    3124 
    3125             if ((pPT->a[iPte].u & (EPT_PTE_PG_MASK | X86_PTE_P)) == u64)
    3126             {
    3127                 Log4(("pgmPoolTrackFlushGCPhysPTs: i=%d pte=%RX64 cRefs=%#x\n", iPte, pPT->a[iPte], cRefs));
    3128                 STAM_COUNTER_INC(&pPool->StatTrackFlushEntry);
    3129                 pPT->a[iPte].u = 0;
    3130 
    3131                 /* Update the counter as we're removing references. */
    3132                 Assert(pPage->cPresent);
    3133                 Assert(pPool->cPresent);
    3134                 pPage->cPresent--;
    3135                 pPool->cPresent--;
    3136                 return bRet;
    3137             }
    3138 #ifdef LOG_ENABLED
    3139             Log(("cRefs=%d iFirstPresent=%d cPresent=%d\n", cRefs, pPage->iFirstPresent, pPage->cPresent));
    3140             for (unsigned i = 0; i < RT_ELEMENTS(pPT->a); i++)
    3141                 if ((pPT->a[i].u & (EPT_PTE_PG_MASK | X86_PTE_P)) == u64)
    3142                 {
    3143                     Log(("i=%d cRefs=%d\n", i, cRefs--));
    3144                 }
    3145 #endif
    3146             AssertFatalMsgFailed(("cRefs=%d iFirstPresent=%d cPresent=%d\n", cRefs, pPage->iFirstPresent, pPage->cPresent));
    31473118            break;
    31483119        }
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