Changeset 101064 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Sep 8, 2023 12:44:47 PM (15 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r101020 r101064 208 208 $(if $(VBOX_GUI_WITH_CUSTOMIZATIONS1),VBOX_GUI_WITH_CUSTOMIZATIONS1) \ 209 209 $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE) \ 210 $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,) 210 $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,) \ 211 $(if $(VBOX_WITH_VIRT_ARMV8),VBOX_WITH_VIRT_ARMV8,) 211 212 ifdef VBOX_WITH_DEBUGGER_GUI 212 213 VirtualBoxVM_DEFS += VBOX_WITH_DEBUGGER_GUI … … 263 264 $(if $(VBOX_WITH_SCREENSAVER_CONTROL),VBOX_WITH_SCREENSAVER_CONTROL) \ 264 265 $(if $(VBOX_WITH_SDS),VBOX_WITH_SDS,) \ 265 $(if $(VBOX_WITH_UPDATE_AGENT),VBOX_WITH_UPDATE_AGENT) 266 $(if $(VBOX_WITH_UPDATE_AGENT),VBOX_WITH_UPDATE_AGENT) \ 267 $(if $(VBOX_WITH_VIRT_ARMV8),VBOX_WITH_VIRT_ARMV8,) 266 268 ifdef VBOX_WITH_DEBUGGER_GUI 267 269 UICommon_DEFS += VBOX_WITH_DEBUGGER_GUI -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp
r101035 r101064 375 375 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_Acceleration) 376 376 { 377 CPlatform comPlatform = comMachine.GetPlatform(); 378 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 379 QStringList acceleration; 380 if (uiCommon().virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx)) 381 { 382 /* Nested Paging: */ 383 if (comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging)) 384 acceleration << QApplication::translate("UIDetails", "Nested Paging", "details (system)"); 385 } 386 /* Nested VT-x/AMD-V: */ 387 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_HWVirt)) 388 acceleration << QApplication::translate("UIDetails", "Nested VT-x/AMD-V", "details (system)"); 389 /* PAE/NX: */ 390 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE)) 391 acceleration << QApplication::translate("UIDetails", "PAE/NX", "details (system)"); 392 /* Paravirtualization provider: */ 393 switch (comMachine.GetEffectiveParavirtProvider()) 394 { 395 case KParavirtProvider_Minimal: acceleration << QApplication::translate("UIDetails", "Minimal Paravirtualization", "details (system)"); break; 396 case KParavirtProvider_HyperV: acceleration << QApplication::translate("UIDetails", "Hyper-V Paravirtualization", "details (system)"); break; 397 case KParavirtProvider_KVM: acceleration << QApplication::translate("UIDetails", "KVM Paravirtualization", "details (system)"); break; 398 default: break; 399 } 400 if (!acceleration.isEmpty()) 401 table << UITextTableLine(QApplication::translate("UIDetails", "Acceleration", "details (system)"), 402 acceleration.join(", ")); 377 CPlatform comPlatform = comMachine.GetPlatform(); 378 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 379 switch (platformArch) 380 { 381 case KPlatformArchitecture_x86: 382 { 383 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 384 QStringList acceleration; 385 if (uiCommon().virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx)) 386 { 387 /* Nested Paging: */ 388 if (comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging)) 389 acceleration << QApplication::translate("UIDetails", "Nested Paging", "details (system)"); 390 } 391 /* Nested VT-x/AMD-V: */ 392 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_HWVirt)) 393 acceleration << QApplication::translate("UIDetails", "Nested VT-x/AMD-V", "details (system)"); 394 /* PAE/NX: */ 395 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE)) 396 acceleration << QApplication::translate("UIDetails", "PAE/NX", "details (system)"); 397 398 /* Paravirtualization provider: */ 399 switch (comMachine.GetEffectiveParavirtProvider()) 400 { 401 case KParavirtProvider_Minimal: acceleration << QApplication::translate("UIDetails", "Minimal Paravirtualization", "details (system)"); break; 402 case KParavirtProvider_HyperV: acceleration << QApplication::translate("UIDetails", "Hyper-V Paravirtualization", "details (system)"); break; 403 case KParavirtProvider_KVM: acceleration << QApplication::translate("UIDetails", "KVM Paravirtualization", "details (system)"); break; 404 default: break; 405 } 406 if (!acceleration.isEmpty()) 407 table << UITextTableLine(QApplication::translate("UIDetails", "Acceleration", "details (system)"), 408 acceleration.join(", ")); 409 break; 410 } 411 412 #ifdef VBOX_WITH_VIRT_ARMV8 413 case KPlatformArchitecture_ARM: 414 { 415 /** @todo BUGBUG ARM stuff goes here. */ 416 break; 417 } 418 #endif 419 default: 420 break; 421 } 403 422 } 404 423 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r101035 r101064 54 54 #include "CPlatform.h" 55 55 #include "CPlatformX86.h" 56 #ifdef VBOX_WITH_VIRT_ARMV8 57 # include "CPlatformARM.h" 58 #endif 56 59 #include "CProgress.h" 57 60 … … 731 734 // Should we check global object getters? 732 735 const CGuestOSType &comNewType = vbox.GetGuestOSType(newGeneralData.m_strGuestOsTypeId); 733 CPlatform comPlatform = m_machine.GetPlatform(); 734 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 735 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_LongMode, comNewType.GetIs64Bit()); 736 fSuccess = comPlatformX86.isOk(); 736 737 CPlatform comPlatform = m_machine.GetPlatform(); 738 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 739 switch (platformArch) 740 { 741 case KPlatformArchitecture_x86: 742 { 743 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 744 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_LongMode, comNewType.GetIs64Bit()); 745 fSuccess = comPlatformX86.isOk(); 746 break; 747 } 748 749 #ifdef VBOX_WITH_VIRT_ARMV8 750 case KPlatformArchitecture_ARM: 751 { 752 CPlatformARM comPlatformARM = comPlatform.GetARM(); 753 /** @todo BUGBUG ARM stuff goes here. */ 754 fSuccess = comPlatformARM.isOk(); 755 break; 756 } 757 #endif 758 default: 759 break; 760 } 737 761 /// @todo convey error info .. 738 762 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r101035 r101064 272 272 273 273 CPlatform comPlatform = m_machine.GetPlatform(); 274 CPlatformX86 comPlatformX86 = comPlatform.GetX86();275 274 CFirmwareSettings comFirmwareSettings = m_machine.GetFirmwareSettings(); 276 275 CNvramStore comStoreLvl1 = m_machine.GetNonVolatileStore(); … … 301 300 oldSystemData.m_cCPUCount = oldSystemData.m_fSupportedHwVirtEx ? m_machine.GetCPUCount() : 1; 302 301 oldSystemData.m_iCPUExecCap = m_machine.GetCPUExecutionCap(); 303 oldSystemData.m_fEnabledPAE = comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE); 304 oldSystemData.m_fEnabledNestedHwVirtEx = comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_HWVirt); 302 303 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 304 switch (platformArch) 305 { 306 case KPlatformArchitecture_x86: 307 { 308 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 309 310 oldSystemData.m_fEnabledPAE = comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE); 311 oldSystemData.m_fEnabledNestedHwVirtEx = comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_HWVirt); 312 oldSystemData.m_fEnabledNestedPaging = comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging); 313 break; 314 } 315 316 #ifdef VBOX_WITH_VIRT_ARMV8 317 case KPlatformArchitecture_ARM: 318 { 319 /** @todo BUGBUG ARM stuff goes here. */ 320 break; 321 } 322 #endif 323 default: 324 break; 325 } 305 326 306 327 /* Gather old 'Acceleration' data: */ 307 328 oldSystemData.m_paravirtProvider = m_machine.GetParavirtProvider(); 308 oldSystemData.m_fEnabledNestedPaging = comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging);309 329 310 330 /* Cache old data: */ … … 1000 1020 fSuccess = m_machine.isOk(); 1001 1021 } 1002 /* Save whether PAE is enabled: */ 1003 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledPAE != oldSystemData.m_fEnabledPAE) 1004 { 1005 CPlatform comPlatform = m_machine.GetPlatform(); 1006 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 1007 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_PAE, newSystemData.m_fEnabledNestedPaging); 1008 fSuccess = comPlatformX86.isOk(); 1009 /// @todo convey error info .. 1010 } 1011 /* Save whether Nested HW Virt Ex is enabled: */ 1012 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledNestedHwVirtEx != oldSystemData.m_fEnabledNestedHwVirtEx) 1013 { 1014 CPlatform comPlatform = m_machine.GetPlatform(); 1015 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 1016 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_HWVirt, newSystemData.m_fEnabledNestedPaging); 1017 fSuccess = comPlatformX86.isOk(); 1018 /// @todo convey error info .. 1019 } 1022 1023 CPlatform comPlatform = m_machine.GetPlatform(); 1024 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 1025 switch (platformArch) 1026 { 1027 case KPlatformArchitecture_x86: 1028 { 1029 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 1030 1031 /* Save whether PAE is enabled: */ 1032 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledPAE != oldSystemData.m_fEnabledPAE) 1033 { 1034 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_PAE, newSystemData.m_fEnabledNestedPaging); 1035 fSuccess = comPlatformX86.isOk(); 1036 /// @todo convey error info .. 1037 } 1038 /* Save whether Nested HW Virt Ex is enabled: */ 1039 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledNestedHwVirtEx != oldSystemData.m_fEnabledNestedHwVirtEx) 1040 { 1041 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_HWVirt, newSystemData.m_fEnabledNestedPaging); 1042 fSuccess = comPlatformX86.isOk(); 1043 /// @todo convey error info .. 1044 } 1045 1046 break; 1047 } 1048 1049 #ifdef VBOX_WITH_VIRT_ARMV8 1050 case KPlatformArchitecture_ARM: 1051 { 1052 /** @todo BUGBUG ARM stuff goes here. */ 1053 break; 1054 } 1055 #endif 1056 default: 1057 break; 1058 } 1059 1020 1060 /* Save CPU execution cap: */ 1021 1061 if (fSuccess && newSystemData.m_iCPUExecCap != oldSystemData.m_iCPUExecCap) … … 1055 1095 fSuccess = m_machine.isOk(); 1056 1096 } 1057 /* Save whether the nested paging is enabled: */ 1058 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledNestedPaging != oldSystemData.m_fEnabledNestedPaging) 1059 { 1060 CPlatform comPlatform = m_machine.GetPlatform(); 1061 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 1062 comPlatformX86.SetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging, newSystemData.m_fEnabledNestedPaging); 1063 fSuccess = comPlatformX86.isOk(); 1064 /// @todo convey error info .. 1065 } 1066 1067 /* Show error message if necessary: */ 1068 if (!fSuccess) 1069 notifyOperationProgressError(UIErrorString::formatErrorInfo(m_machine)); 1097 1098 CPlatform comPlatform = m_machine.GetPlatform(); 1099 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 1100 switch (platformArch) 1101 { 1102 case KPlatformArchitecture_x86: 1103 { 1104 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 1105 1106 /* Save whether the nested paging is enabled: */ 1107 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledNestedPaging != oldSystemData.m_fEnabledNestedPaging) 1108 { 1109 comPlatformX86.SetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging, newSystemData.m_fEnabledNestedPaging); 1110 fSuccess = comPlatformX86.isOk(); 1111 /// @todo convey error info .. 1112 } 1113 1114 break; 1115 } 1116 1117 #ifdef VBOX_WITH_VIRT_ARMV8 1118 case KPlatformArchitecture_ARM: 1119 { 1120 /** @todo BUGBUG ARM stuff goes here. */ 1121 break; 1122 } 1123 #endif 1124 default: 1125 break; 1126 } 1127 1128 /* Show error message if necessary: */ 1129 if (!fSuccess) 1130 notifyOperationProgressError(UIErrorString::formatErrorInfo(m_machine)); 1070 1131 } 1071 1132 /* Return result: */ -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp
r101035 r101064 1765 1765 /* Acquire platform stuff: */ 1766 1766 CPlatform comPlatform = comMachine.GetPlatform(); 1767 CPlatformX86 comPlatformX86 = comPlatform.GetX86();1768 1767 1769 1768 /* Prepare report: */ 1770 1769 QStringList aReport; 1771 /* VT-x/AMD-V and Nested Paging? */ 1772 if (uiCommon().host().GetProcessorFeature(KProcessorFeature_HWVirtEx)) 1773 { 1774 /* VT-x/AMD-V? */ 1775 if (comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_Enabled)) 1776 { 1777 aReport << QApplication::translate("UIDetails", "VT-x/AMD-V", "details (system)"); 1778 /* Nested Paging? */ 1779 if (comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging)) 1780 aReport << QApplication::translate("UIDetails", "Nested Paging", "details (system)"); 1781 } 1782 } 1783 /* PAE/NX? */ 1784 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE)) 1785 aReport << QApplication::translate("UIDetails", "PAE/NX", "details (system)"); 1770 1771 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 1772 switch (platformArch) 1773 { 1774 case KPlatformArchitecture_x86: 1775 { 1776 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 1777 1778 /* VT-x/AMD-V and Nested Paging? */ 1779 if (uiCommon().host().GetProcessorFeature(KProcessorFeature_HWVirtEx)) 1780 { 1781 /* VT-x/AMD-V? */ 1782 if (comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_Enabled)) 1783 { 1784 aReport << QApplication::translate("UIDetails", "VT-x/AMD-V", "details (system)"); 1785 /* Nested Paging? */ 1786 if (comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging)) 1787 aReport << QApplication::translate("UIDetails", "Nested Paging", "details (system)"); 1788 } 1789 } 1790 /* PAE/NX? */ 1791 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE)) 1792 aReport << QApplication::translate("UIDetails", "PAE/NX", "details (system)"); 1793 break; 1794 } 1795 1796 #ifdef VBOX_WITH_VIRT_ARMV8 1797 case KPlatformArchitecture_ARM: 1798 { 1799 /** @todo BUGBUG ARM stuff goes here. */ 1800 break; 1801 } 1802 #endif 1803 default: 1804 break; 1805 } 1806 1786 1807 /* Paravirtualization Interface? */ 1787 1808 switch (comMachine.GetEffectiveParavirtProvider()) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r101035 r101064 283 283 /* Acquire platform stuff: */ 284 284 CPlatform comPlatform = m_machine.GetPlatform(); 285 CPlatformX86 comPlatformX86 = comPlatform.GetX86();286 285 CFirmwareSettings comFirmwareSettings = m_machine.GetFirmwareSettings(); 287 286 … … 382 381 dvdCtr.SetPortCount(1); 383 382 384 /* Turn on PAE, if recommended: */ 385 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_PAE, comGuestType.GetRecommendedPAE()); 386 387 /* Set the recommended triple fault behavior: */ 388 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_TripleFaultReset, comGuestType.GetRecommendedTFReset()); 383 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 384 switch (platformArch) 385 { 386 case KPlatformArchitecture_x86: 387 { 388 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 389 390 /* Turn on PAE, if recommended: */ 391 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_PAE, comGuestType.GetRecommendedPAE()); 392 393 /* Set the recommended triple fault behavior: */ 394 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_TripleFaultReset, comGuestType.GetRecommendedTFReset()); 395 396 /* Set HPET flag: */ 397 comPlatformX86.SetHPETEnabled(comGuestType.GetRecommendedHPET()); 398 break; 399 } 400 401 #ifdef VBOX_WITH_VIRT_ARMV8 402 case KPlatformArchitecture_ARM: 403 { 404 /** @todo BUGBUG ARM stuff goes here. */ 405 break; 406 } 407 #endif 408 default: 409 break; 410 } 389 411 390 412 /* Set recommended firmware type: */ … … 406 428 m_machine.AddUSBController("OHCI", KUSBControllerType_OHCI); 407 429 } 408 409 /* Set HPET flag: */410 comPlatformX86.SetHPETEnabled(comGuestType.GetRecommendedHPET());411 430 412 431 /* Set UTC flags: */
Note:
See TracChangeset
for help on using the changeset viewer.