Changeset 72328 in vbox for trunk/src/VBox
- Timestamp:
- May 24, 2018 7:29:45 PM (7 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r72067 r72328 18314 18314 --> 18315 18315 18316 <enum 18317 name="VMExecutionEngine" 18318 uuid="56029577-31f7-44d2-3334-7ecbf95294b6" 18319 > 18320 <desc> 18321 The main execution engine of a VM. 18322 </desc> 18323 <const name="NotSet" value="0"> 18324 <desc>Has not yet been set (try again later).</desc> 18325 </const> 18326 <const name="RawMode" value="1"> 18327 <desc>Raw-mode.</desc> 18328 </const> 18329 <const name="HwVirt" value="2"> 18330 <desc>Hardware assisted virtualization thru HM.</desc> 18331 </const> 18332 <const name="NativeApi" value="3"> 18333 <desc>Hardware assisted virtualization thru native API (NEM).</desc> 18334 </const> 18335 </enum> 18336 18316 18337 <interface 18317 18338 name="IMachineDebugger" extends="$unknown" 18318 uuid=" 9c0f5269-47ae-ee34-c2fe-53a16e388925"18339 uuid="8b1a74a7-086a-46cc-1229-6a85ad31b7ba" 18319 18340 wsmap="managed" 18320 18341 reservedMethods="16" reservedAttributes="15" … … 18732 18753 </attribute> 18733 18754 18755 <attribute name="executionEngine" type="VMExecutionEngine" readonly="yes"> 18756 <desc>Gets the main execution engine of the VM.</desc> 18757 </attribute> 18758 18734 18759 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes"> 18735 18760 <desc> 18736 18761 Flag indicating whether the VM is currently making use of CPU hardware 18737 18762 virtualization extensions. 18763 18764 Superseeded by mainExecutionMode. 18738 18765 </desc> 18739 18766 </attribute> -
trunk/src/VBox/Main/include/MachineDebuggerImpl.h
r69500 r72328 66 66 HRESULT getLogRelGroups(com::Utf8Str &aLogRelGroups); 67 67 HRESULT getLogRelDestinations(com::Utf8Str &aLogRelDestinations); 68 HRESULT getExecutionEngine(VMExecutionEngine_T *apenmEngine); 68 69 HRESULT getHWVirtExEnabled(BOOL *aHWVirtExEnabled); 69 70 HRESULT getHWVirtExNestedPagingEnabled(BOOL *aHWVirtExNestedPagingEnabled); -
trunk/src/VBox/Main/src-client/MachineDebuggerImpl.cpp
r69500 r72328 532 532 533 533 /** 534 * Return the main execution engine of the VM. 535 * 536 * @returns COM status code 537 * @param apenmEngine Address of the result variable. 538 */ 539 HRESULT MachineDebugger::getExecutionEngine(VMExecutionEngine_T *apenmEngine) 540 { 541 *apenmEngine = VMExecutionEngine_NotSet; 542 543 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 544 Console::SafeVMPtrQuiet ptrVM(mParent); 545 if (ptrVM.isOk()) 546 { 547 uint8_t bEngine = UINT8_MAX; 548 int rc = EMR3QueryMainExecutionEngine(ptrVM.rawUVM(), &bEngine); 549 if (RT_SUCCESS(rc)) 550 switch (bEngine) 551 { 552 case VM_EXEC_ENGINE_NOT_SET: *apenmEngine = VMExecutionEngine_NotSet; break; 553 case VM_EXEC_ENGINE_RAW_MODE: *apenmEngine = VMExecutionEngine_RawMode; break; 554 case VM_EXEC_ENGINE_HW_VIRT: *apenmEngine = VMExecutionEngine_HwVirt; break; 555 case VM_EXEC_ENGINE_NATIVE_API: *apenmEngine = VMExecutionEngine_NativeApi; break; 556 default: AssertMsgFailed(("bEngine=%d\n", bEngine)); 557 } 558 } 559 560 return S_OK; 561 } 562 563 /** 534 564 * Returns the current hardware virtualization flag. 535 565 * … … 539 569 HRESULT MachineDebugger::getHWVirtExEnabled(BOOL *aHWVirtExEnabled) 540 570 { 571 *aHWVirtExEnabled = false; 572 541 573 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 542 543 574 Console::SafeVMPtrQuiet ptrVM(mParent); 544 545 575 if (ptrVM.isOk()) 546 *aHWVirtExEnabled = HMR3IsEnabled(ptrVM.rawUVM()); 547 else 548 *aHWVirtExEnabled = false; 576 { 577 uint8_t bEngine = UINT8_MAX; 578 int rc = EMR3QueryMainExecutionEngine(ptrVM.rawUVM(), &bEngine); 579 *aHWVirtExEnabled = RT_SUCCESS(rc) && bEngine == VM_EXEC_ENGINE_HW_VIRT; 580 } 549 581 550 582 return S_OK;
Note:
See TracChangeset
for help on using the changeset viewer.