VirtualBox

Changeset 66024 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Mar 9, 2017 7:15:40 PM (8 years ago)
Author:
vboxsync
Message:

pgmR3Load: PGMR3ChangeMode now sets GCPhysCR3, so remove the duplicate and slightly incorrect (AMD64) effort here.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PGMSavedState.cpp

    r65919 r66024  
    32163216
    32173217            /*
    3218              * Change the paging mode and restore PGMCPU::GCPhysCR3.
    3219              * (The latter requires the CPUM state to be restored already.)
     3218             * Change the paging mode (indirectly restores PGMCPU::GCPhysCR3).
     3219             * (Requires the CPUM state to be restored already!)
    32203220             */
    32213221            if (CPUMR3IsStateRestorePending(pVM))
     
    32293229                rc = PGMR3ChangeMode(pVM, pVCpu, pVCpu->pgm.s.enmGuestMode);
    32303230                AssertLogRelRCReturn(rc, rc);
    3231 
    3232                 /* Update pVM->pgm.s.GCPhysCR3. */
    3233                 Assert(pVCpu->pgm.s.GCPhysCR3 == NIL_RTGCPHYS || FTMIsDeltaLoadSaveActive(pVM));
    3234                 RTGCPHYS GCPhysCR3 = CPUMGetGuestCR3(pVCpu);
    3235                 if (    pVCpu->pgm.s.enmGuestMode == PGMMODE_PAE
    3236                     ||  pVCpu->pgm.s.enmGuestMode == PGMMODE_PAE_NX
    3237                     ||  pVCpu->pgm.s.enmGuestMode == PGMMODE_AMD64
    3238                     ||  pVCpu->pgm.s.enmGuestMode == PGMMODE_AMD64_NX)
    3239                     GCPhysCR3 = (GCPhysCR3 & X86_CR3_PAE_PAGE_MASK);
    3240                 else
    3241                     GCPhysCR3 = (GCPhysCR3 & X86_CR3_PAGE_MASK);
    3242                 pVCpu->pgm.s.GCPhysCR3 = GCPhysCR3;
    32433231
    32443232                /* Update the PSE, NX flags and validity masks. */
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