Changeset 10693 in vbox
- Timestamp:
- Jul 16, 2008 11:48:19 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 33410
- Location:
- trunk/src/VBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r10427 r10693 336 336 " [-pae on|off]\n" 337 337 " [-hwvirtex on|off|default]\n" 338 " [-nestedpaging on|off]\n" 338 339 " [-monitorcount <number>]\n" 339 340 " [-bioslogofadein on|off]\n" … … 982 983 RTPrintf("Hardw. virt.ext: %s\n", hwVirtExEnabled == TSBool_True ? "on" : "off"); 983 984 } 985 BOOL HWVirtExNestedPagingEnabled; 986 machine->COMGETTER(HWVirtExNestedPagingEnabled)(&HWVirtExNestedPagingEnabled); 987 if (details == VMINFO_MACHINEREADABLE) 988 RTPrintf("nestedpaging=\"%s\"\n", HWVirtExNestedPagingEnabled ? "on" : "off"); 989 else 990 RTPrintf("Nested Paging: %s\n", HWVirtExNestedPagingEnabled ? "on" : "off"); 984 991 985 992 MachineState_T machineState; … … 3749 3756 char *acpi = NULL; 3750 3757 char *hwvirtex = NULL; 3758 char *nestedpaging = NULL; 3751 3759 char *pae = NULL; 3752 3760 char *ioapic = NULL; … … 3874 3882 hwvirtex = argv[i]; 3875 3883 } 3884 else if (strcmp(argv[i], "-nestedpaging") == 0) 3885 { 3886 if (argc <= i + 1) 3887 return errorArgument("Missing argument to '%s'", argv[i]); 3888 i++; 3889 nestedpaging = argv[i]; 3890 } 3876 3891 else if (strcmp(argv[i], "-pae") == 0) 3877 3892 { … … 4496 4511 { 4497 4512 errorArgument("Invalid -hwvirtex argument '%s'", hwvirtex); 4513 rc = E_FAIL; 4514 break; 4515 } 4516 } 4517 if (nestedpaging) 4518 { 4519 if (strcmp(nestedpaging, "on") == 0) 4520 { 4521 CHECK_ERROR(machine, COMSETTER(HWVirtExNestedPagingEnabled)(true)); 4522 } 4523 else if (strcmp(nestedpaging, "off") == 0) 4524 { 4525 CHECK_ERROR(machine, COMSETTER(HWVirtExNestedPagingEnabled)(false)); 4526 } 4527 else 4528 { 4529 errorArgument("Invalid -nestedpaging argument '%s'", ioapic); 4498 4530 rc = E_FAIL; 4499 4531 break; -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r10372 r10693 174 174 } 175 175 #endif 176 177 /* Nested paging (VT-x/AMD-V) */ 178 BOOL fEnableNestedPaging = false; 179 hrc = pMachine->COMGETTER(HWVirtExNestedPagingEnabled)(&fEnableNestedPaging); H(); 180 rc = CFGMR3InsertInteger(pRoot, "EnableNestedPaging", fEnableNestedPaging); RC_CHECK(); 176 181 177 182 /* Physical Address Extension (PAE) */ -
trunk/src/VBox/Main/MachineImpl.cpp
r10595 r10693 189 189 mMonitorCount = 1; 190 190 mHWVirtExEnabled = TSBool_False; 191 mHWVirtExNestedPagingEnabled = true; 191 192 mPAEEnabled = false; 192 193 … … 216 217 mMonitorCount != that.mMonitorCount || 217 218 mHWVirtExEnabled != that.mHWVirtExEnabled || 219 mHWVirtExNestedPagingEnabled != that.mHWVirtExNestedPagingEnabled || 218 220 mPAEEnabled != that.mPAEEnabled || 219 221 mClipboardMode != that.mClipboardMode) … … 1116 1118 return S_OK; 1117 1119 } 1120 1121 STDMETHODIMP Machine::COMGETTER(HWVirtExNestedPagingEnabled)(BOOL *enabled) 1122 { 1123 if (!enabled) 1124 return E_POINTER; 1125 1126 AutoCaller autoCaller (this); 1127 CheckComRCReturnRC (autoCaller.rc()); 1128 1129 AutoReadLock alock (this); 1130 1131 *enabled = mHWData->mHWVirtExNestedPagingEnabled; 1132 1133 return S_OK; 1134 } 1135 1136 STDMETHODIMP Machine::COMSETTER(HWVirtExNestedPagingEnabled)(BOOL enable) 1137 { 1138 AutoCaller autoCaller (this); 1139 CheckComRCReturnRC (autoCaller.rc()); 1140 1141 AutoWriteLock alock (this); 1142 1143 HRESULT rc = checkStateDependency (MutableStateDep); 1144 CheckComRCReturnRC (rc); 1145 1146 /** @todo check validity! */ 1147 1148 mHWData.backup(); 1149 mHWData->mHWVirtExNestedPagingEnabled = enable; 1150 1151 return S_OK; 1152 } 1153 1118 1154 1119 1155 STDMETHODIMP Machine::COMGETTER(PAEEnabled)(BOOL *enabled) … … 4478 4514 { 4479 4515 /* default value in case the node is not there */ 4480 mHWData->mHWVirtExEnabled = TSBool_Default; 4481 mHWData->mPAEEnabled = false; 4516 mHWData->mHWVirtExEnabled = TSBool_Default; 4517 mHWData->mHWVirtExNestedPagingEnabled = true; 4518 mHWData->mPAEEnabled = false; 4482 4519 4483 4520 Key cpuNode = aNode.findKey ("CPU"); … … 4495 4532 mHWData->mHWVirtExEnabled = TSBool_Default; 4496 4533 } 4534 /* HardwareVirtExNestedPaging (optional, default is true) */ 4535 Key HWVirtExNestedPagingNode = cpuNode.findKey ("HardwareVirtExNestedPaging"); 4536 if (!HWVirtExNestedPagingNode.isNull()) 4537 { 4538 mHWData->mHWVirtExNestedPagingEnabled = HWVirtExNestedPagingNode.value <bool> ("enabled"); 4539 } 4540 4497 4541 /* PAE (optional, default is false) */ 4498 4542 Key PAENode = cpuNode.findKey ("PAE"); … … 5861 5905 hwVirtExNode.setStringValue ("enabled", value); 5862 5906 5907 /* Nested paging (optional, default is true) */ 5908 Key HWVirtExNestedPagingNode = cpuNode.createKey ("HardwareVirtExNestedPaging"); 5909 HWVirtExNestedPagingNode.setValue <bool> ("enabled", !!mHWData->mHWVirtExNestedPagingEnabled); 5910 5863 5911 /* PAE (optional, default is false) */ 5864 5912 Key PAENode = cpuNode.createKey ("PAE"); -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r10598 r10693 2511 2511 <interface 2512 2512 name="IMachine" extends="$unknown" 2513 uuid=" d6181581-e7c7-418a-b3b6-2da10b11a763"2513 uuid="9966d6d7-8bed-4f18-8553-2486f32957b3" 2514 2514 wsmap="managed" 2515 2515 > … … 2734 2734 </attribute> 2735 2735 2736 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="true"> 2737 <desc> 2738 This setting determines whether VirtualBox will try to make use of 2739 the nested paging extension of Intel VT-x and AMD-V. Note that in case 2740 such extensions are not available, they will not be used. 2741 </desc> 2742 </attribute> 2743 2736 2744 <attribute name="PAEEnabled" type="boolean" default="false"> 2737 2745 <desc> -
trunk/src/VBox/Main/include/MachineImpl.h
r10595 r10693 240 240 ULONG mMonitorCount; 241 241 TSBool_T mHWVirtExEnabled; 242 BOOL mHWVirtExNestedPagingEnabled; 242 243 BOOL mPAEEnabled; 243 244 … … 469 470 STDMETHOD(COMGETTER(HWVirtExEnabled))(TSBool_T *enabled); 470 471 STDMETHOD(COMSETTER(HWVirtExEnabled))(TSBool_T enabled); 472 STDMETHOD(COMGETTER(HWVirtExNestedPagingEnabled))(BOOL *enabled); 473 STDMETHOD(COMSETTER(HWVirtExNestedPagingEnabled))(BOOL enabled); 471 474 STDMETHOD(COMGETTER(PAEEnabled))(BOOL *enabled); 472 475 STDMETHOD(COMSETTER(PAEEnabled))(BOOL enabled); -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r8804 r10693 413 413 </xsd:complexType> 414 414 415 <xsd:complexType name="THWVirtExNestedPagingType"> 416 <xsd:attribute name="enabled" type="xsd:boolean" default="true"/> 417 </xsd:complexType> 418 415 419 <xsd:complexType name="TPAEType"> 416 420 <xsd:attribute name="enabled" type="xsd:boolean" default="false"/> … … 420 424 <xsd:sequence> 421 425 <xsd:element name="HardwareVirtEx" type="THWVirtExType" minOccurs="0"/> 426 <xsd:element name="HardwareVirtExNestedPaging" type="THWVirtExNestedPagingType" minOccurs="0"/> 422 427 <xsd:element name="PAE" type="TPAEType" minOccurs="0"/> 423 428 </xsd:sequence>
Note:
See TracChangeset
for help on using the changeset viewer.