183
183
* @returns COM status
184
184
* @param aEnable new user mode code recompile flag.
186
STDMETHODIMP MachineDebugger::COMSETTER(RecompileUser) (BOOL aEnable)
186
STDMETHODIMP MachineDebugger::COMSETTER(RecompileUser)(BOOL aEnable)
188
188
LogFlowThisFunc(("enable=%d\n", aEnable));
190
190
AutoCaller autoCaller(this);
191
if (FAILED(autoCaller.rc())) return autoCaller.rc();
193
AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
191
HRESULT hrc = autoCaller.rc();
198
mRecompileUserQueued = aEnable;
194
AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
196
mRecompileUserQueued = aEnable; // queue the request
199
Console::SafeVMPtr ptrVM(mParent);
203
int vrc = EMR3SetExecutionPolicy(ptrVM.raw(), EMEXECPOLICY_RECOMPILE_RING3, RT_BOOL(aEnable));
205
hrc = setError(VBOX_E_VM_ERROR, tr("EMR3SetExecutionPolicy failed with %Rrc"), vrc);
202
Console::SafeVMPtr pVM (mParent);
203
if (FAILED(pVM.rc())) return pVM.rc();
205
EMRAWMODE rawModeFlag = aEnable ? EMRAW_RING3_DISABLE : EMRAW_RING3_ENABLE;
206
int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag);
207
if (RT_SUCCESS(rcVBox))
210
AssertMsgFailed (("Could not set raw mode flags to %d, rcVBox = %Rrc\n",
211
rawModeFlag, rcVBox));
243
240
* @returns COM status code
244
241
* @param aEnable new recompile supervisor code flag
246
STDMETHODIMP MachineDebugger::COMSETTER(RecompileSupervisor) (BOOL aEnable)
243
STDMETHODIMP MachineDebugger::COMSETTER(RecompileSupervisor)(BOOL aEnable)
248
245
LogFlowThisFunc(("enable=%d\n", aEnable));
250
247
AutoCaller autoCaller(this);
251
if (FAILED(autoCaller.rc())) return autoCaller.rc();
253
AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
248
HRESULT hrc = autoCaller.rc();
258
mRecompileSupervisorQueued = aEnable;
251
AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
253
mRecompileSupervisorQueued = aEnable; // queue the request
256
Console::SafeVMPtr ptrVM(mParent);
260
int vrc = EMR3SetExecutionPolicy(ptrVM.raw(), EMEXECPOLICY_RECOMPILE_RING0, RT_BOOL(aEnable));
262
hrc = setError(VBOX_E_VM_ERROR, tr("EMR3SetExecutionPolicy failed with %Rrc"), vrc);
262
Console::SafeVMPtr pVM (mParent);
263
if (FAILED(pVM.rc())) return pVM.rc();
265
EMRAWMODE rawModeFlag = aEnable ? EMRAW_RING0_DISABLE : EMRAW_RING0_ENABLE;
266
int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag);
267
if (RT_SUCCESS(rcVBox))
270
AssertMsgFailed (("Could not set raw mode flags to %d, rcVBox = %Rrc\n",
271
rawModeFlag, rcVBox));