Changeset 21446 in vbox
- Timestamp:
- Jul 9, 2009 3:09:57 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49854
- Location:
- trunk/src/VBox
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r20977 r21446 1412 1412 else 1413 1413 CHECK_ERROR(systemProperties, COMSETTER(WebServiceAuthLibrary)(Bstr(a->argv[1]))); 1414 }1415 else if (!strcmp(a->argv[0], "hwvirtexenabled"))1416 {1417 if (!strcmp(a->argv[1], "yes"))1418 CHECK_ERROR(systemProperties, COMSETTER(HWVirtExEnabled)(TRUE));1419 else if (!strcmp(a->argv[1], "no"))1420 CHECK_ERROR(systemProperties, COMSETTER(HWVirtExEnabled)(FALSE));1421 else1422 return errorArgument("Invalid value '%s' for hardware virtualization extension flag", a->argv[1]);1423 1414 } 1424 1415 else if (!strcmp(a->argv[0], "loghistorycount")) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r21032 r21446 131 131 " [--ioapic on|off]\n" 132 132 " [--pae on|off]\n" 133 " [--hwvirtex on|off |default]\n"133 " [--hwvirtex on|off]\n" 134 134 " [--nestedpaging on|off]\n" 135 135 " [--vtxvpid on|off]\n" … … 431 431 " vrdpauthlibrary default|<library> |\n" 432 432 " websrvauthlibrary default|null|<library> |\n" 433 " hwvirtexenabled yes|no\n"434 433 " loghistorycount <value>\n" 435 434 "\n"); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r20928 r21446 343 343 RTPrintf("Time offset: %lld ms\n", timeOffset); 344 344 345 TSBool_ThwVirtExEnabled;345 BOOL hwVirtExEnabled; 346 346 machine->COMGETTER(HWVirtExEnabled)(&hwVirtExEnabled); 347 if (hwVirtExEnabled == TSBool_Default) 348 { 349 BOOL fHWVirtExEnabled; 350 ComPtr<ISystemProperties> systemProperties; 351 virtualBox->COMGETTER(SystemProperties)(systemProperties.asOutParam()); 352 systemProperties->COMGETTER(HWVirtExEnabled)(&fHWVirtExEnabled); 353 if (details == VMINFO_MACHINEREADABLE) 354 RTPrintf("hwvirtex=\"default\"\n"); 355 else 356 RTPrintf("Hardw. virt.ext: Default (%s)\n", fHWVirtExEnabled ? "on" : "off"); 357 } 358 else 359 { 360 if (details == VMINFO_MACHINEREADABLE) 361 RTPrintf("hwvirtex=\"%s\"\n", hwVirtExEnabled == TSBool_True ? "on" : "off"); 362 else 363 RTPrintf("Hardw. virt.ext: %s\n", hwVirtExEnabled == TSBool_True ? "on" : "off"); 364 } 347 if (details == VMINFO_MACHINEREADABLE) 348 RTPrintf("hwvirtex=\"%s\"\n", hwVirtExEnabled ? "on" : "off"); 349 else 350 RTPrintf("Hardw. virt.ext: %s\n", hwVirtExEnabled ? "on" : "off"); 365 351 BOOL HWVirtExNestedPagingEnabled; 366 352 machine->COMGETTER(HWVirtExNestedPagingEnabled)(&HWVirtExNestedPagingEnabled); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r20928 r21446 763 763 systemProperties->COMGETTER(WebServiceAuthLibrary)(str.asOutParam()); 764 764 RTPrintf("Webservice auth. library: %lS\n", str.raw()); 765 systemProperties->COMGETTER(HWVirtExEnabled)(&flag);766 RTPrintf("Hardware virt. extensions: %s\n", flag ? "yes" : "no");767 765 systemProperties->COMGETTER(LogHistoryCount)(&ulValue); 768 766 RTPrintf("Log history count: %u\n", ulValue); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r20928 r21446 938 938 if (!strcmp(hwvirtex, "on")) 939 939 { 940 CHECK_ERROR(machine, COMSETTER(HWVirtExEnabled)(T SBool_True));940 CHECK_ERROR(machine, COMSETTER(HWVirtExEnabled)(TRUE)); 941 941 } 942 942 else if (!strcmp(hwvirtex, "off")) 943 943 { 944 CHECK_ERROR(machine, COMSETTER(HWVirtExEnabled)(TSBool_False)); 945 } 946 else if (!strcmp(hwvirtex, "default")) 947 { 948 CHECK_ERROR(machine, COMSETTER(HWVirtExEnabled)(TSBool_Default)); 944 CHECK_ERROR(machine, COMSETTER(HWVirtExEnabled)(FALSE)); 949 945 } 950 946 else -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r21029 r21446 1073 1073 unsigned fPATM = ~0U; 1074 1074 unsigned fCSAM = ~0U; 1075 TSBool_T fHWVirt = TSBool_Default;1075 unsigned fHWVirt = ~0U; 1076 1076 uint32_t u32WarpDrive = 0; 1077 1077 #endif … … 1587 1587 else if ( !strcmp(argv[curArg], "--hwvirtex") 1588 1588 || !strcmp(argv[curArg], "-hwvirtex")) 1589 fHWVirt = TSBool_True;1589 fHWVirt = true; 1590 1590 else if ( !strcmp(argv[curArg], "--nohwvirtex") 1591 1591 || !strcmp(argv[curArg], "-nohwvirtex")) 1592 fHWVirt = TSBool_False;1592 fHWVirt = false; 1593 1593 else if ( !strcmp(argv[curArg], "--warpdrive") 1594 1594 || !strcmp(argv[curArg], "-warpdrive")) … … 2149 2149 gMachineDebugger->COMSETTER(CSAMEnabled)(fCSAM); 2150 2150 } 2151 if (fHWVirt != TSBool_Default)2151 if (fHWVirt != ~0U) 2152 2152 { 2153 2153 gMachine->COMSETTER(HWVirtExEnabled)(fHWVirt); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r21034 r21446 1482 1482 1483 1483 /* VT-x/AMD-V */ 1484 QString virt = aMachine.GetHWVirtExEnabled() == KTSBool_True ?1485 tr ("Enabled", "details report (VT-x/AMD-V)") :1486 1484 QString virt = aMachine.GetHWVirtExEnabled() 1485 ? tr ("Enabled", "details report (VT-x/AMD-V)") 1486 : tr ("Disabled", "details report (VT-x/AMD-V)"); 1487 1487 1488 1488 /* Nested Paging */ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialogSpecific.cpp
r21053 r21446 433 433 if (generalPage && systemPage && 434 434 generalPage->is64BitOSTypeSelected() && !systemPage->isHWVirtExEnabled()) 435 mMachine.SetHWVirtExEnabled ( KTSBool_True);435 mMachine.SetHWVirtExEnabled (true); 436 436 437 437 /* Clear the "GUI_FirstRun" extra data key in case if the boot order -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsSystem.cpp
r21305 r21446 175 175 /* VT-x/AMD-V */ 176 176 mCbVirt->setEnabled (fVTxAMDVSupported); 177 mCbVirt->setChecked (aMachine.GetHWVirtExEnabled() == KTSBool_True);177 mCbVirt->setChecked (aMachine.GetHWVirtExEnabled()); 178 178 179 179 /* Nested Paging */ 180 180 mCbNestedPaging->setEnabled (fVTxAMDVSupported && 181 aMachine.GetHWVirtExEnabled() == KTSBool_True);181 aMachine.GetHWVirtExEnabled()); 182 182 mCbNestedPaging->setChecked (aMachine.GetHWVirtExNestedPagingEnabled()); 183 183 … … 232 232 /* VT-x/AMD-V */ 233 233 mMachine.SetHWVirtExEnabled (mCbVirt->checkState() == Qt::Checked || 234 mSlCPU->value() > 1 ? 235 KTSBool_True : KTSBool_False); 234 mSlCPU->value() > 1); 236 235 237 236 /* Nested Paging */ -
trunk/src/VBox/Main/ApplianceImpl.cpp
r21439 r21446 1940 1940 if (tmpCount > 1) 1941 1941 { 1942 rc = pNewMachine->COMSETTER(HWVirtExEnabled)(T SBool_True);1942 rc = pNewMachine->COMSETTER(HWVirtExEnabled)(TRUE); 1943 1943 if (FAILED(rc)) throw rc; 1944 1944 -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r21421 r21446 237 237 238 238 /* hardware virtualization extensions */ 239 TSBool_T hwVirtExEnabled;240 239 BOOL fHWVirtExEnabled; 241 hrc = pMachine->COMGETTER(HWVirtExEnabled)(&hwVirtExEnabled); H(); 242 if (hwVirtExEnabled == TSBool_Default) 243 { 244 /* check the default value */ 245 hrc = systemProperties->COMGETTER(HWVirtExEnabled)(&fHWVirtExEnabled); H(); 246 } 247 else 248 fHWVirtExEnabled = (hwVirtExEnabled == TSBool_True); 240 hrc = pMachine->COMGETTER(HWVirtExEnabled)(&fHWVirtExEnabled); H(); 249 241 if (cCpus > 1) /** @todo SMP: This isn't nice, but things won't work on mac otherwise. */ 250 fHWVirtExEnabled = T SBool_True;242 fHWVirtExEnabled = TRUE; 251 243 252 244 #ifdef RT_OS_DARWIN -
trunk/src/VBox/Main/MachineImpl.cpp
r21428 r21446 194 194 mAccelerate3DEnabled = false; 195 195 mMonitorCount = 1; 196 mHWVirtExEnabled = TSBool_False;196 mHWVirtExEnabled = true; 197 197 mHWVirtExNestedPagingEnabled = false; 198 198 mHWVirtExVPIDEnabled = false; … … 501 501 mUserData->mOSTypeId = aOsType->id(); 502 502 503 /* Apply HWVirtEx default; always true (used to rely on aOsType->recommendedVirtEx()) */504 mHWData->mHWVirtExEnabled = TSBool_True;505 506 503 /* Apply BIOS defaults */ 507 504 mBIOSSettings->applyDefaults (aOsType); … … 1237 1234 } 1238 1235 1239 STDMETHODIMP Machine::COMGETTER(HWVirtExEnabled)( TSBool_T*enabled)1236 STDMETHODIMP Machine::COMGETTER(HWVirtExEnabled)(BOOL *enabled) 1240 1237 { 1241 1238 if (!enabled) … … 1252 1249 } 1253 1250 1254 STDMETHODIMP Machine::COMSETTER(HWVirtExEnabled)( TSBool_Tenable)1251 STDMETHODIMP Machine::COMSETTER(HWVirtExEnabled)(BOOL enable) 1255 1252 { 1256 1253 AutoCaller autoCaller (this); … … 5173 5170 { 5174 5171 /* default value in case the node is not there */ 5175 mHWData->mHWVirtExEnabled = TSBool_Default;5172 mHWData->mHWVirtExEnabled = true; 5176 5173 mHWData->mHWVirtExNestedPagingEnabled = false; 5177 5174 mHWData->mHWVirtExVPIDEnabled = false; … … 5185 5182 { 5186 5183 const char *enabled = hwVirtExNode.stringValue ("enabled"); 5187 if (strcmp (enabled, "false") == 0) 5188 mHWData->mHWVirtExEnabled = TSBool_False; 5189 else if (strcmp (enabled, "true") == 0) 5190 mHWData->mHWVirtExEnabled = TSBool_True; 5184 if (strcmp (enabled, "true") == 0) 5185 mHWData->mHWVirtExEnabled = true; 5191 5186 else 5192 mHWData->mHWVirtExEnabled = TSBool_Default;5187 mHWData->mHWVirtExEnabled = false; 5193 5188 } 5194 5189 /* HardwareVirtExNestedPaging (optional, default is false) */ … … 6732 6727 Key hwVirtExNode = cpuNode.createKey ("HardwareVirtEx"); 6733 6728 const char *value = NULL; 6734 switch (mHWData->mHWVirtExEnabled) 6735 { 6736 case TSBool_False: 6737 value = "false"; 6738 break; 6739 case TSBool_True: 6740 value = "true"; 6741 break; 6742 case TSBool_Default: 6743 value = "default"; 6744 break; 6745 } 6729 if (mHWData->mHWVirtExEnabled) 6730 value = "true"; 6731 else 6732 value = "false"; 6746 6733 hwVirtExNode.setStringValue ("enabled", value); 6747 6734 -
trunk/src/VBox/Main/SystemPropertiesImpl.cpp
r20262 r21446 83 83 setRemoteDisplayAuthLibrary (NULL); 84 84 85 mHWVirtExEnabled = false;86 85 mLogHistoryCount = 3; 87 86 … … 516 515 } 517 516 518 STDMETHODIMP SystemProperties::COMGETTER(HWVirtExEnabled) (BOOL *enabled)519 {520 if (!enabled)521 return E_POINTER;522 523 AutoCaller autoCaller (this);524 CheckComRCReturnRC (autoCaller.rc());525 526 AutoReadLock alock (this);527 528 *enabled = mHWVirtExEnabled;529 530 return S_OK;531 }532 533 STDMETHODIMP SystemProperties::COMSETTER(HWVirtExEnabled) (BOOL enabled)534 {535 AutoCaller autoCaller (this);536 CheckComRCReturnRC (autoCaller.rc());537 538 /* VirtualBox::saveSettings() needs a write lock */539 AutoMultiWriteLock2 alock (mParent, this);540 541 mHWVirtExEnabled = enabled;542 543 HRESULT rc = mParent->saveSettings();544 545 return rc;546 }547 548 517 STDMETHODIMP SystemProperties::COMGETTER(LogHistoryCount) (ULONG *count) 549 518 { … … 630 599 rc = setWebServiceAuthLibrary (bstr); 631 600 CheckComRCReturnRC (rc); 632 633 /* Note: not <BOOL> because Win32 defines BOOL as int */634 mHWVirtExEnabled = properties.valueOr <bool> ("HWVirtExEnabled", false);635 601 636 602 mLogHistoryCount = properties.valueOr <ULONG> ("LogHistoryCount", 3); … … 671 637 if (mWebServiceAuthLibrary) 672 638 properties.setValue <Bstr> ("webServiceAuthLibrary", mWebServiceAuthLibrary); 673 674 properties.setValue <bool> ("HWVirtExEnabled", !!mHWVirtExEnabled);675 639 676 640 properties.setValue <ULONG> ("LogHistoryCount", mLogHistoryCount); -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r21364 r21446 345 345 ///////////////////////////////////////////////////////////////////////// 346 346 --> 347 348 <enum349 name="TSBool"350 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"351 >352 <desc>353 Boolean variable having a third state, default.354 </desc>355 356 <const name="False" value="0"/>357 <const name="True" value="1"/>358 <const name="Default" value="2"/>359 </enum>360 347 361 348 <enum … … 4160 4147 <interface 4161 4148 name="IMachine" extends="$unknown" 4162 uuid=" 4d1df26d-d9c1-4c7e-b689-15e85ecf8ffc"4149 uuid="540dcfda-3df2-49c6-88fa-033a28c2ff85" 4163 4150 wsmap="managed" 4164 4151 > … … 4389 4376 </attribute> 4390 4377 4391 <attribute name="HWVirtExEnabled" type=" TSBool">4378 <attribute name="HWVirtExEnabled" type="boolean"> 4392 4379 <desc> 4393 4380 This setting determines whether VirtualBox will try to make use of … … 7533 7520 name="ISystemProperties" 7534 7521 extends="$unknown" 7535 uuid=" 63bfd184-df69-4949-9159-a923cf7b1207"7522 uuid="9ca0f712-83f3-4631-b143-b75ef6568332" 7536 7523 wsmap="managed" 7537 7524 > … … 7785 7772 initial value. 7786 7773 </note> 7787 </desc>7788 </attribute>7789 7790 <attribute name="HWVirtExEnabled" type="boolean">7791 <desc>7792 This specifies the default value for hardware virtualization7793 extensions. If enabled, virtual machines will make use of7794 hardware virtualization extensions such as Intel VT-x and7795 AMD-V by default. This value can be overridden by each VM7796 using their <link to="IMachine::HWVirtExEnabled" /> property.7797 7774 </desc> 7798 7775 </attribute> -
trunk/src/VBox/Main/include/MachineImpl.h
r20928 r21446 265 265 ULONG mVRAMSize; 266 266 ULONG mMonitorCount; 267 TSBool_TmHWVirtExEnabled;267 BOOL mHWVirtExEnabled; 268 268 BOOL mHWVirtExNestedPagingEnabled; 269 269 BOOL mHWVirtExVPIDEnabled; … … 503 503 STDMETHOD(COMSETTER(Accelerate3DEnabled))(BOOL enabled); 504 504 STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings); 505 STDMETHOD(COMGETTER(HWVirtExEnabled))( TSBool_T*enabled);506 STDMETHOD(COMSETTER(HWVirtExEnabled))( TSBool_Tenabled);505 STDMETHOD(COMGETTER(HWVirtExEnabled))(BOOL *enabled); 506 STDMETHOD(COMSETTER(HWVirtExEnabled))(BOOL enabled); 507 507 STDMETHOD(COMGETTER(HWVirtExNestedPagingEnabled))(BOOL *enabled); 508 508 STDMETHOD(COMSETTER(HWVirtExNestedPagingEnabled))(BOOL enabled); -
trunk/src/VBox/Main/include/SystemPropertiesImpl.h
r20260 r21446 89 89 STDMETHOD(COMGETTER(WebServiceAuthLibrary)) (BSTR *aWebServiceAuthLibrary); 90 90 STDMETHOD(COMSETTER(WebServiceAuthLibrary)) (IN_BSTR aWebServiceAuthLibrary); 91 STDMETHOD(COMGETTER(HWVirtExEnabled)) (BOOL *enabled);92 STDMETHOD(COMSETTER(HWVirtExEnabled)) (BOOL enabled);93 91 STDMETHOD(COMGETTER(LogHistoryCount)) (ULONG *count); 94 92 STDMETHOD(COMSETTER(LogHistoryCount)) (ULONG count); … … 143 141 Bstr mRemoteDisplayAuthLibrary; 144 142 Bstr mWebServiceAuthLibrary; 145 BOOL mHWVirtExEnabled;146 143 ULONG mLogHistoryCount; 147 144 AudioDriverType_T mDefaultAudioDriver;
Note:
See TracChangeset
for help on using the changeset viewer.