VirtualBox

Changeset 20925 in vbox for trunk


Ignore:
Timestamp:
Jun 25, 2009 11:25:09 AM (16 years ago)
Author:
vboxsync
Message:

Reset paging mode back to real mode before resetting the pgm pool. Previous code triggered assertions as the CPU state was already reset and inconsistent with the paging mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PGM.cpp

    r20874 r20925  
    21452145
    21462146    /*
     2147     * Switch mode back to real mode. (before resetting the pgm pool!)
     2148     */
     2149    for (unsigned i=0;i<pVM->cCPUs;i++)
     2150    {
     2151        PVMCPU  pVCpu = &pVM->aCpus[i];
     2152
     2153        rc = PGMR3ChangeMode(pVM, pVCpu, PGMMODE_REAL);
     2154        AssertRC(rc);
     2155
     2156        STAM_REL_COUNTER_RESET(&pVCpu->pgm.s.cGuestModeChanges);
     2157    }
     2158
     2159    /*
    21472160     * Reset the shadow page pool.
    21482161     */
     
    21752188         */
    21762189        rc = pgmR3PhysRomReset(pVM);
    2177         if (RT_SUCCESS(rc))
    2178         {
    2179             /*
    2180              * Switch mode back to real mode.
    2181              */
    2182             for (unsigned i=0;i<pVM->cCPUs;i++)
    2183             {
    2184                 PVMCPU  pVCpu = &pVM->aCpus[i];
    2185 
    2186                 rc = PGMR3ChangeMode(pVM, pVCpu, PGMMODE_REAL);
    2187                 AssertRC(rc);
    2188 
    2189                 STAM_REL_COUNTER_RESET(&pVCpu->pgm.s.cGuestModeChanges);
    2190             }
    2191         }
    21922190    }
    21932191
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