Changeset 23733 in vbox
- Timestamp:
- Oct 13, 2009 2:48:10 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 53453
- Location:
- trunk/src/VBox
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r23703 r23733 344 344 345 345 BOOL hwVirtExEnabled; 346 machine-> COMGETTER(HWVirtExEnabled)(&hwVirtExEnabled);346 machine->GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &hwVirtExEnabled); 347 347 if (details == VMINFO_MACHINEREADABLE) 348 348 RTPrintf("hwvirtex=\"%s\"\n", hwVirtExEnabled ? "on" : "off"); 349 349 else 350 350 RTPrintf("Hardw. virt.ext: %s\n", hwVirtExEnabled ? "on" : "off"); 351 352 BOOL hwVirtExExclusive; 353 machine->GetHWVirtExProperty(HWVirtExPropertyType_Exclusive, &hwVirtExExclusive); 354 if (details == VMINFO_MACHINEREADABLE) 355 RTPrintf("hwvirtexexcl=\"%s\"\n", hwVirtExExclusive ? "on" : "off"); 356 else 357 RTPrintf("Hardw. virt.ext exclusive: %s\n", hwVirtExExclusive ? "on" : "off"); 358 351 359 BOOL HWVirtExNestedPagingEnabled; 352 machine-> COMGETTER(HWVirtExNestedPagingEnabled)(&HWVirtExNestedPagingEnabled);360 machine->GetHWVirtExProperty(HWVirtExPropertyType_NestedPagingEnabled, &HWVirtExNestedPagingEnabled); 353 361 if (details == VMINFO_MACHINEREADABLE) 354 362 RTPrintf("nestedpaging=\"%s\"\n", HWVirtExNestedPagingEnabled ? "on" : "off"); … … 357 365 358 366 BOOL HWVirtExVPIDEnabled; 359 machine-> COMGETTER(HWVirtExVPIDEnabled)(&HWVirtExVPIDEnabled);367 machine->GetHWVirtExProperty(HWVirtExPropertyType_VPIDEnabled, &HWVirtExVPIDEnabled); 360 368 if (details == VMINFO_MACHINEREADABLE) 361 369 RTPrintf("vtxvpid=\"%s\"\n", HWVirtExVPIDEnabled ? "on" : "off"); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r23731 r23733 66 66 MODIFYVMPAE, 67 67 MODIFYVMHWVIRTEX, 68 MODIFYVMHWVIRTEXEXCLUSIVE, 68 69 MODIFYVMNESTEDPAGING, 69 70 MODIFYVMVTXVPID, … … 137 138 { "--pae", MODIFYVMPAE, RTGETOPT_REQ_STRING }, 138 139 { "--hwvirtex", MODIFYVMHWVIRTEX, RTGETOPT_REQ_STRING }, 140 { "--hwvirtexexcl", MODIFYVMHWVIRTEXEXCLUSIVE, RTGETOPT_REQ_STRING }, 139 141 { "--nestedpaging", MODIFYVMNESTEDPAGING, RTGETOPT_REQ_STRING }, 140 142 { "--vtxvpid", MODIFYVMVTXVPID, RTGETOPT_REQ_STRING }, … … 384 386 if (!strcmp(pValueUnion.psz, "on")) 385 387 { 386 CHECK_ERROR (machine, COMSETTER(HWVirtExEnabled)(TRUE));388 CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, TRUE)); 387 389 } 388 390 else if (!strcmp(pValueUnion.psz, "off")) 389 391 { 390 CHECK_ERROR (machine, COMSETTER(HWVirtExEnabled)(FALSE));392 CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, FALSE)); 391 393 } 392 394 else … … 399 401 } 400 402 403 case MODIFYVMHWVIRTEXEXCLUSIVE: 404 { 405 if (pValueUnion.psz) 406 { 407 if (!strcmp(pValueUnion.psz, "on")) 408 { 409 CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Exclusive, TRUE)); 410 } 411 else if (!strcmp(pValueUnion.psz, "off")) 412 { 413 CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Exclusive, FALSE)); 414 } 415 else 416 { 417 errorArgument("Invalid --hwvirtex argument '%s'", pValueUnion.psz); 418 rc = E_FAIL; 419 } 420 } 421 break; 422 } 423 401 424 case MODIFYVMNESTEDPAGING: 402 425 { … … 405 428 if (!strcmp(pValueUnion.psz, "on")) 406 429 { 407 CHECK_ERROR (machine, COMSETTER(HWVirtExNestedPagingEnabled)(true));430 CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPagingEnabled, TRUE)); 408 431 } 409 432 else if (!strcmp(pValueUnion.psz, "off")) 410 433 { 411 CHECK_ERROR (machine, COMSETTER(HWVirtExNestedPagingEnabled)(false));434 CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPagingEnabled, FALSE)); 412 435 } 413 436 else … … 426 449 if (!strcmp(pValueUnion.psz, "on")) 427 450 { 428 CHECK_ERROR (machine, COMSETTER(HWVirtExVPIDEnabled)(true));451 CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_VPIDEnabled, TRUE)); 429 452 } 430 453 else if (!strcmp(pValueUnion.psz, "off")) 431 454 { 432 CHECK_ERROR (machine, COMSETTER(HWVirtExVPIDEnabled)(false));455 CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_VPIDEnabled, FALSE)); 433 456 } 434 457 else -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r23703 r23733 1623 1623 1624 1624 /* VT-x/AMD-V */ 1625 QString virt = aMachine.GetHWVirtEx Enabled()1625 QString virt = aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_Enabled) 1626 1626 ? tr ("Enabled", "details report (VT-x/AMD-V)") 1627 1627 : tr ("Disabled", "details report (VT-x/AMD-V)"); 1628 1628 1629 1629 /* Nested Paging */ 1630 QString nested = aMachine.GetHWVirtEx NestedPagingEnabled()1630 QString nested = aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPagingEnabled) 1631 1631 ? tr ("Enabled", "details report (Nested Paging)") 1632 1632 : tr ("Disabled", "details report (Nested Paging)"); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialogSpecific.cpp
r23688 r23733 403 403 if (generalPage && systemPage && 404 404 generalPage->is64BitOSTypeSelected() && !systemPage->isHWVirtExEnabled()) 405 mMachine.SetHWVirtEx Enabled (true);405 mMachine.SetHWVirtExProperty(KHWVirtExPropertyType_Enabled, true); 406 406 407 407 #ifdef VBOX_WITH_VIDEOHWACCEL -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsSystem.cpp
r23263 r23733 178 178 /* VT-x/AMD-V */ 179 179 mCbVirt->setEnabled (fVTxAMDVSupported); 180 mCbVirt->setChecked (aMachine.GetHWVirtEx Enabled());180 mCbVirt->setChecked (aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_Enabled)); 181 181 182 182 /* Nested Paging */ 183 183 mCbNestedPaging->setEnabled (fVTxAMDVSupported && 184 aMachine.GetHWVirtEx Enabled());185 mCbNestedPaging->setChecked (aMachine.GetHWVirtEx NestedPagingEnabled());184 aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_Enabled)); 185 mCbNestedPaging->setChecked (aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPagingEnabled)); 186 186 187 187 if (mValidator) … … 231 231 232 232 /* VT-x/AMD-V */ 233 mMachine.SetHWVirtEx Enabled (mCbVirt->checkState() == Qt::Checked ||234 m SlCPU->value() > 1);233 mMachine.SetHWVirtExProperty(KHWVirtExPropertyType_Enabled, 234 mCbVirt->checkState() == Qt::Checked || mSlCPU->value() > 1); 235 235 236 236 /* Nested Paging */ 237 mMachine.SetHWVirtEx NestedPagingEnabled (mCbNestedPaging->isChecked());237 mMachine.SetHWVirtExProperty(KHWVirtExPropertyType_NestedPagingEnabled, mCbNestedPaging->isChecked()); 238 238 } 239 239 -
trunk/src/VBox/Main/ApplianceImpl.cpp
r23502 r23733 1245 1245 if (tmpCount > 1) 1246 1246 { 1247 rc = pNewMachine-> COMSETTER(HWVirtExEnabled)(TRUE);1247 rc = pNewMachine->SetHWVirtExProperty(HWVirtExPropertyType_Enabled, TRUE); 1248 1248 if (FAILED(rc)) throw rc; 1249 1249 -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r23720 r23733 259 259 /* hardware virtualization extensions */ 260 260 BOOL fHWVirtExEnabled; 261 hrc = pMachine-> COMGETTER(HWVirtExEnabled)(&fHWVirtExEnabled); H();261 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &fHWVirtExEnabled); H(); 262 262 if (cCpus > 1) /** @todo SMP: This isn't nice, but things won't work on mac otherwise. */ 263 263 fHWVirtExEnabled = TRUE; … … 326 326 } 327 327 328 /* HWVirtEx exclusive mode */ 329 BOOL fHWVirtExExclusive = true; 330 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Exclusive, &fHWVirtExExclusive); H(); 331 rc = CFGMR3InsertInteger(pHWVirtExt, "Exclusive", fHWVirtExExclusive); RC_CHECK(); 332 328 333 /* Nested paging (VT-x/AMD-V) */ 329 334 BOOL fEnableNestedPaging = false; 330 hrc = pMachine-> COMGETTER(HWVirtExNestedPagingEnabled)(&fEnableNestedPaging); H();331 rc = CFGMR3InsertInteger(p Root, "EnableNestedPaging", fEnableNestedPaging); RC_CHECK();335 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_NestedPagingEnabled, &fEnableNestedPaging); H(); 336 rc = CFGMR3InsertInteger(pHWVirtExt, "EnableNestedPaging", fEnableNestedPaging); RC_CHECK(); 332 337 333 338 /* VPID (VT-x) */ 334 339 BOOL fEnableVPID = false; 335 hrc = pMachine-> COMGETTER(HWVirtExVPIDEnabled)(&fEnableVPID); H();336 rc = CFGMR3InsertInteger(p Root, "EnableVPID", fEnableVPID); RC_CHECK();340 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_VPIDEnabled, &fEnableVPID); H(); 341 rc = CFGMR3InsertInteger(pHWVirtExt, "EnableVPID", fEnableVPID); RC_CHECK(); 337 342 338 343 /* Physical Address Extension (PAE) */ -
trunk/src/VBox/Main/MachineImpl.cpp
r23727 r23733 1297 1297 } 1298 1298 1299 STDMETHODIMP Machine::COMGETTER(HWVirtExEnabled)(BOOL *enabled)1300 {1301 if (!enabled)1302 return E_POINTER;1303 1304 AutoCaller autoCaller(this);1305 CheckComRCReturnRC(autoCaller.rc());1306 1307 AutoReadLock alock(this);1308 1309 *enabled = mHWData->mHWVirtExEnabled;1310 1311 return S_OK;1312 }1313 1314 STDMETHODIMP Machine::COMSETTER(HWVirtExEnabled)(BOOL enable)1315 {1316 AutoCaller autoCaller(this);1317 CheckComRCReturnRC(autoCaller.rc());1318 1319 AutoWriteLock alock(this);1320 1321 HRESULT rc = checkStateDependency(MutableStateDep);1322 CheckComRCReturnRC(rc);1323 1324 /** @todo check validity! */1325 1326 mHWData.backup();1327 mHWData->mHWVirtExEnabled = enable;1328 1329 return S_OK;1330 }1331 1332 STDMETHODIMP Machine::COMGETTER(HWVirtExNestedPagingEnabled)(BOOL *enabled)1333 {1334 if (!enabled)1335 return E_POINTER;1336 1337 AutoCaller autoCaller(this);1338 CheckComRCReturnRC(autoCaller.rc());1339 1340 AutoReadLock alock(this);1341 1342 *enabled = mHWData->mHWVirtExNestedPagingEnabled;1343 1344 return S_OK;1345 }1346 1347 STDMETHODIMP Machine::COMSETTER(HWVirtExNestedPagingEnabled)(BOOL enable)1348 {1349 AutoCaller autoCaller(this);1350 CheckComRCReturnRC(autoCaller.rc());1351 1352 AutoWriteLock alock(this);1353 1354 HRESULT rc = checkStateDependency(MutableStateDep);1355 CheckComRCReturnRC(rc);1356 1357 /** @todo check validity! */1358 1359 mHWData.backup();1360 mHWData->mHWVirtExNestedPagingEnabled = enable;1361 1362 return S_OK;1363 }1364 1365 STDMETHODIMP Machine::COMGETTER(HWVirtExVPIDEnabled)(BOOL *enabled)1366 {1367 if (!enabled)1368 return E_POINTER;1369 1370 AutoCaller autoCaller(this);1371 CheckComRCReturnRC(autoCaller.rc());1372 1373 AutoReadLock alock(this);1374 1375 *enabled = mHWData->mHWVirtExVPIDEnabled;1376 1377 return S_OK;1378 }1379 1380 STDMETHODIMP Machine::COMSETTER(HWVirtExVPIDEnabled)(BOOL enable)1381 {1382 AutoCaller autoCaller(this);1383 CheckComRCReturnRC(autoCaller.rc());1384 1385 AutoWriteLock alock(this);1386 1387 HRESULT rc = checkStateDependency(MutableStateDep);1388 CheckComRCReturnRC(rc);1389 1390 /** @todo check validity! */1391 1392 mHWData.backup();1393 mHWData->mHWVirtExVPIDEnabled = enable;1394 1395 return S_OK;1396 }1397 1398 1299 STDMETHODIMP Machine::GetHWVirtExProperty(HWVirtExPropertyType_T property, BOOL *aVal) 1399 1300 { … … 1434 1335 1435 1336 AutoWriteLock alock(this); 1337 1338 HRESULT rc = checkStateDependency(MutableStateDep); 1339 CheckComRCReturnRC(rc); 1436 1340 1437 1341 switch(property) -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r23727 r23733 770 770 <const name="Enabled" value="1"> 771 771 <desc> 772 HWVirtEx (VT-x/AMD-V) boolean property. 772 HWVirtEx (VT-x/AMD-V) boolean property. Note that in case such extensions are not available, 773 they will not be used. 773 774 </desc> 774 775 </const> … … 781 782 <const name="VPIDEnabled" value="3"> 782 783 <desc> 783 VT-x VPID boolean property. 784 VT-x VPID boolean property. Note that in case this extension is not available, 785 it will not be used. 784 786 </desc> 785 787 </const> 786 788 <const name="NestedPagingEnabled" value="4"> 787 789 <desc> 788 Nested Paging boolean property. 790 Nested Paging boolean property. Note that in case this extension is not available, 791 it will not be used. 789 792 </desc> 790 793 </const> … … 4042 4045 <interface 4043 4046 name="IMachine" extends="$unknown" 4044 uuid=" 160b0ccc-c3d6-4c1b-bbe9-39b1a732f833"4047 uuid="ff5155a9-da1e-4225-8829-2f9f105d4db2" 4045 4048 wsmap="managed" 4046 4049 > … … 4270 4273 </attribute> 4271 4274 4272 <attribute name="HWVirtExEnabled" type="boolean">4273 <desc>4274 This setting determines whether VirtualBox will try to make use of4275 the host CPU's hardware virtualization extensions such as Intel VT-x4276 and AMD-V. Note that in case such extensions are not available,4277 they will not be used.4278 </desc>4279 </attribute>4280 4281 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">4282 <desc>4283 This setting determines whether VirtualBox will try to make use of4284 the nested paging extension of Intel VT-x and AMD-V. Note that in case4285 such extensions are not available, they will not be used.4286 </desc>4287 </attribute>4288 4289 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">4290 <desc>4291 This setting determines whether VirtualBox will try to make use of4292 the VPID extension of Intel VT-x. Note that in case such extensions are4293 not available, they will not be used.4294 </desc>4295 </attribute>4296 4297 4275 <attribute name="PAEEnabled" type="boolean" default="false"> 4298 4276 <desc> -
trunk/src/VBox/Main/include/MachineImpl.h
r23727 r23733 535 535 STDMETHOD(COMSETTER(Accelerate2DVideoEnabled))(BOOL enabled); 536 536 STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings); 537 STDMETHOD(COMGETTER(HWVirtExEnabled))(BOOL *enabled);538 STDMETHOD(COMSETTER(HWVirtExEnabled))(BOOL enabled);539 STDMETHOD(COMGETTER(HWVirtExNestedPagingEnabled))(BOOL *enabled);540 STDMETHOD(COMSETTER(HWVirtExNestedPagingEnabled))(BOOL enabled);541 STDMETHOD(COMGETTER(HWVirtExVPIDEnabled))(BOOL *enabled);542 STDMETHOD(COMSETTER(HWVirtExVPIDEnabled))(BOOL enabled);543 537 STDMETHOD(COMGETTER(PAEEnabled))(BOOL *enabled); 544 538 STDMETHOD(COMSETTER(PAEEnabled))(BOOL enabled); -
trunk/src/VBox/VMM/HWACCM.cpp
r23638 r23733 331 331 PCFGMNODE pHWVirtExt = CFGMR3GetChild(pRoot, "HWVirtExt/"); 332 332 /* Nested paging: disabled by default. */ 333 rc = CFGMR3QueryBoolDef(p Root, "EnableNestedPaging", &pVM->hwaccm.s.fAllowNestedPaging, false);333 rc = CFGMR3QueryBoolDef(pHWVirtExt, "EnableNestedPaging", &pVM->hwaccm.s.fAllowNestedPaging, false); 334 334 AssertRC(rc); 335 335 336 336 /* VT-x VPID: disabled by default. */ 337 rc = CFGMR3QueryBoolDef(p Root, "EnableVPID", &pVM->hwaccm.s.vmx.fAllowVPID, false);337 rc = CFGMR3QueryBoolDef(pHWVirtExt, "EnableVPID", &pVM->hwaccm.s.vmx.fAllowVPID, false); 338 338 AssertRC(rc); 339 339 … … 387 387 * Default false for Mac OS X and Windows due to the higher risk of conflicts with other hypervisors. 388 388 */ 389 rc = CFGMR3QueryBoolDef(pHWVirtExt, "E nableGlobalInit", &pVM->hwaccm.s.fGlobalInit,389 rc = CFGMR3QueryBoolDef(pHWVirtExt, "Exclusive", &pVM->hwaccm.s.fGlobalInit, 390 390 #if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) 391 391 false
Note:
See TracChangeset
for help on using the changeset viewer.