- Timestamp:
- May 24, 2018 8:51:23 PM (7 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r72328 r72332 1056 1056 <enum 1057 1057 name="HWVirtExPropertyType" 1058 uuid=" 411ad0ea-aeeb-44cb-9d03-1624d0d025ac"1058 uuid="bc05551e-e288-467e-1ea3-233de08e4480" 1059 1059 > 1060 1060 <desc> … … 1096 1096 Whether the VM should fail to start if hardware virtualization (VT-x/AMD-V) cannot be used. If 1097 1097 not set, there will be an automatic fallback to software virtualization. 1098 </desc> 1099 </const> 1100 <const name="UseNativeApi" value="7"> 1101 <desc> 1102 Use the native hypervisor API instead of the VirtualBox one (HM) for VT-X/AMD-V. This is 1103 ignored if <link to="HWVirtExPropertyType::Enabled"/> isn't set. 1098 1104 </desc> 1099 1105 </const> -
trunk/src/VBox/Main/include/MachineImpl.h
r71108 r72332 282 282 BOOL mHWVirtExUXEnabled; 283 283 BOOL mHWVirtExForceEnabled; 284 BOOL mHWVirtExUseNativeApi; 284 285 BOOL mAccelerate2DVideoEnabled; 285 286 BOOL mPAEEnabled; -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r72323 r72332 187 187 mHWVirtExUXEnabled = true; 188 188 mHWVirtExForceEnabled = false; 189 mHWVirtExUseNativeApi = false; 189 190 #if HC_ARCH_BITS == 64 || defined(RT_OS_WINDOWS) || defined(RT_OS_DARWIN) 190 191 mPAEEnabled = true; … … 2552 2553 break; 2553 2554 2555 case HWVirtExPropertyType_UseNativeApi: 2556 *aValue = mHWData->mHWVirtExUseNativeApi; 2557 break; 2558 2554 2559 default: 2555 2560 return E_INVALIDARG; … … 2565 2570 if (FAILED(rc)) return rc; 2566 2571 2567 switch (aProperty)2572 switch (aProperty) 2568 2573 { 2569 2574 case HWVirtExPropertyType_Enabled: … … 2601 2606 mHWData.backup(); 2602 2607 mHWData->mHWVirtExForceEnabled = !!aValue; 2608 break; 2609 2610 case HWVirtExPropertyType_UseNativeApi: 2611 i_setModified(IsModified_MachineData); 2612 mHWData.backup(); 2613 mHWData->mHWVirtExUseNativeApi = !!aValue; 2603 2614 break; 2604 2615 … … 9042 9053 mHWData->mHWVirtExUXEnabled = data.fUnrestrictedExecution; 9043 9054 mHWData->mHWVirtExForceEnabled = data.fHardwareVirtForce; 9055 mHWData->mHWVirtExUseNativeApi = data.fUseNativeApi; 9044 9056 mHWData->mPAEEnabled = data.fPAE; 9045 9057 mHWData->mLongMode = data.enmLongMode; … … 10370 10382 data.fUnrestrictedExecution = !!mHWData->mHWVirtExUXEnabled; 10371 10383 data.fHardwareVirtForce = !!mHWData->mHWVirtExForceEnabled; 10384 data.fUseNativeApi = !!mHWData->mHWVirtExUseNativeApi; 10372 10385 data.fPAE = !!mHWData->mPAEEnabled; 10373 10386 data.enmLongMode = mHWData->mLongMode; -
trunk/src/VBox/Main/xml/Settings.cpp
r71179 r72332 2774 2774 fUnrestrictedExecution(true), 2775 2775 fHardwareVirtForce(false), 2776 fUseNativeApi(false), 2776 2777 fTripleFaultReset(false), 2777 2778 fPAE(false), … … 2931 2932 && fUnrestrictedExecution == h.fUnrestrictedExecution 2932 2933 && fHardwareVirtForce == h.fHardwareVirtForce 2934 && fUseNativeApi == h.fUseNativeApi 2933 2935 && fPAE == h.fPAE 2934 2936 && enmLongMode == h.enmLongMode … … 3908 3910 if ((pelmCPUChild = pelmHwChild->findChildElement("HardwareVirtForce"))) 3909 3911 pelmCPUChild->getAttributeValue("enabled", hw.fHardwareVirtForce); 3912 if ((pelmCPUChild = pelmHwChild->findChildElement("HardwareVirtExUseNativeApi"))) 3913 pelmCPUChild->getAttributeValue("enabled", hw.fUseNativeApi); 3910 3914 3911 3915 if (!(pelmCPUChild = pelmHwChild->findChildElement("PAE"))) … … 5333 5337 pelmCPU->createChild("HardwareVirtForce")->setAttribute("enabled", hw.fHardwareVirtForce); 5334 5338 } 5339 5340 if (m->sv >= SettingsVersion_v1_9 && hw.fUseNativeApi) 5341 pelmCPU->createChild("HardwareVirtExUseNativeApi")->setAttribute("enabled", hw.fUseNativeApi); 5335 5342 5336 5343 if (m->sv >= SettingsVersion_v1_10) … … 6964 6971 if (m->sv < SettingsVersion_v1_17) 6965 6972 { 6966 // VirtualBox 6.0 adds nested hardware virtualization. 6967 if (hardwareMachine.fNestedHWVirt) 6973 // VirtualBox 6.0 adds nested hardware virtualization, using native API (NEM). 6974 if ( hardwareMachine.fNestedHWVirt 6975 || hardwareMachine.fUseNativeApi) 6968 6976 { 6969 6977 m->sv = SettingsVersion_v1_17;
Note:
See TracChangeset
for help on using the changeset viewer.