Changeset 47991 in vbox
- Timestamp:
- Aug 22, 2013 2:31:52 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 88315
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/user_VBoxManage.xml
r47859 r47991 326 326 Time offset: 0 ms 327 327 Hardw. virt.ext: on 328 Hardw. virt.ext exclusive: on329 328 Nested Paging: on 330 329 VT-x VPID: off … … 581 580 (Intel VT-x or AMD-V) in the processor of your host system; see 582 581 <xref linkend="hwvirt" />.</para> 583 </listitem>584 585 <listitem>586 <para><computeroutput>--hwvirtexexcl on|off</computeroutput>: This587 specifies whether VirtualBox will make exclusive use of the588 hardware virtualization extensions (Intel VT-x or AMD-V) in the589 processor of your host system; see <xref linkend="hwvirt" />. If590 you wish to simultaneously share these extensions with other591 hypervisors, then you must disable this setting. Doing so has592 negative performance implications.</para>593 582 </listitem> 594 583 … … 2486 2475 2487 2476 <glossentry> 2477 <glossterm><computeroutput>hwvirtexclusive</computeroutput></glossterm> 2478 <para>This specifies whether VirtualBox will make exclusive use of 2479 the hardware virtualization extensions (Intel VT-x or AMD-V) of the 2480 host system's processor; see <xref linkend="hwvirt" />. If you wish to 2481 share these extensions with other hypervisors running at the same time, 2482 you must disable this setting. Doing so has negative performance implications. 2483 </para> 2484 </glossentry> 2485 2486 2487 <glossentry> 2488 2488 <glossterm><computeroutput>vrdeauthlibrary</computeroutput></glossterm> 2489 2489 -
trunk/include/VBox/settings.h
r47503 r47991 277 277 com::Utf8Str strLoggingLevel; 278 278 uint32_t ulLogHistoryCount; 279 bool fExclusiveHwVirt; 279 280 }; 280 281 … … 841 842 842 843 bool fHardwareVirt, 843 fHardwareVirtExclusive,844 844 fNestedPaging, 845 845 fLargePages, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r47918 r47991 179 179 " [--hpet on|off]\n" 180 180 " [--hwvirtex on|off]\n" 181 " [--hwvirtexexcl on|off]\n"182 181 " [--nestedpaging on|off]\n" 183 182 " [--largepages on|off]\n" … … 635 634 RTStrmPrintf(pStrm, 636 635 "%s setproperty %s machinefolder default|<folder> |\n" 636 " hwvirtexclusive on|off |\n" 637 637 " vrdeauthlibrary default|<library> |\n" 638 638 " websrvauthlibrary default|null|<library> |\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r47908 r47991 672 672 SHOW_BOOLEAN_PROP_EX(machine, RTCUseUTC, "rtcuseutc", "RTC", "UTC", "local time"); 673 673 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &f), "hwvirtex", "Hardw. virt.ext"); 674 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_Exclusive, &f), "hwvirtexexcl", "Hardw. virt.ext exclusive");675 674 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, &f),"nestedpaging", "Nested Paging"); 676 675 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_LargePages, &f), "largepages", "Large Pages"); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r47908 r47991 525 525 ULONG ulValue; 526 526 LONG64 i64Value; 527 BOOL fValue; 527 528 528 529 pVirtualBox->COMGETTER(APIVersion)(str.asOutParam()); … … 607 608 systemProperties->COMGETTER(DefaultMachineFolder)(str.asOutParam()); 608 609 RTPrintf("Default machine folder: %ls\n", str.raw()); 610 systemProperties->COMGETTER(ExclusiveHwVirt)(&fValue); 611 RTPrintf("Exclusive HW virtualization use: %ls\n", fValue ? L"on" : L"off"); 609 612 systemProperties->COMGETTER(DefaultHardDiskFormat)(str.asOutParam()); 610 613 RTPrintf("Default hard disk format: %ls\n", str.raw()); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
r47908 r47991 824 824 CHECK_ERROR(systemProperties, COMSETTER(DefaultMachineFolder)(Bstr(a->argv[1]).raw())); 825 825 } 826 else if (!strcmp(a->argv[0], "hwvirtexclusive")) 827 { 828 bool fHwVirtExclusive; 829 830 if (!strcmp(a->argv[1], "on")) 831 fHwVirtExclusive = true; 832 else if (!strcmp(a->argv[1], "off")) 833 fHwVirtExclusive = false; 834 else 835 return errorArgument("Invalid hwvirtexclusive argument '%s'", a->argv[1]); 836 CHECK_ERROR(systemProperties, COMSETTER(ExclusiveHwVirt)(fHwVirtExclusive)); 837 } 826 838 else if ( !strcmp(a->argv[0], "vrdeauthlibrary") 827 839 || !strcmp(a->argv[0], "vrdpauthlibrary")) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r47934 r47991 62 62 MODIFYVM_SYNTHCPU, 63 63 MODIFYVM_HWVIRTEX, 64 MODIFYVM_HWVIRTEXEXCLUSIVE,65 64 MODIFYVM_NESTEDPAGING, 66 65 MODIFYVM_LARGEPAGES, … … 224 223 { "--synthcpu", MODIFYVM_SYNTHCPU, RTGETOPT_REQ_BOOL_ONOFF }, 225 224 { "--hwvirtex", MODIFYVM_HWVIRTEX, RTGETOPT_REQ_BOOL_ONOFF }, 226 { "--hwvirtexexcl", MODIFYVM_HWVIRTEXEXCLUSIVE, RTGETOPT_REQ_BOOL_ONOFF },227 225 { "--nestedpaging", MODIFYVM_NESTEDPAGING, RTGETOPT_REQ_BOOL_ONOFF }, 228 226 { "--largepages", MODIFYVM_LARGEPAGES, RTGETOPT_REQ_BOOL_ONOFF }, … … 632 630 } 633 631 634 case MODIFYVM_HWVIRTEXEXCLUSIVE:635 {636 CHECK_ERROR(machine, SetHWVirtExProperty(HWVirtExPropertyType_Exclusive, ValueUnion.f));637 break;638 }639 640 632 case MODIFYVM_SETCPUID: 641 633 { -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r47922 r47991 954 954 <enum 955 955 name="HWVirtExPropertyType" 956 uuid=" 39463ecd-b4b8-401f-b168-76cfa87e11f0"956 uuid="411ad0ea-aeeb-44cb-9d03-1624d0d025ac" 957 957 > 958 958 <desc> … … 970 970 </desc> 971 971 </const> 972 <const name="Exclusive" value="2"> 973 <desc> 974 Whether hardware virtualization is used exclusively by VirtualBox. When enabled, 975 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V 976 feature of the host. To share these with other hypervisors, you must disable this property. 977 </desc> 978 </const> 979 <const name="VPID" value="3"> 972 <const name="VPID" value="2"> 980 973 <desc> 981 974 Whether VT-x VPID is enabled. If this extension is not available, it will not be used. 982 975 </desc> 983 976 </const> 984 <const name="NestedPaging" value=" 4">977 <const name="NestedPaging" value="3"> 985 978 <desc> 986 979 Whether Nested Paging is enabled. If this extension is not available, it will not be used. 987 980 </desc> 988 981 </const> 989 <const name="UnrestrictedExecution" value=" 5">982 <const name="UnrestrictedExecution" value="4"> 990 983 <desc> 991 984 Whether VT-x unrestricted execution is enabled. If this feature is not available, it will not be used. 992 985 </desc> 993 986 </const> 994 <const name="LargePages" value=" 6">987 <const name="LargePages" value="5"> 995 988 <desc> 996 989 Whether large page allocation is enabled; requires nested paging and a 64-bit host. 997 990 </desc> 998 991 </const> 999 <const name="Force" value=" 7">992 <const name="Force" value="6"> 1000 993 <desc> 1001 994 Whether the VM should fail to start if hardware virtualization (VT-x/AMD-V) cannot be used. If … … 8728 8721 name="ISystemProperties" 8729 8722 extends="$unknown" 8730 uuid=" 856be1bc-0525-46b1-a27a-fe17d9a4939f"8723 uuid="1254a96a-ae57-4484-946a-22d86c1f98af" 8731 8724 wsmap="managed" 8732 8725 > … … 8793 8786 possible to include all possible devices to the boot list. 8794 8787 <see><link to="IMachine::setBootOrder"/></see> 8788 </desc> 8789 </attribute> 8790 8791 <attribute name="exclusiveHwVirt" type="boolean"> 8792 <desc> 8793 Exclusive use of hardware virtualization by VirtualBox. When enabled, 8794 VirtualBox assumes it can obtain full and exclusive access to the VT-x 8795 or AMD-V feature of the host. To share hardware virtualization with 8796 other hypervisors, this property must be disabled. 8795 8797 </desc> 8796 8798 </attribute> -
trunk/src/VBox/Main/include/MachineImpl.h
r47561 r47991 270 270 ULONG mMonitorCount; 271 271 BOOL mHWVirtExEnabled; 272 BOOL mHWVirtExExclusive;273 272 BOOL mHWVirtExNestedPagingEnabled; 274 273 BOOL mHWVirtExLargePagesEnabled; -
trunk/src/VBox/Main/include/SystemPropertiesImpl.h
r47401 r47991 70 70 STDMETHOD(COMGETTER(ParallelPortCount))(ULONG *count); 71 71 STDMETHOD(COMGETTER(MaxBootPosition))(ULONG *aMaxBootPosition); 72 STDMETHOD(COMGETTER(ExclusiveHwVirt))(BOOL *aExclusiveHwVirt); 73 STDMETHOD(COMSETTER(ExclusiveHwVirt))(BOOL aExclusiveHwVirt); 72 74 STDMETHOD(COMGETTER(LoggingLevel))(BSTR *aLoggingLevel); 73 75 STDMETHOD(COMSETTER(LoggingLevel))(IN_BSTR aLoggingLevel); -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r47841 r47991 988 988 /* HWVirtEx exclusive mode */ 989 989 BOOL fHMExclusive = true; 990 hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Exclusive, &fHMExclusive);H();990 hrc = systemProperties->COMGETTER(ExclusiveHwVirt)(&fHMExclusive); H(); 991 991 InsertConfigInteger(pHM, "Exclusive", fHMExclusive); 992 992 -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r47916 r47991 181 181 mHWVirtExUXEnabled = true; 182 182 mHWVirtExForceEnabled = false; 183 #if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)184 mHWVirtExExclusive = false;185 #else186 mHWVirtExExclusive = true;187 #endif188 183 #if HC_ARCH_BITS == 64 || defined(RT_OS_WINDOWS) || defined(RT_OS_DARWIN) 189 184 mPAEEnabled = true; … … 2540 2535 break; 2541 2536 2542 case HWVirtExPropertyType_Exclusive:2543 *aVal = mHWData->mHWVirtExExclusive;2544 break;2545 2546 2537 case HWVirtExPropertyType_VPID: 2547 2538 *aVal = mHWData->mHWVirtExVPIDEnabled; … … 2589 2580 mHWData.backup(); 2590 2581 mHWData->mHWVirtExEnabled = !!aVal; 2591 break;2592 2593 case HWVirtExPropertyType_Exclusive:2594 setModified(IsModified_MachineData);2595 mHWData.backup();2596 mHWData->mHWVirtExExclusive = !!aVal;2597 2582 break; 2598 2583 … … 9159 9144 9160 9145 mHWData->mHWVirtExEnabled = data.fHardwareVirt; 9161 mHWData->mHWVirtExExclusive = data.fHardwareVirtExclusive;9162 9146 mHWData->mHWVirtExNestedPagingEnabled = data.fNestedPaging; 9163 9147 mHWData->mHWVirtExLargePagesEnabled = data.fLargePages; … … 10484 10468 // CPU 10485 10469 data.fHardwareVirt = !!mHWData->mHWVirtExEnabled; 10486 data.fHardwareVirtExclusive = !!mHWData->mHWVirtExExclusive;10487 10470 data.fNestedPaging = !!mHWData->mHWVirtExNestedPagingEnabled; 10488 10471 data.fLargePages = !!mHWData->mHWVirtExLargePagesEnabled; -
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r47593 r47991 98 98 99 99 m->ulLogHistoryCount = 3; 100 101 102 /* On Windows and OS X, HW virtualization use isn't exclusive by 103 * default so that VT-x or AMD-V can be shared with other 104 * hypervisors without requiring user intervention. 105 */ 106 #if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) 107 m->fExclusiveHwVirt = false; 108 #else 109 m->fExclusiveHwVirt = true; 110 #endif 100 111 101 112 HRESULT rc = S_OK; … … 314 325 } 315 326 327 328 STDMETHODIMP SystemProperties::COMGETTER(ExclusiveHwVirt)(BOOL *aExclusiveHwVirt) 329 { 330 CheckComArgOutPointerValid(aExclusiveHwVirt); 331 332 AutoCaller autoCaller(this); 333 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 334 335 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 336 337 *aExclusiveHwVirt = m->fExclusiveHwVirt; 338 339 return S_OK; 340 } 341 342 STDMETHODIMP SystemProperties::COMSETTER(ExclusiveHwVirt)(BOOL aExclusiveHwVirt) 343 { 344 AutoCaller autoCaller(this); 345 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 346 347 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 348 m->fExclusiveHwVirt = !!aExclusiveHwVirt; 349 alock.release(); 350 351 // VirtualBox::saveSettings() needs vbox write lock 352 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS); 353 HRESULT rc = mParent->saveSettings(); 354 355 return rc; 356 } 316 357 317 358 STDMETHODIMP SystemProperties::GetMaxNetworkAdapters(ChipsetType_T aChipset, ULONG *count) … … 1126 1167 1127 1168 m->ulLogHistoryCount = data.ulLogHistoryCount; 1169 m->fExclusiveHwVirt = data.fExclusiveHwVirt; 1128 1170 1129 1171 rc = setAutostartDatabasePath(data.strAutostartDatabasePath); -
trunk/src/VBox/Main/xml/Settings.cpp
r47917 r47991 1440 1440 pelmGlobalChild->getAttributeValue("autostartDatabasePath", systemProperties.strAutostartDatabasePath); 1441 1441 pelmGlobalChild->getAttributeValue("defaultFrontend", systemProperties.strDefaultFrontend); 1442 pelmGlobalChild->getAttributeValue("exclusiveHwVirt", systemProperties.fExclusiveHwVirt); 1442 1443 } 1443 1444 else if (pelmGlobalChild->nameEquals("ExtraData")) … … 1507 1508 } 1508 1509 1510 1509 1511 /** 1510 1512 * Called from the IVirtualBox interface to write out VirtualBox.xml. This … … 1654 1656 if (systemProperties.strDefaultFrontend.length()) 1655 1657 pelmSysProps->setAttribute("defaultFrontend", systemProperties.strDefaultFrontend); 1658 pelmSysProps->setAttribute("exclusiveHwVirt", systemProperties.fExclusiveHwVirt); 1656 1659 1657 1660 buildUSBDeviceFilters(*pelmGlobal->createChild("USBDeviceFilters"), … … 1840 1843 } 1841 1844 1842 // use a define for the platform-dependent default value of1843 // hwvirt exclusivity, since we'll need to check that value1844 // in bumpSettingsVersionIfNeeded()1845 #if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)1846 #define HWVIRTEXCLUSIVEDEFAULT false1847 #else1848 #define HWVIRTEXCLUSIVEDEFAULT true1849 #endif1850 1851 1845 Hardware::Hardware() 1852 1846 : strVersion("1"), 1853 1847 fHardwareVirt(true), 1854 fHardwareVirtExclusive(HWVIRTEXCLUSIVEDEFAULT),1855 1848 fNestedPaging(true), 1856 1849 fVPID(true), … … 1923 1916 && (uuid == h.uuid) 1924 1917 && (fHardwareVirt == h.fHardwareVirt) 1925 && (fHardwareVirtExclusive == h.fHardwareVirtExclusive)1926 1918 && (fNestedPaging == h.fNestedPaging) 1927 1919 && (fLargePages == h.fLargePages) … … 2653 2645 { 2654 2646 pelmCPUChild->getAttributeValue("enabled", hw.fHardwareVirt); 2655 pelmCPUChild->getAttributeValue("exclusive", hw.fHardwareVirtExclusive); // settings version 1.92656 2647 } 2657 2648 if ((pelmCPUChild = pelmHwChild->findChildElement("HardwareVirtExNestedPaging"))) … … 3925 3916 xml::ElementNode *pelmHwVirtEx = pelmCPU->createChild("HardwareVirtEx"); 3926 3917 pelmHwVirtEx->setAttribute("enabled", hw.fHardwareVirt); 3927 if (m->sv >= SettingsVersion_v1_9)3928 pelmHwVirtEx->setAttribute("exclusive", hw.fHardwareVirtExclusive);3929 3918 3930 3919 pelmCPU->createChild("HardwareVirtExNestedPaging")->setAttribute("enabled", hw.fNestedPaging); … … 5676 5665 if ( (m->sv < SettingsVersion_v1_9) 5677 5666 && ( (hardwareMachine.firmwareType >= FirmwareType_EFI) 5678 || (hardwareMachine.fHardwareVirtExclusive != HWVIRTEXCLUSIVEDEFAULT)5679 5667 || machineUserData.fTeleporterEnabled 5680 5668 || machineUserData.uTeleporterPort
Note:
See TracChangeset
for help on using the changeset viewer.