Changeset 103085 in vbox
- Timestamp:
- Jan 26, 2024 4:17:43 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/man_VBoxManage-modifyvm.xml
r101125 r103085 275 275 <arg choice="plain">high</arg> 276 276 </group></arg> 277 <arg>--vm-execution-engine=<group choice="plain"> 278 <arg choice="plain">default</arg> 279 <arg choice="plain">hm</arg> 280 <arg choice="plain">hwvirt</arg> 281 <arg choice="plain">nem</arg> 282 <arg choice="plain">native-api</arg> 283 <arg choice="plain">interpreter</arg> 284 <arg choice="plain">recompiler</arg> 285 </group></arg> 277 286 </cmdsynopsis> 278 287 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r101418 r103085 242 242 MODIFYVM_DEFAULTFRONTEND, 243 243 MODIFYVM_VMPROC_PRIORITY, 244 MODIFYVM_VMEXEC_ENGINE, 244 245 MODIFYVM_TESTING_ENABLED, 245 246 MODIFYVM_TESTING_MMIO, … … 477 478 OPT2("--default-frontend", "--defaultfrontend", MODIFYVM_DEFAULTFRONTEND, RTGETOPT_REQ_STRING), 478 479 OPT1("--vm-process-priority", MODIFYVM_VMPROC_PRIORITY, RTGETOPT_REQ_STRING), 480 OPT1("--vm-execution-engine", MODIFYVM_VMEXEC_ENGINE, RTGETOPT_REQ_STRING), 479 481 OPT1("--testing-enabled", MODIFYVM_TESTING_ENABLED, RTGETOPT_REQ_BOOL_ONOFF), 480 482 OPT1("--testing-mmio", MODIFYVM_TESTING_MMIO, RTGETOPT_REQ_BOOL_ONOFF), … … 674 676 } 675 677 678 static VMExecutionEngine_T nameToVMExecEngine(const char *pszName) 679 { 680 if (!RTStrICmp(pszName, "default")) 681 return VMExecutionEngine_Default; 682 if ( !RTStrICmp(pszName, "hwvirt") 683 || !RTStrICmp(pszName, "hm")) 684 return VMExecutionEngine_HwVirt; 685 if ( !RTStrICmp(pszName, "nem") 686 || !RTStrICmp(pszName, "native-api")) 687 return VMExecutionEngine_NativeApi; 688 if (!RTStrICmp(pszName, "interpreter")) 689 return VMExecutionEngine_Interpreter; 690 if ( !RTStrICmp(pszName, "recompiler")) 691 return VMExecutionEngine_Recompiler; 692 693 return VMExecutionEngine_NotSet; 694 } 695 676 696 /** 677 697 * Handles the x86-specific modifyvm options. … … 3613 3633 } 3614 3634 3635 case MODIFYVM_VMEXEC_ENGINE: 3636 { 3637 VMExecutionEngine_T enmExecEngine = nameToVMExecEngine(ValueUnion.psz); 3638 if (enmExecEngine == VMExecutionEngine_NotSet) 3639 { 3640 errorArgument(ModifyVM::tr("Invalid --vm-execution-engine '%s'"), ValueUnion.psz); 3641 hrc = E_FAIL; 3642 } 3643 else 3644 { 3645 CHECK_ERROR(sessionMachine, COMSETTER(VMExecutionEngine)(enmExecEngine)); 3646 } 3647 break; 3648 } 3649 3615 3650 case MODIFYVM_TESTING_ENABLED: 3616 3651 hrc = setExtraData(sessionMachine, "VBoxInternal/Devices/VMMDev/0/Config/TestingEnabled", ValueUnion.f ? "1" : ""); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp
r102595 r103085 1510 1510 switch (enmEngine) 1511 1511 { 1512 case KVMExecutionEngine_Emulated: 1513 strExecutionEngine = "IEM"; /* no translation */ 1512 case KVMExecutionEngine_Interpreter: 1513 strExecutionEngine = "IEM (Interpreter)"; /* no translation */ 1514 break; 1515 case KVMExecutionEngine_Recompiler: 1516 strExecutionEngine = "IEM (Recompiler)"; /* no translation */ 1514 1517 break; 1515 1518 case KVMExecutionEngine_HwVirt: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r101563 r103085 743 743 * vm_execution_engine_native_api_16px.png one... @bugref{9898} */ 744 744 setStateIcon(KVMExecutionEngine_NotSet, UIIconPool::iconSet(":/vtx_amdv_disabled_16px.png")); 745 setStateIcon(KVMExecutionEngine_Emulated, UIIconPool::iconSet(":/vtx_amdv_disabled_16px.png")); 745 setStateIcon(KVMExecutionEngine_Interpreter, UIIconPool::iconSet(":/vtx_amdv_disabled_16px.png")); 746 setStateIcon(KVMExecutionEngine_Recompiler, UIIconPool::iconSet(":/vtx_amdv_disabled_16px.png")); 746 747 setStateIcon(KVMExecutionEngine_HwVirt, UIIconPool::iconSet(":/vtx_amdv_16px.png")); 747 748 setStateIcon(KVMExecutionEngine_NativeApi, UIIconPool::iconSet(":/vm_execution_engine_native_api_16px.png")); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp
r101316 r103085 366 366 { 367 367 case KVMExecutionEngine_HwVirt: 368 strExecutionEngine = "VT-x/AMD-V"; /* no translation */368 strExecutionEngine = "VT-x/AMD-V"; /* no translation */ 369 369 break; 370 case KVMExecutionEngine_Emulated: 371 strExecutionEngine = "IEM"; /* no translation */ 370 case KVMExecutionEngine_Interpreter: 371 strExecutionEngine = "IEM (Interpreter)"; /* no translation */ 372 break; 373 case KVMExecutionEngine_Recompiler: 374 strExecutionEngine = "IEM (Recompiler)"; /* no translation */ 372 375 break; 373 376 case KVMExecutionEngine_NativeApi: 374 strExecutionEngine = "native API"; /* no translation */377 strExecutionEngine = "native API"; /* no translation */ 375 378 break; 376 379 default: -
trunk/src/VBox/Main/Makefile.kmk
r103028 r103085 543 543 $(if $(VBOX_WITH_FULL_VM_ENCRYPTION),VBOX_WITH_FULL_VM_ENCRYPTION,) \ 544 544 $(if-expr defined(VBOX_WITH_SDS),VBOX_WITH_SDS,) \ 545 $(if $(VBOX_WITH_VIRT_ARMV8),VBOX_WITH_VIRT_ARMV8,) 545 $(if $(VBOX_WITH_VIRT_ARMV8),VBOX_WITH_VIRT_ARMV8,) \ 546 $(if $(VBOX_WITH_NATIVE_NEM),VBOX_WITH_NATIVE_NEM,) \ 547 $(if $(VBOX_WITH_IEM_NATIVE_RECOMPILER),VBOX_WITH_IEM_NATIVE_RECOMPILER,) 546 548 ifdef VBOX_WITH_USB 547 549 VBoxSVC_DEFS += \ -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r102673 r103085 7335 7335 </interface> 7336 7336 7337 <enum 7338 name="VMExecutionEngine" 7339 uuid="69485f52-5cd3-40c9-946f-ae7d5c50798b" 7340 > 7341 <desc> 7342 The main execution engine of a VM. 7343 </desc> 7344 <const name="NotSet" value="0"> 7345 <desc> 7346 Has not yet been set (try again later), for reading the actual used execution 7347 engine from <link to="IMachineDebugger::executionEngine"/>. 7348 This can not be set through <link to="IMachine::executionEngine"/>. 7349 </desc> 7350 </const> 7351 <const name="Default" value="1"> 7352 <desc> 7353 Use the default/best available option for the host. 7354 This will never be returned by <link to="IMachineDebugger::executionEngine"/>. 7355 </desc> 7356 </const> 7357 <const name="HwVirt" value="2"> 7358 <desc>Hardware assisted virtualization through HM. Only for x86-based hosts.</desc> 7359 </const> 7360 <const name="NativeApi" value="3"> 7361 <desc>Hardware assisted virtualization thru native API (NEM).</desc> 7362 </const> 7363 <const name="Interpreter" value="4"> 7364 <desc>CPU emulation using the interpreter.</desc> 7365 </const> 7366 <const name="Recompiler" value="5"> 7367 <desc>CPU emulation using the recompiler.</desc> 7368 </const> 7369 </enum> 7370 7337 7371 <interface 7338 7372 name="IMachine" extends="$unknown" 7339 uuid=" 8161d51b-17b4-4598-add2-eb1fe1de6230"7373 uuid="e36a5081-a82a-40bd-9e4e-42a44d6ce50f" 7340 7374 wsmap="managed" 7341 7375 rest="managed" … … 8046 8080 </attribute> 8047 8081 8082 <attribute name="VMExecutionEngine" type="VMExecutionEngine"> 8083 <desc> 8084 The configured VM execution engine. It is a VM setting which can 8085 be changed both before starting the VM and when a VM is saved. 8086 8087 The default value is 'Default', which selects the default 8088 aka best available execution engine available on the host. 8089 </desc> 8090 </attribute> 8091 8048 8092 <attribute name="paravirtDebug" type="wstring"> 8049 8093 <desc> … … 13136 13180 name="ISystemProperties" 13137 13181 extends="$unknown" 13138 uuid=" bed5b0ec-e866-401b-ac32-fd63aa67954b"13182 uuid="c61e666e-34ab-403a-8160-78bd4512ca86" 13139 13183 wsmap="managed" 13140 13184 rest="managed" … … 13620 13664 <param name="profiles" type="ICPUProfile" safearray="yes" dir="return"> 13621 13665 <desc>The matching CPU profiles.</desc> 13666 </param> 13667 </method> 13668 13669 <method name="getExecutionEnginesForVmCpuArchitecture"> 13670 <desc>Returns the possible <link to="VMExecutionEngine"/> enum values 13671 for a given VM CPU architecture.</desc> 13672 13673 <param name="cpuArchitecture" type="CPUArchitecture" dir="in"> 13674 <desc>The CPU architecture type to get the values for.</desc> 13675 </param> 13676 13677 <param name="executionEngine" type="VMExecutionEngine" safearray="yes" dir="return"> 13678 <desc>The enum values (sorted by what should be a sensible decreasing 13679 importance of the type) which are valid.</desc> 13622 13680 </param> 13623 13681 </method> … … 22591 22649 ///////////////////////////////////////////////////////////////////////// 22592 22650 --> 22593 22594 <enum22595 name="VMExecutionEngine"22596 uuid="6e3f78f9-2dfe-4ed7-863d-67cad351e9d8"22597 >22598 <desc>22599 The main execution engine of a VM.22600 </desc>22601 <const name="NotSet" value="0">22602 <desc>Has not yet been set (try again later).</desc>22603 </const>22604 <const name="Emulated" value="1">22605 <desc>Emulated thru IEM.</desc>22606 </const>22607 <const name="HwVirt" value="2">22608 <desc>Hardware assisted virtualization thru HM. Only for x86-based hosts.</desc>22609 </const>22610 <const name="NativeApi" value="3">22611 <desc>Hardware assisted virtualization thru native API (NEM).</desc>22612 </const>22613 </enum>22614 22651 22615 22652 <interface -
trunk/src/VBox/Main/include/MachineImpl.h
r101035 r103085 311 311 uint32_t mCpuIdPortabilityLevel; 312 312 Utf8Str mCpuProfile; 313 VMExecutionEngine_T mExecEngine; 313 314 314 315 BOOL mCPUAttached[SchemaDefs::MaxCPUCount]; … … 1027 1028 HRESULT getVMProcessPriority(VMProcPriority_T *aVMProcessPriority); 1028 1029 HRESULT setVMProcessPriority(VMProcPriority_T aVMProcessPriority); 1030 HRESULT getVMExecutionEngine(VMExecutionEngine_T *aVMExecutionEngine); 1031 HRESULT setVMExecutionEngine(VMExecutionEngine_T aVMExecutionEngine); 1029 1032 HRESULT getStateKeyId(com::Utf8Str &aKeyId); 1030 1033 HRESULT getStateKeyStore(com::Utf8Str &aKeyStore); -
trunk/src/VBox/Main/include/SystemPropertiesImpl.h
r101117 r103085 151 151 HRESULT getCPUProfiles(CPUArchitecture_T aArchitecture, const com::Utf8Str &aNamePattern, 152 152 std::vector<ComPtr<ICPUProfile> > &aProfiles) RT_OVERRIDE; 153 HRESULT getExecutionEnginesForVmCpuArchitecture(CPUArchitecture_T aCpuArchitecture, 154 std::vector<VMExecutionEngine_T> &aExecutionEngines) RT_OVERRIDE; 153 155 154 156 HRESULT i_getUserHomeDirectory(Utf8Str &strPath); -
trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp
r102517 r103085 169 169 hrc = pMachine->COMGETTER(CPUExecutionCap)(&ulCpuExecutionCap); H(); 170 170 171 VMExecutionEngine_T enmExecEngine = VMExecutionEngine_NotSet; 172 hrc = pMachine->COMGETTER(VMExecutionEngine)(&enmExecEngine); H(); 173 174 if ( enmExecEngine != VMExecutionEngine_Default 175 && enmExecEngine != VMExecutionEngine_NativeApi) 176 { 177 return pVMM->pfnVMR3SetError(pUVM, VERR_INVALID_PARAMETER, RT_SRC_POS, 178 N_("The ARM backend doesn't support any other execution engine than 'default' or 'native-api' right now.")); 179 } 180 171 181 LogRel(("Guest architecture: ARM\n")); 172 182 -
trunk/src/VBox/Main/src-client/ConsoleImplConfigX86.cpp
r101482 r103085 551 551 hrc = pMachine->COMGETTER(CPUExecutionCap)(&ulCpuExecutionCap); H(); 552 552 553 VMExecutionEngine_T enmExecEngine = VMExecutionEngine_NotSet; 554 hrc = pMachine->COMGETTER(VMExecutionEngine)(&enmExecEngine); H(); 555 553 556 LogRel(("Guest architecture: x86\n")); 554 557 … … 839 842 } 840 843 844 /* 845 * Set VM execution engine. 846 */ 847 /** @todo: r=aeichner Maybe provide a better VMM API for this instead of the different CFGM knobs. */ 848 LogRel(("Using execution engine %u\n", enmExecEngine)); 849 switch (enmExecEngine) 850 { 851 case VMExecutionEngine_HwVirt: 852 InsertConfigInteger(pEM, "IemExecutesAll", 0); 853 InsertConfigInteger(pEM, "IemRecompiled", 0); 854 InsertConfigInteger(pHM, "UseNEMInstead", 0); 855 InsertConfigInteger(pHM, "FallbackToNEM", 0); 856 InsertConfigInteger(pHM, "FallbackToIEM", 0); 857 break; 858 case VMExecutionEngine_NativeApi: 859 InsertConfigInteger(pEM, "IemExecutesAll", 0); 860 InsertConfigInteger(pEM, "IemRecompiled", 0); 861 InsertConfigInteger(pHM, "UseNEMInstead", 1); 862 InsertConfigInteger(pHM, "FallbackToNEM", 1); 863 InsertConfigInteger(pHM, "FallbackToIEM", 0); 864 break; 865 case VMExecutionEngine_Interpreter: 866 case VMExecutionEngine_Recompiler: 867 InsertConfigInteger(pEM, "IemExecutesAll", 1); 868 InsertConfigInteger(pEM, "IemRecompiled", enmExecEngine == VMExecutionEngine_Recompiler); 869 InsertConfigInteger(pHM, "UseNEMInstead", 0); 870 InsertConfigInteger(pHM, "FallbackToNEM", 0); 871 InsertConfigInteger(pHM, "FallbackToIEM", 1); 872 break; 873 case VMExecutionEngine_Default: 874 break; /* Nothing to do, let VMM decide. */ 875 default: 876 AssertLogRelFailed(); 877 } 878 841 879 /* HWVirtEx exclusive mode */ 842 880 BOOL fHMExclusive = true; … … 904 942 InsertConfigInteger(pRoot, "PowerOffInsteadOfReset", 1); 905 943 906 /* Use NEM rather than HM. */ 907 BOOL fUseNativeApi = false; 908 hrc = platformX86->GetHWVirtExProperty(HWVirtExPropertyType_UseNativeApi, &fUseNativeApi); H(); 909 InsertConfigInteger(pHM, "UseNEMInstead", fUseNativeApi); 944 /** @todo This is a bit redundant but in order to avoid forcing setting version bumps later on 945 * and don't magically change behavior of old VMs we have to keep this for now. As soon as the user sets 946 * the execution to anything else than Default the execution engine setting takes precedence. 947 */ 948 if (enmExecEngine == VMExecutionEngine_Default) 949 { 950 /* Use NEM rather than HM. */ 951 BOOL fUseNativeApi = false; 952 hrc = platformX86->GetHWVirtExProperty(HWVirtExPropertyType_UseNativeApi, &fUseNativeApi); H(); 953 InsertConfigInteger(pHM, "UseNEMInstead", fUseNativeApi); 954 } 910 955 911 956 /* Enable workaround for missing TLB flush for OS/2 guests, see ticketref:20625. */ -
trunk/src/VBox/Main/src-client/MachineDebuggerImpl.cpp
r102092 r103085 435 435 { 436 436 case VM_EXEC_ENGINE_NOT_SET: *apenmEngine = VMExecutionEngine_NotSet; break; 437 case VM_EXEC_ENGINE_IEM: *apenmEngine = VMExecutionEngine_Emulated; break;438 437 case VM_EXEC_ENGINE_HW_VIRT: *apenmEngine = VMExecutionEngine_HwVirt; break; 439 438 case VM_EXEC_ENGINE_NATIVE_API: *apenmEngine = VMExecutionEngine_NativeApi; break; 439 case VM_EXEC_ENGINE_IEM: 440 { 441 bool fForced = false; 442 vrc = ptrVM.vtable()->pfnEMR3QueryExecutionPolicy(ptrVM.rawUVM(), EMEXECPOLICY_IEM_RECOMPILED, &fForced); 443 if (RT_SUCCESS(vrc) && fForced) 444 *apenmEngine = VMExecutionEngine_Recompiler; 445 else 446 *apenmEngine = VMExecutionEngine_Interpreter; 447 break; 448 } 440 449 default: AssertMsgFailed(("bEngine=%d\n", bEngine)); 441 450 } -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r102455 r103085 6714 6714 if (SUCCEEDED(hrc)) 6715 6715 hrc = i_onVMProcessPriorityChange(aVMProcessPriority); 6716 return hrc; 6717 } 6718 6719 HRESULT Machine::getVMExecutionEngine(VMExecutionEngine_T *aVMExecutionEngine) 6720 { 6721 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 6722 6723 *aVMExecutionEngine = mUserData->s.enmExecEngine; 6724 6725 return S_OK; 6726 } 6727 6728 HRESULT Machine::setVMExecutionEngine(VMExecutionEngine_T aVMExecutionEngine) 6729 { 6730 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 6731 HRESULT hrc = i_checkStateDependency(MutableOrSavedStateDep); 6732 if (SUCCEEDED(hrc)) 6733 { 6734 hrc = mUserData.backupEx(); 6735 if (SUCCEEDED(hrc)) 6736 { 6737 i_setModified(IsModified_MachineData); 6738 mUserData->s.enmExecEngine = aVMExecutionEngine; 6739 } 6740 } 6716 6741 return hrc; 6717 6742 } -
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r102280 r103085 1370 1370 } 1371 1371 1372 HRESULT SystemProperties::getExecutionEnginesForVmCpuArchitecture(CPUArchitecture_T aCpuArchitecture, 1373 std::vector<VMExecutionEngine_T> &aExecutionEngines) 1374 { 1375 switch (aCpuArchitecture) 1376 { 1377 case CPUArchitecture_x86: 1378 case CPUArchitecture_AMD64: 1379 { 1380 static const VMExecutionEngine_T aExecEngines[] = 1381 { 1382 VMExecutionEngine_Default, 1383 #ifdef RT_ARCH_AMD64 1384 VMExecutionEngine_HwVirt, 1385 # ifdef VBOX_WITH_NATIVE_NEM 1386 VMExecutionEngine_NativeApi, 1387 # endif 1388 #endif 1389 VMExecutionEngine_Interpreter, 1390 #ifdef VBOX_WITH_IEM_NATIVE_RECOMPILER 1391 VMExecutionEngine_Recompiler, 1392 #endif 1393 }; 1394 aExecutionEngines.assign(aExecEngines, 1395 aExecEngines + RT_ELEMENTS(aExecEngines)); 1396 break; 1397 } 1398 1399 case CPUArchitecture_ARMv8_32: 1400 aExecutionEngines.clear(); /* Currently not supported at all. */ 1401 break; 1402 1403 case CPUArchitecture_ARMv8_64: 1404 { 1405 #ifdef VBOX_WITH_VIRT_ARMV8 1406 static const VMExecutionEngine_T aExecEngines[] = 1407 { 1408 VMExecutionEngine_Default, 1409 # ifdef VBOX_WITH_NATIVE_NEM 1410 VMExecutionEngine_NativeApi, 1411 # endif 1412 }; 1413 aExecutionEngines.assign(aExecEngines, 1414 aExecEngines + RT_ELEMENTS(aExecEngines)); 1415 #else 1416 aExecutionEngines.clear(); 1417 #endif 1418 break; 1419 } 1420 1421 default: 1422 AssertFailedStmt(aExecutionEngines.clear()); 1423 break; 1424 } 1425 1426 return S_OK; 1427 } 1428 1372 1429 1373 1430 // public methods only for internal purposes -
trunk/src/VBox/Main/xml/Settings.cpp
r102455 r103085 4409 4409 fTeleporterEnabled(false), 4410 4410 uTeleporterPort(0), 4411 enmVMPriority(VMProcPriority_Default) 4411 enmVMPriority(VMProcPriority_Default), 4412 enmExecEngine(VMExecutionEngine_Default) 4412 4413 { 4413 4414 llGroups.push_back("/"); … … 4434 4435 && strTeleporterPassword == c.strTeleporterPassword 4435 4436 && ovIcon == c.ovIcon 4436 && enmVMPriority == c.enmVMPriority); 4437 && enmVMPriority == c.enmVMPriority 4438 && enmExecEngine == c.enmExecEngine); 4437 4439 } 4438 4440 … … 7019 7021 } 7020 7022 7023 { 7024 Utf8Str strExecEngine; 7025 if (elmMachine.getAttributeValue("executionEngine", strExecEngine)) 7026 { 7027 if (strExecEngine == "HwVirt") 7028 machineUserData.enmExecEngine = VMExecutionEngine_HwVirt; 7029 else if (strExecEngine == "NativeApi") 7030 machineUserData.enmExecEngine = VMExecutionEngine_NativeApi; 7031 else if (strExecEngine == "Interpreter") 7032 machineUserData.enmExecEngine = VMExecutionEngine_Interpreter; 7033 else if (strExecEngine == "Recompiler") 7034 machineUserData.enmExecEngine = VMExecutionEngine_Recompiler; 7035 else 7036 machineUserData.enmExecEngine = VMExecutionEngine_Default; 7037 } 7038 } 7039 7021 7040 str.setNull(); 7022 7041 elmMachine.getAttributeValue("icon", str); … … 9206 9225 break; 9207 9226 } 9227 9228 switch (machineUserData.enmExecEngine) 9229 { 9230 case VMExecutionEngine_HwVirt: 9231 elmMachine.setAttribute("executionEngine", "HwVirt"); 9232 break; 9233 case VMExecutionEngine_NativeApi: 9234 elmMachine.setAttribute("executionEngine", "NativeApi"); 9235 break; 9236 case VMExecutionEngine_Interpreter: 9237 elmMachine.setAttribute("executionEngine", "Interpreter"); 9238 break; 9239 case VMExecutionEngine_Recompiler: 9240 elmMachine.setAttribute("executionEngine", "Recompiler"); 9241 break; 9242 case VMExecutionEngine_Default: 9243 default: 9244 break; 9245 } 9246 9208 9247 // Please keep the icon last so that one doesn't have to check if there 9209 9248 // is anything in the line after this very long attribute in the XML. … … 9485 9524 if ( ( hardwareMachine.platformSettings.architectureType != PlatformArchitecture_None 9486 9525 && hardwareMachine.platformSettings.architectureType != PlatformArchitecture_x86) 9487 || hardwareMachine.graphicsAdapter.graphicsControllerType == GraphicsControllerType_QemuRamFB) 9526 || hardwareMachine.graphicsAdapter.graphicsControllerType == GraphicsControllerType_QemuRamFB 9527 || machineUserData.enmExecEngine != VMExecutionEngine_Default) 9488 9528 { 9489 9529 /* Note: The new chipset type ARMv8Virtual implies setting the platform architecture type to ARM. */ -
trunk/src/VBox/Main/xml/VirtualBox-settings.xsd
r101200 r103085 156 156 <xsd:enumeration value="Normal"/> 157 157 <xsd:enumeration value="High"/> 158 </xsd:restriction> 159 </xsd:simpleType> 160 161 <xsd:simpleType name="TVMExecEngine"> 162 <xsd:restriction base="xsd:string"> 163 <xsd:enumeration value="Default"/> 164 <xsd:enumeration value="HwVirt"/> 165 <xsd:enumeration value="NativeApi"/> 166 <xsd:enumeration value="Interpreter"/> 167 <xsd:enumeration value="Recompiler"/> 158 168 </xsd:restriction> 159 169 </xsd:simpleType> … … 1589 1599 <xsd:attribute name="version" type="xsd:string" default="1.15"/> <!-- Used for OVF files only, must not be present in normal settings files. The default corresponds to settings created by 5.0, which covers many older versions but not newer ones. --> 1590 1600 <xsd:attribute name="VMProcessPriority" type="TVMProcPriority"/> 1601 <xsd:attribute name="executionEngine" type="TVMExecEngine"/> <!-- new since v1.20. --> 1591 1602 </xsd:complexType> 1592 1603 -
trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py
r103078 r103085 57 57 58 58 # All virtualization modes. 59 g_asVirtModes = ['hwvirt', 'hwvirt-np', 'raw',]; 60 # All virtualization modes except for raw-mode. 61 g_asVirtModesNoRaw = ['hwvirt', 'hwvirt-np',]; 59 g_asVirtModes = ['hwvirt', 'hwvirt-np', 'raw', 'native-api', 'interpreter', 'recompiler']; 62 60 # Dictionary mapping the virtualization mode mnemonics to a little less cryptic 63 61 # strings used in test descriptions. 64 62 g_dsVirtModeDescs = { 65 'raw' : 'Raw-mode', 66 'hwvirt' : 'HwVirt', 67 'hwvirt-np' : 'NestedPaging' 63 'raw' : 'Raw-mode', 64 'hwvirt' : 'HwVirt', 65 'hwvirt-np' : 'NestedPaging', 66 'native-api' : 'NativeApi', 67 'interpreter' : 'Interpreter', 68 'recompiler' : 'Recompiler' 68 69 }; 69 70 … … 552 553 oSession = oTestDrv.openSession(oVM); 553 554 if oSession is not None: 554 fRc = oSession.enableVirtExX86(sVirtMode != 'raw'); 555 if oSession.fpApiVer >= 7.1: 556 adVmExecEngines = { 557 'hwvirt' : vboxcon.VMExecutionEngine_HwVirt, 558 'hwvirt-np' : vboxcon.VMExecutionEngine_HwVirt, 559 'native-api' : vboxcon.VMExecutionEngine_NativeApi, 560 'interpreter' : vboxcon.VMExecutionEngine_Interpreter, 561 'recompiler' : vboxcon.VMExecutionEngine_Recompiler, 562 }; 563 fRc = oSession.setExecutionEngine(adVmExecEngines[sVirtMode]); 564 else: 565 fRc = oSession.enableVirtExX86(sVirtMode != 'raw'); 566 555 567 fRc = fRc and oSession.enableNestedPagingX86(sVirtMode == 'hwvirt-np'); 556 568 fRc = fRc and oSession.setCpuCount(cCpus); … … 1272 1284 oSession = oTestDrv.openSession(oVM); 1273 1285 if oSession is not None: 1274 fRc = oSession.enableVirtExX86(sVirtMode != 'raw'); 1286 if oSession.fpApiVer >= 7.1: 1287 adVmExecEngines = { 1288 'hwvirt' : vboxcon.VMExecutionEngine_HwVirt, 1289 'hwvirt-np' : vboxcon.VMExecutionEngine_HwVirt, 1290 'native-api' : vboxcon.VMExecutionEngine_NativeApi, 1291 'interpreter' : vboxcon.VMExecutionEngine_Interpreter, 1292 'recompiler' : vboxcon.VMExecutionEngine_Recompiler, 1293 }; 1294 fRc = oSession.setExecutionEngine(adVmExecEngines[sVirtMode]); 1295 else: 1296 fRc = oSession.enableVirtExX86(sVirtMode != 'raw'); 1297 1275 1298 fRc = fRc and oSession.enableNestedPagingX86(sVirtMode == 'hwvirt-np'); 1276 1299 fRc = fRc and oSession.setCpuCount(cCpus); … … 1854 1877 return True; 1855 1878 1856 def _removeUnsupportedVirtModes(self, oTestDrv): 1857 """ 1858 Removes unsupported virtualization modes. 1859 """ 1860 if 'hwvirt' in self.asVirtModes and not oTestDrv.hasHostHwVirt(): 1861 reporter.log('Hardware assisted virtualization is not available on the host, skipping it.'); 1862 self.asVirtModes.remove('hwvirt'); 1863 1864 if 'hwvirt-np' in self.asVirtModes and not oTestDrv.hasHostNestedPaging(): 1865 reporter.log('Nested paging not supported by the host, skipping it.'); 1866 self.asVirtModes.remove('hwvirt-np'); 1867 1868 if 'raw' in self.asVirtModes and not oTestDrv.hasRawModeSupport(): 1869 reporter.log('Raw-mode virtualization is not available in this build (or perhaps for this host), skipping it.'); 1870 self.asVirtModes.remove('raw'); 1871 1872 return True; 1879 def _removeUnsupportedVirtModes(self, oTestDrv, oVm, asVirtModesWanted): 1880 """ 1881 Removes unsupported virtualization modes for the given VM. 1882 """ 1883 if oTestDrv.fpApiVer >= 7.1: 1884 enmCpuArch = None; 1885 if oVm.sPlatformArchitecture == 'x86': 1886 if oVm.is64bitRequired(): 1887 enmCpuArch = vboxcon.CPUArchitecture_AMD64; 1888 else: 1889 enmCpuArch = vboxcon.CPUArchitecture_x86; 1890 elif oVm.sPlatformArchitecture == 'ARM': 1891 if oVm.is64bitRequired(): 1892 enmCpuArch = vboxcon.CPUArchitecture_ARMv8_64; 1893 else: 1894 enmCpuArch = vboxcon.CPUArchitecture_ARMv8_32; 1895 1896 try: 1897 aenmExecEngines = oTestDrv.oVBox.systemProperties.getExecutionEnginesForVmCpuArchitecture(enmCpuArch); 1898 1899 if 'raw' in asVirtModesWanted and not oTestDrv.hasRawModeSupport(): 1900 reporter.log('Raw-mode virtualization is not available in this build (or perhaps for this host), skipping it.'); 1901 asVirtModesWanted.remove('raw'); 1902 1903 if 'hwvirt' in asVirtModesWanted and not vboxcon.VMExecutionEngine_HwVirt in aenmExecEngines: 1904 reporter.log('Hardware assisted virtualization is not available on the host, skipping it.'); 1905 asVirtModesWanted.remove('hwvirt'); 1906 1907 if 'hwvirt-np' in asVirtModesWanted and ( not vboxcon.VMExecutionEngine_HwVirt in aenmExecEngines \ 1908 or not oTestDrv.hasHostNestedPaging()): 1909 reporter.log('Nested paging not supported by the host, skipping it.'); 1910 asVirtModesWanted.remove('hwvirt-np'); 1911 1912 if 'native-api' in asVirtModesWanted and not vboxcon.VMExecutionEngine_NativeApi in aenmExecEngines: 1913 reporter.log('Native API (aka NEM) virtualization is not available in this build (or perhaps for this host) and VM CPU architecture, skipping it.'); 1914 asVirtModesWanted.remove('native-api'); 1915 1916 if 'interpreter' in asVirtModesWanted and not vboxcon.VMExecutionEngine_Interpreter in aenmExecEngines: 1917 reporter.log('IEM interpreter is not available in this build (or perhaps for this host) and VM CPU architecture, skipping it.'); 1918 asVirtModesWanted.remove('iem-interpreted'); 1919 1920 if 'recompiler' in asVirtModesWanted and not vboxcon.VMExecutionEngine_Recompiler in aenmExecEngines: 1921 reporter.log('IEM recompiler is not available in this build (or perhaps for this host) and VM CPU architecture, skipping it.'); 1922 asVirtModesWanted.remove('iem-recompiled'); 1923 except: 1924 reporter.errorXcpt('failed to query supported execution engines for "%s"' % (oVm.sVmName, )); 1925 asVirtModesWanted = []; 1926 else: 1927 asVirtModesWanted.remove('native-api'); 1928 asVirtModesWanted.remove('interpreter'); 1929 asVirtModesWanted.remove('recompiler'); 1930 1931 if 'hwvirt' in asVirtModesWanted and not oTestDrv.hasHostHwVirt(): 1932 reporter.log('Hardware assisted virtualization is not available on the host, skipping it.'); 1933 asVirtModesWanted.remove('hwvirt'); 1934 1935 if 'hwvirt-np' in asVirtModesWanted and not oTestDrv.hasHostNestedPaging(): 1936 reporter.log('Nested paging not supported by the host, skipping it.'); 1937 asVirtModesWanted.remove('hwvirt-np'); 1938 1939 if 'raw' in asVirtModesWanted and not oTestDrv.hasRawModeSupport(): 1940 reporter.log('Raw-mode virtualization is not available in this build (or perhaps for this host), skipping it.'); 1941 asVirtModesWanted.remove('raw'); 1942 1943 return asVirtModesWanted; 1873 1944 1874 1945 def actionExecute(self, oTestDrv, fnCallback): # pylint: disable=too-many-locals … … 1884 1955 """ 1885 1956 1886 self._removeUnsupportedVirtModes(oTestDrv);1887 1957 cMaxCpus = oTestDrv.getHostCpuCount(); 1888 1958 … … 1902 1972 # Intersect the supported modes and the ones being testing. 1903 1973 asVirtModesSup = [sMode for sMode in oTestVm.asVirtModesSup if sMode in self.asVirtModes]; 1974 1975 # Filter out what the host doesn't support. 1976 asVirtModesSup = self._removeUnsupportedVirtModes(oTestDrv, oTestVm, asVirtModesSup); 1904 1977 1905 1978 # Ditto for CPUs. -
trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py
r101067 r103085 2786 2786 return fRc; 2787 2787 2788 def setExecutionEngine(self, iVmExecEngine): 2789 """ 2790 Sets a VM execution engine. 2791 Returns the True on success, False on failure (logged). 2792 """ 2793 try: 2794 self.o.machine.VMExecutionEngine = iVmExecEngine; 2795 except: 2796 reporter.errorXcpt('Unable to set VM execution engine "%s"' % (iVmExecEngine,)) 2797 return False; 2798 return True; 2799 2788 2800 # 2789 2801 # IConsole wrappers.
Note:
See TracChangeset
for help on using the changeset viewer.