VirtualBox

Changeset 38326 in vbox for trunk


Ignore:
Timestamp:
Aug 5, 2011 2:35:08 PM (13 years ago)
Author:
vboxsync
Message:

EM,REM: Make the EM execution scheduling policies apply to HM as well.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/em.h

    r38325 r38326  
    129129#define EMIsRawRing0Enabled(pVM) (!(pVM)->fRecompileSupervisor)
    130130
     131/**
     132 * Checks if execution with hardware assisted virtualization is enabled.
     133 *
     134 * @returns true if enabled.
     135 * @returns false if disabled.
     136 * @param   pVM         The VM to operate on.
     137 */
     138#define EMIsHwVirtExecutionEnabled(pVM) (!(pVM)->fRecompileSupervisor && !(pVM)->fRecompileSupervisor)
     139
    131140VMMDECL(void)           EMSetInhibitInterruptsPC(PVMCPU pVCpu, RTGCUINTPTR PC);
    132141VMMDECL(RTGCUINTPTR)    EMGetInhibitInterruptsPC(PVMCPU pVCpu);
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r38325 r38326  
    608608        {
    609609            case EMEXECPOLICY_RECOMPILE_RING0:
    610                 pVM->fRecompileSupervisor = !pArgs->fEnforce;
     610                pVM->fRecompileSupervisor = pArgs->fEnforce;
    611611                break;
    612612            case EMEXECPOLICY_RECOMPILE_RING3:
     
    11521152    if (HWACCMIsEnabled(pVM))
    11531153    {
    1154         /* Hardware accelerated raw-mode:
     1154        /*
     1155         * Hardware accelerated raw-mode:
    11551156         *
    1156          * Typically only 32-bits protected mode, with paging enabled, code is allowed here.
    1157          */
    1158         if (HWACCMR3CanExecuteGuest(pVM, pCtx) == true)
     1157         * Typically only 32-bits protected mode, with paging enabled, code is
     1158         * allowed here.
     1159         */
     1160        if (   EMIsHwVirtExecutionEnabled(pVM)
     1161            && HWACCMR3CanExecuteGuest(pVM, pCtx))
    11591162            return EMSTATE_HWACC;
    11601163
    1161         /* Note: Raw mode and hw accelerated mode are incompatible. The latter turns
    1162          * off monitoring features essential for raw mode! */
     1164        /*
     1165         * Note! Raw mode and hw accelerated mode are incompatible. The latter
     1166         *       turns off monitoring features essential for raw mode!
     1167         */
    11631168        return EMSTATE_REM;
    11641169    }
  • trunk/src/recompiler/VBoxRecompiler.c

    r38320 r38326  
    14301430
    14311431        env->state |= CPU_RAW_HWACC;
     1432
     1433        /*
     1434         * The simple check first...
     1435         */
     1436        if (!EMIsHwVirtExecutionEnabled(env->pVM))
     1437            return false;
    14321438
    14331439        /*
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