- Timestamp:
- Dec 5, 2018 9:12:37 AM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r75958 r75959 468 468 if (pSystemPage) 469 469 { 470 /* Nested Paging: */ 471 if (pSystemPage->isNestedPagingEnabled()) 470 /* Nested Paging || Nested HW Virt Ex: */ 471 if ( pSystemPage->isNestedPagingEnabled() 472 || pSystemPage->isNestedHWVirtExEnabled()) 472 473 { 473 474 /* Enable HW Virt Ex if supported: */ … … 475 476 && !pSystemPage->isHWVirtExEnabled()) 476 477 m_machine.SetHWVirtExProperty(KHWVirtExPropertyType_Enabled, true); 478 } 479 480 /* Nested HW Virt Ex: */ 481 if (pSystemPage->isNestedHWVirtExEnabled()) 482 { 483 /* Enable Nested Paging if supported: */ 484 if ( pSystemPage->isHWVirtExSupported() 485 && !pSystemPage->isNestedPagingEnabled()) 486 m_machine.SetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging, true); 477 487 } 478 488 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r75958 r75959 72 72 /* Support flags: */ 73 73 : m_fSupportedPAE(false) 74 , m_fSupportedNestedHwVirtEx(false) 74 75 , m_fSupportedHwVirtEx(false) 75 76 , m_fSupportedNestedPaging(false) … … 86 87 , m_iCPUExecCap(-1) 87 88 , m_fEnabledPAE(false) 89 , m_fEnabledNestedHwVirtEx(false) 88 90 /* Acceleration data: */ 89 91 , m_paravirtProvider(KParavirtProvider_None) … … 98 100 /* Support flags: */ 99 101 && (m_fSupportedPAE == other.m_fSupportedPAE) 102 && (m_fSupportedNestedHwVirtEx == other.m_fSupportedNestedHwVirtEx) 100 103 && (m_fSupportedHwVirtEx == other.m_fSupportedHwVirtEx) 101 104 && (m_fSupportedNestedPaging == other.m_fSupportedNestedPaging) … … 112 115 && (m_iCPUExecCap == other.m_iCPUExecCap) 113 116 && (m_fEnabledPAE == other.m_fEnabledPAE) 117 && (m_fEnabledNestedHwVirtEx == other.m_fEnabledNestedHwVirtEx) 114 118 /* Acceleration data: */ 115 119 && (m_paravirtProvider == other.m_paravirtProvider) … … 126 130 /** Holds whether the PAE is supported. */ 127 131 bool m_fSupportedPAE; 132 /** Holds whether the Nested HW Virt Ex is supported. */ 133 bool m_fSupportedNestedHwVirtEx; 128 134 /** Holds whether the HW Virt Ex is supported. */ 129 135 bool m_fSupportedHwVirtEx; … … 152 158 /** Holds whether the PAE is enabled. */ 153 159 bool m_fEnabledPAE; 160 /** Holds whether the Nested HW Virt Ex is enabled. */ 161 bool m_fEnabledNestedHwVirtEx; 154 162 155 163 /** Holds the paravirtualization provider. */ … … 200 208 } 201 209 210 bool UIMachineSettingsSystem::isNestedHWVirtExSupported() const 211 { 212 AssertPtrReturn(m_pCache, false); 213 return m_pCache->base().m_fSupportedNestedHwVirtEx; 214 } 215 216 bool UIMachineSettingsSystem::isNestedHWVirtExEnabled() const 217 { 218 return m_pCheckBoxNestedVirtualization->isChecked(); 219 } 220 202 221 bool UIMachineSettingsSystem::isHIDEnabled() const 203 222 { … … 241 260 /* Gather support flags: */ 242 261 oldSystemData.m_fSupportedPAE = vboxGlobal().host().GetProcessorFeature(KProcessorFeature_PAE); 262 oldSystemData.m_fSupportedNestedHwVirtEx = vboxGlobal().host().GetProcessorFeature(KProcessorFeature_NestedHWVirt); 243 263 oldSystemData.m_fSupportedHwVirtEx = vboxGlobal().host().GetProcessorFeature(KProcessorFeature_HWVirtEx); 244 264 oldSystemData.m_fSupportedNestedPaging = vboxGlobal().host().GetProcessorFeature(KProcessorFeature_NestedPaging); … … 282 302 oldSystemData.m_iCPUExecCap = m_machine.GetCPUExecutionCap(); 283 303 oldSystemData.m_fEnabledPAE = m_machine.GetCPUProperty(KCPUPropertyType_PAE); 304 oldSystemData.m_fEnabledNestedHwVirtEx = m_machine.GetCPUProperty(KCPUPropertyType_HWVirt); 284 305 285 306 /* Gather old 'Acceleration' data: */ … … 330 351 m_pSliderCPUExecCap->setValue(oldSystemData.m_iCPUExecCap); 331 352 m_pCheckBoxPAE->setChecked(oldSystemData.m_fEnabledPAE); 353 m_pCheckBoxNestedVirtualization->setChecked(oldSystemData.m_fEnabledNestedHwVirtEx); 332 354 333 355 /* Load old 'Acceleration' data from the cache: */ … … 351 373 /* Gather support flags: */ 352 374 newSystemData.m_fSupportedPAE = m_pCache->base().m_fSupportedPAE; 375 newSystemData.m_fSupportedNestedHwVirtEx = isNestedHWVirtExSupported(); 353 376 newSystemData.m_fSupportedHwVirtEx = isHWVirtExSupported(); 354 377 newSystemData.m_fSupportedNestedPaging = isNestedPagingSupported(); … … 377 400 newSystemData.m_iCPUExecCap = m_pSliderCPUExecCap->value(); 378 401 newSystemData.m_fEnabledPAE = m_pCheckBoxPAE->isChecked(); 402 newSystemData.m_fEnabledNestedHwVirtEx = isNestedHWVirtExEnabled(); 379 403 380 404 /* Gather 'Acceleration' data: */ … … 516 540 { 517 541 message.second << tr("Lowering the processor execution cap may result in a decline in performance."); 542 } 543 } 544 545 /* Nested HW Virt Ex: */ 546 if (isNestedHWVirtExEnabled()) 547 { 548 /* HW Virt Ex test: */ 549 if (isHWVirtExSupported() && !isHWVirtExEnabled()) 550 { 551 message.second << tr( 552 "The hardware virtualization is not currently enabled in the Acceleration section of the System page. " 553 "This is needed to support nested hardware virtualization. " 554 "It will be enabled automatically if you confirm your changes."); 555 } 556 557 /* Nested Paging test: */ 558 if (isHWVirtExSupported() && isNestedPagingSupported() && !isNestedPagingEnabled()) 559 { 560 message.second << tr( 561 "The nested paging is not currently enabled in the Acceleration section of the System page. " 562 "This is needed to support nested hardware virtualization. " 563 "It will be enabled automatically if you confirm your changes."); 518 564 } 519 565 } … … 587 633 /* Configure navigation for 'acceleration' tab: */ 588 634 setTabOrder(m_pComboParavirtProvider, m_pCheckBoxPAE); 589 setTabOrder(m_pCheckBoxPAE, m_pCheckBoxVirtualization); 635 setTabOrder(m_pCheckBoxPAE, m_pCheckBoxNestedVirtualization); 636 setTabOrder(m_pCheckBoxNestedVirtualization, m_pCheckBoxVirtualization); 590 637 setTabOrder(m_pCheckBoxVirtualization, m_pCheckBoxNestedPaging); 591 638 } … … 655 702 m_pLabelCPUExtended->setEnabled(isMachineOffline()); 656 703 m_pCheckBoxPAE->setEnabled(isMachineOffline() && systemData.m_fSupportedPAE); 704 m_pCheckBoxNestedVirtualization->setEnabled( (systemData.m_fSupportedNestedHwVirtEx && isMachineOffline()) 705 || (systemData.m_fEnabledNestedHwVirtEx && isMachineOffline())); 657 706 658 707 /* Polish 'Acceleration' availability: */ … … 1025 1074 connect(m_pSliderCPUExecCap, SIGNAL(valueChanged(int)), this, SLOT(sltHandleCPUExecCapSliderChange())); 1026 1075 connect(m_pEditorCPUExecCap, SIGNAL(valueChanged(int)), this, SLOT(sltHandleCPUExecCapEditorChange())); 1076 connect(m_pCheckBoxNestedVirtualization, &QCheckBox::stateChanged, 1077 this, &UIMachineSettingsSystem::revalidate); 1027 1078 1028 1079 /* Configure 'Acceleration' connections: */ 1029 1080 connect(m_pCheckBoxVirtualization, &QCheckBox::stateChanged, 1030 1081 this, &UIMachineSettingsSystem::sltHandleHwVirtExToggle); 1082 connect(m_pCheckBoxNestedPaging, &QCheckBox::stateChanged, 1083 this, &UIMachineSettingsSystem::revalidate); 1031 1084 } 1032 1085 … … 1261 1314 fSuccess = m_machine.isOk(); 1262 1315 } 1316 /* Save whether Nested HW Virt Ex is enabled: */ 1317 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledNestedHwVirtEx != oldSystemData.m_fEnabledNestedHwVirtEx) 1318 { 1319 m_machine.SetCPUProperty(KCPUPropertyType_HWVirt, newSystemData.m_fEnabledNestedHwVirtEx); 1320 fSuccess = m_machine.isOk(); 1321 } 1263 1322 /* Save CPU execution cap: */ 1264 1323 if (fSuccess && newSystemData.m_iCPUExecCap != oldSystemData.m_iCPUExecCap) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h
r75958 r75959 49 49 /** Returns whether the Nested Paging is enabled. */ 50 50 bool isNestedPagingEnabled() const; 51 52 /** Returns whether the Nested HW Virt Ex is supported. */ 53 bool isNestedHWVirtExSupported() const; 54 /** Returns whether the Nested HW Virt Ex is enabled. */ 55 bool isNestedHWVirtExEnabled() const; 51 56 52 57 /** Returns whether the HID is enabled. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.ui
r75958 r75959 511 511 </widget> 512 512 </item> 513 <item row="5" column="0" colspan="3"> 513 <item row="5" column="1" colspan="2"> 514 <widget class="QCheckBox" name="m_pCheckBoxNestedVirtualization"> 515 <property name="whatsThis"> 516 <string>When checked, the nested hardware virtualization CPU feature will be exposed to the virtual machine.</string> 517 </property> 518 <property name="text"> 519 <string>Enable nested &VT-x/AMD-V</string> 520 </property> 521 </widget> 522 </item> 523 <item row="6" column="0" colspan="3"> 514 524 <spacer name="m_pSpacerVertical3"> 515 525 <property name="orientation">
Note:
See TracChangeset
for help on using the changeset viewer.