VirtualBox

Changeset 1944 in vbox for trunk/src/recompiler


Ignore:
Timestamp:
Apr 5, 2007 9:02:19 AM (18 years ago)
Author:
vboxsync
Message:

Save/restore: remember if we've entered raw mode (vital for ring 1 checks in e.g. iret emulation).

Location:
trunk/src/recompiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/VBoxRecompiler.c

    r1337 r1944  
    440440    SSMR3PutU32(pSSM,   ~0);            /* separator */
    441441
     442    /* Remember if we've entered raw mode (vital for ring 1 checks in e.g. iret emulation). */
     443    SSMR3PutBool(pSSM, !!(pRem->Env.state & CPU_RAW_RING0));
     444
    442445    /*
    443446     * Save the REM stuff.
     
    465468{
    466469    uint32_t u32Dummy;
     470    bool     fRawRing0 = false;
     471
    467472    LogFlow(("remR3Load:\n"));
    468473
     
    506511        return VERR_SSM_DATA_UNIT_FORMAT_CHANGED;
    507512    }
     513
     514    /* Remember if we've entered raw mode (vital for ring 1 checks in e.g. iret emulation). */
     515    SSMR3GetBool(pSSM, &fRawRing0);
     516    if (fRawRing0)
     517        pRem->Env.state |= CPU_RAW_RING0;
    508518
    509519    /*
  • trunk/src/recompiler/new/VBoxRecompiler.c

    r1932 r1944  
    470470    SSMR3PutU32(pSSM,   ~0);            /* separator */
    471471
     472    /* Remember if we've entered raw mode (vital for ring 1 checks in e.g. iret emulation). */
     473    SSMR3PutBool(pSSM, !!(pRem->Env.state & CPU_RAW_RING0));
     474
    472475    /*
    473476     * Save the REM stuff.
     
    495498{
    496499    uint32_t u32Dummy;
     500    bool     fRawRing0 = false;
    497501    LogFlow(("remR3Load:\n"));
    498502
     
    534538        return VERR_SSM_DATA_UNIT_FORMAT_CHANGED;
    535539    }
     540
     541    /* Remember if we've entered raw mode (vital for ring 1 checks in e.g. iret emulation). */
     542    SSMR3GetBool(pSSM, &fRawRing0);
     543    if (fRawRing0)
     544        pRem->Env.state |= CPU_RAW_RING0;
    536545
    537546    /*
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