VirtualBox

Changeset 38324 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Aug 5, 2011 2:02:53 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt,FE/BFE,MachineDebugger,EM: Added execution scheduling options to the Qt GUI and reworked the main/VMM interface.

Location:
trunk/src/VBox/Frontends
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBFE/MachineDebuggerImpl.cpp

    r35346 r38324  
    128128    }
    129129    if (!gpVM)
    130     {
    131130        return E_FAIL;
    132     }
    133 
    134     EMRAWMODE rawModeFlag = enable ? EMRAW_RING3_DISABLE : EMRAW_RING3_ENABLE;
    135     int rcVBox = VMR3ReqCallWait(gpVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2, gpVM, rawModeFlag);
    136     if (RT_SUCCESS(rcVBox))
    137         return S_OK;
    138 
    139     AssertMsgFailed(("Could not set raw mode flags to %d, rcVBox = %Rrc\n",
    140                      rawModeFlag, rcVBox));
    141     return E_FAIL;
     131
     132    int rcVBox = EMR3SetExecutionPolicy(gpVM, EMEXECPOLICY_RECOMPILE_RING3, enable);
     133    AssertRCReturn(rcVBox, E_FAIL);
     134    return S_OK;
    142135}
    143136
     
    180173    }
    181174    if (!gpVM)
    182     {
    183175        return E_FAIL;
    184     }
    185 
    186     EMRAWMODE rawModeFlag = enable ? EMRAW_RING0_DISABLE : EMRAW_RING0_ENABLE;
    187     int rcVBox = VMR3ReqCallWait(gpVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2, gpVM, rawModeFlag);
    188     if (RT_SUCCESS(rcVBox))
    189         return S_OK;
    190 
    191     AssertMsgFailed(("Could not set raw mode flags to %d, rcVBox = %Rrc\n",
    192                      rawModeFlag, rcVBox));
    193     return E_FAIL;
     176
     177    int rcVBox = EMR3SetExecutionPolicy(gpVM, EMEXECPOLICY_RECOMPILE_RING0, enable);
     178    AssertRCReturn(rcVBox, E_FAIL);
     179    return S_OK;
    194180}
    195181
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r38311 r38324  
    277277    , mMediaEnumThread (NULL)
    278278    , mIsKWinManaged (false)
     279    , mDisablePatm(false)
     280    , mDisableCsam(false)
     281    , mRecompileSupervisor(false)
     282    , mRecompileUser(false)
    279283    , mVerString ("1.0")
    280284{
     
    51245128            mShowStartVMErrors = false;
    51255129        }
     5130        else if (!::strcmp(arg, "--disable-patm"))
     5131            mDisablePatm = true;
     5132        else if (!::strcmp(arg, "--disable-csam"))
     5133            mDisableCsam = true;
     5134        else if (!::strcmp(arg, "--recompile-supervisor"))
     5135            mRecompileSupervisor = true;
     5136        else if (!::strcmp(arg, "--recompile-user"))
     5137            mRecompileUser = true;
     5138        else if (!::strcmp(arg, "--recompile-all"))
     5139            mDisablePatm = mDisableCsam = mRecompileSupervisor = mRecompileUser = true;
    51265140#ifdef VBOX_WITH_DEBUGGER_GUI
    51275141        else if (!::strcmp (arg, "-dbg") || !::strcmp (arg, "--dbg"))
    5128         {
    51295142            setDebuggerVar(&mDbgEnabled, true);
    5130         }
    51315143        else if (!::strcmp( arg, "-debug") || !::strcmp (arg, "--debug"))
    51325144        {
     
    51605172        /* Not quite debug options, but they're only useful with the debugger bits. */
    51615173        else if (!::strcmp (arg, "--start-paused"))
    5162         {
    51635174            mStartPaused = true;
    5164         }
    51655175        else if (!::strcmp (arg, "--start-running"))
    5166         {
    51675176            mStartPaused = false;
    5168         }
    51695177#endif
    51705178        /** @todo add an else { msgbox(syntax error); exit(1); } here, pretty please... */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r38222 r38324  
    178178    const QRect availableGeometry(int iScreen = 0) const;
    179179
     180    bool isPatmDisabled() const { return mDisablePatm; }
     181    bool isCsamDisabled() const { return mDisableCsam; }
     182    bool isSupervisorCodeExecedRecompiled() const { return mRecompileSupervisor; }
     183    bool isUserCodeExecedRecompiled()       const { return mRecompileUser; }
     184
    180185#ifdef VBOX_WITH_DEBUGGER_GUI
    181186    bool isDebuggerEnabled(CMachine &aMachine);
     
    821826    bool mIsKWinManaged;
    822827
     828    /** The --disable-patm option. */
     829    bool mDisablePatm;
     830    /** The --disable-csam option. */
     831    bool mDisableCsam;
     832    /** The --recompile-supervisor option. */
     833    bool mRecompileSupervisor;
     834    /** The --recompile-user option. */
     835    bool mRecompileUser;
     836
    823837#ifdef VBOX_WITH_DEBUGGER_GUI
    824838    /** Whether the debugger should be accessible or not.
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r38311 r38324  
    170170    char szInfo[64];
    171171    int rc = RTSystemQueryOSInfo (RTSYSOSINFO_RELEASE, szInfo, sizeof(szInfo));
    172     if (RT_SUCCESS (rc) &&
    173         szInfo[0] == '1') /* higher than 1x.x.x */
     172    if (   RT_SUCCESS (rc)
     173        && szInfo[0] == '1') /* higher than 1x.x.x */
    174174    {
    175175        /*
     
    272272            "  --start-running            start the VM running (for overriding --debug*)\n"
    273273            "\n"
     274# endif
     275            "Expert options:\n"
     276            "  --disable-patm             disable code patching (ignored by AMD-V/VT-x)\n"
     277            "  --disable-csam             disable code scanning (ignored by AMD-V/VT-x)\n"
     278            "  --recompile-supervisor     recompiled execution of supervisor code (*)\n"
     279            "  --recompile-user           recompiled execution of user code (*)\n"
     280            "  --recompile-all            recompiled execution of all code, with disabled\n"
     281            "                             code patching and scanning\n"
     282            "  (*) For AMD-V/VT-x setups the effect is --recompile-all.\n"
     283            "\n"
     284# ifdef VBOX_WITH_DEBUGGER_GUI
    274285            "The following environment variables are evaluated:\n"
    275286            "  VBOX_GUI_DBG_ENABLED       enable the GUI debug menu if set\n"
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r38311 r38324  
    203203    CConsole console = session().GetConsole();
    204204
     205    /* Apply debug settings from the command line. */
     206    CMachineDebugger debugger = console.GetDebugger();
     207    if (debugger.isOk())
     208    {
     209        if (vboxGlobal().isPatmDisabled())
     210            debugger.SetPATMEnabled(false);
     211        if (vboxGlobal().isCsamDisabled())
     212            debugger.SetCSAMEnabled(false);
     213        if (vboxGlobal().isSupervisorCodeExecedRecompiled())
     214            debugger.SetRecompileSupervisor(true);
     215        if (vboxGlobal().isUserCodeExecedRecompiled())
     216            debugger.SetRecompileUser(true);
     217    }
     218
    205219    /* Power UP machine: */
    206220    CProgress progress = vboxGlobal().isStartPausedEnabled() || vboxGlobal().isDebuggerAutoShowEnabled(machine) ?
     
    290304            return;
    291305        }
    292         else
    293             setPause(false);
     306
     307        setPause(false);
    294308    }
    295309
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