VirtualBox

Changeset 73263 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Jul 20, 2018 11:20:08 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123870
Message:

PGM,HM: Prepping for moving PGMR3ModeChange into ring-0... bugref:9044

File:
1 edited

Legend:

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

    r73246 r73263  
    542542}
    543543
     544
     545/**
     546 * Notification callback which is called whenever there is a chance that a CR3
     547 * value might have changed.
     548 *
     549 * This is called by PGM.
     550 *
     551 * @param   pVCpu          The cross context virtual CPU structure.
     552 * @param   enmShadowMode  New shadow paging mode.
     553 * @param   enmGuestMode   New guest paging mode.
     554 */
     555VMM_INT_DECL(void) HMPagingModeChanged(PVMCPU pVCpu, PGMMODE enmShadowMode, PGMMODE enmGuestMode)
     556{
     557#ifdef IN_RING3
     558    /* Ignore page mode changes during state loading. */
     559    if (VMR3GetState(pVCpu->pVMR3) == VMSTATE_LOADING)
     560        return;
     561#endif
     562
     563    pVCpu->hm.s.enmShadowMode = enmShadowMode;
     564
     565    /*
     566     * If the guest left protected mode VMX execution, we'll have to be
     567     * extra careful if/when the guest switches back to protected mode.
     568     */
     569    if (enmGuestMode == PGMMODE_REAL)
     570        pVCpu->hm.s.vmx.fWasInRealMode = true;
     571
     572    Log4(("HMR3PagingModeChanged: Guest paging mode '%s', shadow paging mode '%s'\n", PGMGetModeName(enmGuestMode),
     573          PGMGetModeName(enmShadowMode)));
     574}
     575
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette