Changeset 75958 in vbox
- Timestamp:
- Dec 5, 2018 8:51:25 AM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 5 edited
-
nls/VirtualBox_ru.ts (modified) (1 diff)
-
src/settings/UISettingsDialogSpecific.cpp (modified) (1 diff)
-
src/settings/machine/UIMachineSettingsSystem.cpp (modified) (17 diffs)
-
src/settings/machine/UIMachineSettingsSystem.h (modified) (3 diffs)
-
src/settings/machine/UIMachineSettingsSystem.ui (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_ru.ts
r75787 r75958 10928 10928 <message> 10929 10929 <source>Enable Nested Pa&ging</source> 10930 <translation>В&ключить Nested Paging</translation>10930 <translation>В&ключить Nested Paging</translation> 10931 10931 </message> 10932 10932 <message> -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r74942 r75958 464 464 pGeneralPage->is64BitOSTypeSelected() && !pSystemPage->isHWVirtExEnabled()) 465 465 m_machine.SetHWVirtExProperty(KHWVirtExPropertyType_Enabled, true); 466 467 /* System page fixes: */ 468 if (pSystemPage) 469 { 470 /* Nested Paging: */ 471 if (pSystemPage->isNestedPagingEnabled()) 472 { 473 /* Enable HW Virt Ex if supported: */ 474 if ( pSystemPage->isHWVirtExSupported() 475 && !pSystemPage->isHWVirtExEnabled()) 476 m_machine.SetHWVirtExProperty(KHWVirtExPropertyType_Enabled, true); 477 } 478 } 466 479 467 480 #ifdef VBOX_WITH_VIDEOHWACCEL -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r73159 r75958 73 73 : m_fSupportedPAE(false) 74 74 , m_fSupportedHwVirtEx(false) 75 , m_fSupportedNestedPaging(false) 75 76 /* Motherboard data: */ 76 77 , m_iMemorySize(-1) … … 98 99 && (m_fSupportedPAE == other.m_fSupportedPAE) 99 100 && (m_fSupportedHwVirtEx == other.m_fSupportedHwVirtEx) 101 && (m_fSupportedNestedPaging == other.m_fSupportedNestedPaging) 100 102 /* Motherboard data: */ 101 103 && (m_iMemorySize == other.m_iMemorySize) … … 126 128 /** Holds whether the HW Virt Ex is supported. */ 127 129 bool m_fSupportedHwVirtEx; 130 /** Holds whether the Nested Paging is supported. */ 131 bool m_fSupportedNestedPaging; 128 132 129 133 /** Holds the RAM size. */ … … 174 178 } 175 179 180 bool UIMachineSettingsSystem::isHWVirtExSupported() const 181 { 182 AssertPtrReturn(m_pCache, false); 183 return m_pCache->base().m_fSupportedHwVirtEx; 184 } 185 176 186 bool UIMachineSettingsSystem::isHWVirtExEnabled() const 177 187 { 178 188 return m_pCheckBoxVirtualization->isChecked(); 189 } 190 191 bool UIMachineSettingsSystem::isNestedPagingSupported() const 192 { 193 AssertPtrReturn(m_pCache, false); 194 return m_pCache->base().m_fSupportedNestedPaging; 195 } 196 197 bool UIMachineSettingsSystem::isNestedPagingEnabled() const 198 { 199 return m_pCheckBoxNestedPaging->isChecked(); 179 200 } 180 201 … … 221 242 oldSystemData.m_fSupportedPAE = vboxGlobal().host().GetProcessorFeature(KProcessorFeature_PAE); 222 243 oldSystemData.m_fSupportedHwVirtEx = vboxGlobal().host().GetProcessorFeature(KProcessorFeature_HWVirtEx); 244 oldSystemData.m_fSupportedNestedPaging = vboxGlobal().host().GetProcessorFeature(KProcessorFeature_NestedPaging); 223 245 224 246 /* Gather old 'Motherboard' data: */ … … 329 351 /* Gather support flags: */ 330 352 newSystemData.m_fSupportedPAE = m_pCache->base().m_fSupportedPAE; 331 newSystemData.m_fSupportedHwVirtEx = m_pCache->base().m_fSupportedHwVirtEx; 353 newSystemData.m_fSupportedHwVirtEx = isHWVirtExSupported(); 354 newSystemData.m_fSupportedNestedPaging = isNestedPagingSupported(); 332 355 333 356 /* Gather 'Motherboard' data: */ … … 357 380 /* Gather 'Acceleration' data: */ 358 381 newSystemData.m_paravirtProvider = (KParavirtProvider)m_pComboParavirtProvider->itemData(m_pComboParavirtProvider->currentIndex()).toInt(); 359 newSystemData.m_fEnabledHwVirtEx = m_pCheckBoxVirtualization->checkState() == Qt::Checked|| m_pSliderCPUCount->value() > 1;360 newSystemData.m_fEnabledNestedPaging = m_pCheckBoxNestedPaging->isChecked();382 newSystemData.m_fEnabledHwVirtEx = isHWVirtExEnabled() || m_pSliderCPUCount->value() > 1; 383 newSystemData.m_fEnabledNestedPaging = isNestedPagingEnabled(); 361 384 362 385 /* Cache new system data: */ … … 463 486 } 464 487 465 /* VCPU vs VT-x/AMD-V test: */ 466 if (m_pSliderCPUCount->value() > 1 && !m_pCheckBoxVirtualization->isChecked()) 467 { 468 message.second << tr( 469 "The hardware virtualization is not currently enabled in the Acceleration section of the System page. " 470 "This is needed to support more than one virtual processor. " 471 "It will be enabled automatically if you confirm your changes."); 488 /* VCPU: */ 489 if (m_pSliderCPUCount->value() > 1) 490 { 491 /* HW Virt Ex test: */ 492 if (isHWVirtExSupported() && !isHWVirtExEnabled()) 493 { 494 message.second << tr( 495 "The hardware virtualization is not currently enabled in the Acceleration section of the System page. " 496 "This is needed to support more than one virtual processor. " 497 "It will be enabled automatically if you confirm your changes."); 498 } 472 499 } 473 500 … … 496 523 messages << message; 497 524 } 525 498 526 /* Acceleration tab: */ 499 527 { … … 501 529 UIValidationMessage message; 502 530 message.first = VBoxGlobal::removeAccelMark(m_pTabWidgetSystem->tabText(2)); 503 /* VT-x/AMD-V capability test: */ 504 if (!vboxGlobal().host().GetProcessorFeature(KProcessorFeature_HWVirtEx) && m_pCheckBoxVirtualization->isChecked()) 531 532 /* HW Virt Ex test: */ 533 if (!isHWVirtExSupported() && isHWVirtExEnabled()) 505 534 { 506 535 message.second << tr( … … 510 539 fPass = false; 511 540 } 541 542 /* Nested Paging: */ 543 if (isNestedPagingEnabled()) 544 { 545 /* HW Virt Ex test: */ 546 if (isHWVirtExSupported() && !isHWVirtExEnabled()) 547 { 548 message.second << tr( 549 "The hardware virtualization is not currently enabled in the Acceleration section of the System page. " 550 "This is needed for nested paging support. " 551 "It will be enabled automatically if you confirm your changes."); 552 } 553 } 554 512 555 /* Serialize message: */ 513 556 if (!message.second.isEmpty()) … … 515 558 516 559 } 560 517 561 /* Return result: */ 518 562 return fPass; … … 613 657 614 658 /* Polish 'Acceleration' availability: */ 615 /* Enable the hardware virtulization related check-boxes if it is supported by the host system or616 * it is currently enabled in the vm (in this case check-box is enabled so that user could617 * uncheck it and that way disable the hardware virtualization. */618 setAccelerationCheckBoxesEnabled( (systemData.m_fSupportedHwVirtEx&& isMachineOffline())619 || (systemData.m_fEnabledHwVirtEx && isMachineOffline()));659 m_pCheckBoxVirtualization->setEnabled( (systemData.m_fSupportedHwVirtEx && isMachineOffline()) 660 || (systemData.m_fEnabledHwVirtEx && isMachineOffline())); 661 m_pCheckBoxNestedPaging->setEnabled( m_pCheckBoxVirtualization->isChecked() 662 && ( (systemData.m_fSupportedNestedPaging && isMachineOffline()) 663 || (systemData.m_fEnabledNestedPaging && isMachineOffline()))); 620 664 m_pLabelParavirtProvider->setEnabled(isMachineOffline()); 621 665 m_pComboParavirtProvider->setEnabled(isMachineOffline()); … … 737 781 m_pSliderCPUExecCap->setValue(m_pEditorCPUExecCap->value()); 738 782 m_pSliderCPUExecCap->blockSignals(false); 783 784 /* Revalidate: */ 785 revalidate(); 786 } 787 788 void UIMachineSettingsSystem::sltHandleHwVirtExToggle() 789 { 790 /* Update Nested Paging checkbox: */ 791 AssertPtrReturnVoid(m_pCache); 792 m_pCheckBoxNestedPaging->setEnabled( m_pCheckBoxVirtualization->isChecked() 793 && ( (m_pCache->base().m_fSupportedNestedPaging && isMachineOffline()) 794 || (m_pCache->base().m_fEnabledNestedPaging && isMachineOffline()))); 739 795 740 796 /* Revalidate: */ … … 944 1000 /* Configure widgets: */ 945 1001 #ifndef VBOX_WITH_RAW_MODE 946 /* Hide VT-x/AMD-Vcheckbox when raw-mode is not supported: */1002 /* Hide HW Virt Ex checkbox when raw-mode is not supported: */ 947 1003 m_pWidgetPlaceholder->setVisible(false); 948 1004 m_pCheckBoxVirtualization->setVisible(false); … … 971 1027 972 1028 /* Configure 'Acceleration' connections: */ 973 connect(m_pCheckBoxVirtualization, SIGNAL(stateChanged(int)), this, SLOT(revalidate())); 1029 connect(m_pCheckBoxVirtualization, &QCheckBox::stateChanged, 1030 this, &UIMachineSettingsSystem::sltHandleHwVirtExToggle); 974 1031 } 975 1032 … … 1257 1314 return fSuccess; 1258 1315 } 1259 1260 void UIMachineSettingsSystem::setAccelerationCheckBoxesEnabled(bool fEnabled)1261 {1262 m_pCheckBoxVirtualization->setEnabled(fEnabled);1263 m_pCheckBoxNestedPaging->setEnabled(fEnabled && m_pCheckBoxVirtualization->isChecked());1264 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h
r72677 r75958 40 40 ~UIMachineSettingsSystem(); 41 41 42 /** Returns whether the HW Virt Ex is supported. */ 43 bool isHWVirtExSupported() const; 42 44 /** Returns whether the HW Virt Ex is enabled. */ 43 45 bool isHWVirtExEnabled() const; 46 47 /** Returns whether the Nested Paging is supported. */ 48 bool isNestedPagingSupported() const; 49 /** Returns whether the Nested Paging is enabled. */ 50 bool isNestedPagingEnabled() const; 44 51 45 52 /** Returns whether the HID is enabled. */ … … 105 112 void sltHandleCPUExecCapEditorChange(); 106 113 114 /** Handles HW Virt Ex check-box toggling. */ 115 void sltHandleHwVirtExToggle(); 116 107 117 private: 108 118 … … 142 152 bool saveAccelerationData(); 143 153 144 /** Defines whether "hardware virtualization" and "nested paging" check-boxes145 * (but not the "Paravirtualization Interface" combo-box) is @a fEnabled. */146 void setAccelerationCheckBoxesEnabled(bool fEnabled);147 148 154 /** Holds the list of all possible boot items. */ 149 155 QList<KDeviceType> m_possibleBootItems; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.ui
r71943 r75958 674 674 </customwidgets> 675 675 <resources/> 676 <connections> 677 <connection> 678 <sender>m_pCheckBoxVirtualization</sender> 679 <signal>toggled(bool)</signal> 680 <receiver>m_pCheckBoxNestedPaging</receiver> 681 <slot>setEnabled(bool)</slot> 682 </connection> 683 </connections> 676 <connections/> 684 677 </ui>
Note:
See TracChangeset
for help on using the changeset viewer.

