Changeset 23727 in vbox for trunk/src/VBox/Main
- Timestamp:
- Oct 13, 2009 2:05:54 PM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r23703 r23727 185 185 mHWVirtExNestedPagingEnabled = false; 186 186 mHWVirtExVPIDEnabled = false; 187 mHWVirtExExclusive = true; 187 188 mPAEEnabled = false; 188 189 mPropertyServiceActive = false; … … 222 223 mHWVirtExNestedPagingEnabled != that.mHWVirtExNestedPagingEnabled || 223 224 mHWVirtExVPIDEnabled != that.mHWVirtExVPIDEnabled || 225 mHWVirtExExclusive != that.mHWVirtExExclusive || 224 226 mPAEEnabled != that.mPAEEnabled || 225 227 mCPUCount != that.mCPUCount || … … 1391 1393 mHWData->mHWVirtExVPIDEnabled = enable; 1392 1394 1395 return S_OK; 1396 } 1397 1398 STDMETHODIMP Machine::GetHWVirtExProperty(HWVirtExPropertyType_T property, BOOL *aVal) 1399 { 1400 if (!aVal) 1401 return E_POINTER; 1402 1403 AutoCaller autoCaller(this); 1404 CheckComRCReturnRC(autoCaller.rc()); 1405 1406 switch(property) 1407 { 1408 case HWVirtExPropertyType_Enabled: 1409 *aVal = mHWData->mHWVirtExEnabled; 1410 break; 1411 1412 case HWVirtExPropertyType_Exclusive: 1413 *aVal = mHWData->mHWVirtExExclusive; 1414 break; 1415 1416 case HWVirtExPropertyType_VPIDEnabled: 1417 *aVal = mHWData->mHWVirtExVPIDEnabled; 1418 break; 1419 1420 case HWVirtExPropertyType_NestedPagingEnabled: 1421 *aVal = mHWData->mHWVirtExNestedPagingEnabled; 1422 break; 1423 1424 default: 1425 return E_INVALIDARG; 1426 } 1427 return S_OK; 1428 } 1429 1430 STDMETHODIMP Machine::SetHWVirtExProperty(HWVirtExPropertyType_T property, BOOL aVal) 1431 { 1432 AutoCaller autoCaller(this); 1433 CheckComRCReturnRC(autoCaller.rc()); 1434 1435 AutoWriteLock alock(this); 1436 1437 switch(property) 1438 { 1439 case HWVirtExPropertyType_Enabled: 1440 mHWData.backup(); 1441 mHWData->mHWVirtExEnabled = aVal; 1442 break; 1443 1444 case HWVirtExPropertyType_Exclusive: 1445 mHWData.backup(); 1446 mHWData->mHWVirtExExclusive = aVal; 1447 break; 1448 1449 case HWVirtExPropertyType_VPIDEnabled: 1450 mHWData.backup(); 1451 mHWData->mHWVirtExVPIDEnabled = aVal; 1452 break; 1453 1454 case HWVirtExPropertyType_NestedPagingEnabled: 1455 mHWData.backup(); 1456 mHWData->mHWVirtExNestedPagingEnabled = aVal; 1457 break; 1458 1459 default: 1460 return E_INVALIDARG; 1461 } 1393 1462 return S_OK; 1394 1463 } … … 5195 5264 5196 5265 mHWData->mHWVirtExEnabled = data.fHardwareVirt; 5266 mHWData->mHWVirtExExclusive = data.fHardwareVirtExclusive; 5197 5267 mHWData->mHWVirtExNestedPagingEnabled = data.fNestedPaging; 5198 5268 mHWData->mHWVirtExVPIDEnabled = data.fVPID; … … 6141 6211 6142 6212 // CPU 6143 data.fHardwareVirt = !!mHWData->mHWVirtExEnabled; 6144 data.fNestedPaging = !!mHWData->mHWVirtExNestedPagingEnabled; 6145 data.fVPID = !!mHWData->mHWVirtExVPIDEnabled; 6146 data.fPAE = !!mHWData->mPAEEnabled; 6213 data.fHardwareVirt = !!mHWData->mHWVirtExEnabled; 6214 data.fHardwareVirtExclusive = !!mHWData->mHWVirtExExclusive; 6215 data.fNestedPaging = !!mHWData->mHWVirtExNestedPagingEnabled; 6216 data.fVPID = !!mHWData->mHWVirtExVPIDEnabled; 6217 data.fPAE = !!mHWData->mPAEEnabled; 6147 6218 6148 6219 data.cCPUs = mHWData->mCPUCount; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r23703 r23727 757 757 </enum> 758 758 759 <enum 760 name="HWVirtExPropertyType" 761 uuid="843794f2-f392-46a7-8ff4-a0857a9b4b32" 762 > 763 <desc> 764 HWVirtEx property type. This enumeration represents possible values of the 765 IMachine get- and setHWVirtExProperty methods. 766 </desc> 767 <const name="Null" value="0"> 768 <desc>Null value (never used by the API).</desc> 769 </const> 770 <const name="Enabled" value="1"> 771 <desc> 772 HWVirtEx (VT-x/AMD-V) boolean property. 773 </desc> 774 </const> 775 <const name="Exclusive" value="2"> 776 <desc> 777 Exclusive use of the VT extensions boolean property. When enabled VirtualBox assumes it can acquire full and exclusive access 778 to the VT-x or AMD-V feature of the host. To share these with other hypervisors you must disable this property. 779 </desc> 780 </const> 781 <const name="VPIDEnabled" value="3"> 782 <desc> 783 VT-x VPID boolean property. 784 </desc> 785 </const> 786 <const name="NestedPagingEnabled" value="4"> 787 <desc> 788 Nested Paging boolean property. 789 </desc> 790 </const> 791 </enum> 792 759 793 <enum 760 794 name="SessionType" … … 5002 5036 </method> 5003 5037 5038 <method name="getHWVirtExProperty" const="yes"> 5039 <desc> 5040 Returns the HWVirtEx boolean value of the specified property. 5041 5042 <result name="E_INVALIDARG"> 5043 Invalid property. 5044 </result> 5045 5046 </desc> 5047 <param name="property" type="HWVirtExPropertyType" dir="in"> 5048 <desc> 5049 Property type to query. 5050 </desc> 5051 </param> 5052 <param name="value" type="boolean" dir="return"> 5053 <desc> 5054 Property value. 5055 </desc> 5056 </param> 5057 </method> 5058 5059 <method name="setHWVirtExProperty"> 5060 <desc> 5061 Sets the HWVirtEx boolean value of the specified property. 5062 5063 <result name="E_INVALIDARG"> 5064 Invalid property. 5065 </result> 5066 5067 </desc> 5068 <param name="property" type="HWVirtExPropertyType" dir="in"> 5069 <desc> 5070 Property type to query. 5071 </desc> 5072 </param> 5073 <param name="value" type="boolean" dir="in"> 5074 <desc> 5075 Property value. 5076 </desc> 5077 </param> 5078 </method> 5079 5004 5080 <method name="saveSettings"> 5005 5081 <desc> -
trunk/src/VBox/Main/include/MachineImpl.h
r23599 r23727 286 286 ULONG mMonitorCount; 287 287 BOOL mHWVirtExEnabled; 288 BOOL mHWVirtExExclusive; 288 289 BOOL mHWVirtExNestedPagingEnabled; 289 290 BOOL mHWVirtExVPIDEnabled; … … 589 590 STDMETHOD(GetExtraData)(IN_BSTR aKey, BSTR *aValue); 590 591 STDMETHOD(SetExtraData)(IN_BSTR aKey, IN_BSTR aValue); 592 STDMETHOD(GetHWVirtExProperty)(HWVirtExPropertyType_T property, BOOL *aVal); 593 STDMETHOD(SetHWVirtExProperty)(HWVirtExPropertyType_T property, BOOL aVal); 591 594 STDMETHOD(SaveSettings)(); 592 595 STDMETHOD(DiscardSettings)(); -
trunk/src/VBox/Main/xml/Settings.cpp
r23643 r23727 1202 1202 : strVersion("2"), 1203 1203 fHardwareVirt(true), 1204 #if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) 1205 fHardwareVirtExclusive(false), 1206 #else 1207 fHardwareVirtExclusive(true), 1208 #endif 1204 1209 fNestedPaging(false), 1205 1210 fVPID(false), … … 1457 1462 const xml::ElementNode *pelmCPUChild; 1458 1463 if ((pelmCPUChild = pelmHwChild->findChildElement("HardwareVirtEx"))) 1464 { 1459 1465 pelmCPUChild->getAttributeValue("enabled", hw.fHardwareVirt); 1466 pelmCPUChild->getAttributeValue("exclusive", hw.fHardwareVirtExclusive); 1467 } 1460 1468 if ((pelmCPUChild = pelmHwChild->findChildElement("HardwareVirtExNestedPaging"))) 1461 1469 pelmCPUChild->getAttributeValue("enabled", hw.fNestedPaging); … … 2302 2310 pelmHardware->setAttribute("version", hw.strVersion); 2303 2311 2304 xml::ElementNode *pelmCPU = pelmHardware->createChild("CPU"); 2305 pelmCPU->createChild("HardwareVirtEx")->setAttribute("enabled", hw.fHardwareVirt); 2312 xml::ElementNode *pelmCPU = pelmHardware->createChild("CPU"); 2313 xml::ElementNode *pelmHwVirtEx = pelmCPU->createChild("HardwareVirtEx"); 2314 pelmHwVirtEx->setAttribute("enabled", hw.fHardwareVirt); 2315 pelmHwVirtEx->setAttribute("exclusive", hw.fHardwareVirtExclusive); 2306 2316 if (hw.fNestedPaging) 2307 2317 pelmCPU->createChild("HardwareVirtExNestedPaging")->setAttribute("enabled", hw.fNestedPaging); -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r23643 r23727 434 434 435 435 <xsd:complexType name="THWVirtExType"> 436 <xsd:attribute name="enabled" type="TTriStateBoolType" default="default"/> 436 <xsd:attribute name="enabled" type="TTriStateBoolType"/> 437 <xsd:attribute name="exclusive" type="xsd:boolean"/> 437 438 </xsd:complexType> 438 439 439 440 <xsd:complexType name="THWVirtExNestedPagingType"> 440 <xsd:attribute name="enabled" type="xsd:boolean" default="false"/>441 <xsd:attribute name="enabled" type="xsd:boolean"/> 441 442 </xsd:complexType> 442 443 443 444 <xsd:complexType name="THWVirtExVPIDType"> 444 <xsd:attribute name="enabled" type="xsd:boolean" default="false"/>445 <xsd:attribute name="enabled" type="xsd:boolean"/> 445 446 </xsd:complexType> 446 447 447 448 <xsd:complexType name="TPAEType"> 448 <xsd:attribute name="enabled" type="xsd:boolean" default="false"/>449 <xsd:attribute name="enabled" type="xsd:boolean"/> 449 450 </xsd:complexType> 450 451
Note:
See TracChangeset
for help on using the changeset viewer.