VirtualBox

Changeset 18650 in vbox for trunk/src/recompiler


Ignore:
Timestamp:
Apr 2, 2009 4:26:48 PM (16 years ago)
Author:
vboxsync
Message:

remR3changeCpuMode: deal with rescheduling status codes from PGMChangeMode (i.e. handling suspend status when the swithcing to PAE without having enabled PAE support).

File:
1 edited

Legend:

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

    r17538 r18650  
    15761576void remR3ChangeCpuMode(CPUState *env)
    15771577{
    1578     int rc;
    1579     PVM pVM = env->pVM;
     1578    PVM         pVM = env->pVM;
     1579    uint64_t    efer;
     1580    PCPUMCTX    pCtx;
     1581    int         rc;
    15801582
    15811583    /*
     
    15911593     * as it may need to map whatever cr3 is pointing to.
    15921594     */
    1593     PCPUMCTX pCtx = (PCPUMCTX)pVM->rem.s.pCtx;
     1595    pCtx = (PCPUMCTX)pVM->rem.s.pCtx;
    15941596    pCtx->cr0 = env->cr[0];
    15951597    pCtx->cr3 = env->cr[3];
     
    15991601
    16001602#ifdef TARGET_X86_64
    1601     rc = PGMChangeMode(pVM, env->cr[0], env->cr[4], env->efer);
     1603    efer = env->efer;
     1604#else
     1605    efer = 0;
     1606#endif
     1607    rc = PGMChangeMode(pVM, env->cr[0], env->cr[4], efer);
    16021608    if (rc != VINF_SUCCESS)
    1603         cpu_abort(env, "PGMChangeMode(, %RX64, %RX64, %RX64) -> %Rrc\n", env->cr[0], env->cr[4], env->efer, rc);
    1604 #else
    1605     rc = PGMChangeMode(pVM, env->cr[0], env->cr[4], 0);
    1606     if (rc != VINF_SUCCESS)
    1607         cpu_abort(env, "PGMChangeMode(, %RX64, %RX64, %RX64) -> %Rrc\n", env->cr[0], env->cr[4], 0LL, rc);
    1608 #endif
     1609    {
     1610        if (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST)
     1611        {
     1612            Log(("PGMChangeMode(, %RX64, %RX64, %RX64) -> %Rrc -> remR3RaiseRC\n", env->cr[0], env->cr[4], efer, rc));
     1613            remR3RaiseRC(env->pVM, rc);
     1614        }
     1615        else
     1616            cpu_abort(env, "PGMChangeMode(, %RX64, %RX64, %RX64) -> %Rrc\n", env->cr[0], env->cr[4], efer, rc);
     1617    }
    16091618}
    16101619
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