VirtualBox

Changeset 14563 in vbox


Ignore:
Timestamp:
Nov 25, 2008 11:04:27 AM (16 years ago)
Author:
vboxsync
Message:

Reinitialize paging modes correctly when loading the saved state.

File:
1 edited

Legend:

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

    r14530 r14563  
    791791{
    792792    Log(("HWACCMR3Relocate to %RGv\n", MMHyperGetArea(pVM, 0)));
     793
     794    /* Fetch the current paging mode during the relocate callback during state loading. */
     795    if (VMR3GetState(pVM) == VMSTATE_LOADING)
     796    {
     797        for (unsigned i=0;i<pVM->cCPUs;i++)
     798        {
     799            PVMCPU pVCpu = &pVM->aCpus[i];
     800            /* @todo SMP */
     801            pVCpu->hwaccm.s.enmShadowMode        = PGMGetShadowMode(pVM);
     802            pVCpu->hwaccm.s.vmx.enmCurrGuestMode = PGMGetGuestMode(pVM);
     803        }
     804    }
     805
    793806    return;
    794807}
     
    817830VMMR3DECL(void) HWACCMR3PagingModeChanged(PVM pVM, PGMMODE enmShadowMode, PGMMODE enmGuestMode)
    818831{
     832    /* Ignore page mode changes during state loading. */
     833    if (VMR3GetState(pVM) == VMSTATE_LOADING)
     834        return;
     835
    819836    PVMCPU pVCpu = VMMGetCpu(pVM);
    820837    pVCpu->hwaccm.s.enmShadowMode = enmShadowMode;
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