Changeset 101074 in vbox
- Timestamp:
- Sep 8, 2023 3:40:55 PM (19 months ago)
- svn:sync-xref-src-repo-rev:
- 159033
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp
r101064 r101074 375 375 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_Acceleration) 376 376 { 377 CPlatform comPlatform = comMachine.GetPlatform(); 378 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 379 switch (platformArch) 377 const CPlatform comPlatform = comMachine.GetPlatform(); 378 switch (comPlatform.GetArchitecture()) 380 379 { 381 380 case KPlatformArchitecture_x86: … … 417 416 } 418 417 #endif 418 419 419 default: 420 420 break; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r101072 r101074 746 746 if (fSuccess) 747 747 { 748 // Must update long mode CPU feature bit when os type changed: 749 CVirtualBox vbox = uiCommon().virtualBox(); 750 // Should we check global object getters? 751 const CGuestOSType &comNewType = vbox.GetGuestOSType(newGeneralData.m_strGuestOsTypeId); 752 753 CPlatform comPlatform = m_machine.GetPlatform(); 754 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 755 switch (platformArch) 748 /* Update long mode CPU feature bit when OS type changed: */ 749 const CPlatform comPlatform = m_machine.GetPlatform(); 750 switch (comPlatform.GetArchitecture()) 756 751 { 757 752 case KPlatformArchitecture_x86: 758 753 { 759 754 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 755 const CGuestOSType &comNewType = uiCommon().virtualBox().GetGuestOSType(newGeneralData.m_strGuestOsTypeId); 760 756 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_LongMode, comNewType.GetIs64Bit()); 761 757 fSuccess = comPlatformX86.isOk(); 758 /// @todo convey error info .. 762 759 break; 763 760 } … … 772 769 } 773 770 #endif 771 774 772 default: 775 773 break; 776 774 } 777 /// @todo convey error info ..778 775 } 779 776 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r101072 r101074 300 300 oldSystemData.m_cCPUCount = oldSystemData.m_fSupportedHwVirtEx ? m_machine.GetCPUCount() : 1; 301 301 oldSystemData.m_iCPUExecCap = m_machine.GetCPUExecutionCap(); 302 303 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 304 switch (platformArch) 302 switch (comPlatform.GetArchitecture()) 305 303 { 306 304 case KPlatformArchitecture_x86: 307 305 { 308 306 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 309 310 307 oldSystemData.m_fEnabledPAE = comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE); 311 308 oldSystemData.m_fEnabledNestedHwVirtEx = comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_HWVirt); … … 313 310 break; 314 311 } 315 316 312 #ifdef VBOX_WITH_VIRT_ARMV8 317 313 case KPlatformArchitecture_ARM: … … 1053 1049 fSuccess = m_machine.isOk(); 1054 1050 } 1055 1056 CPlatform comPlatform = m_machine.GetPlatform(); 1057 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 1058 switch (platformArch) 1059 { 1060 case KPlatformArchitecture_x86: 1061 { 1062 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 1063 1064 /* Save whether PAE is enabled: */ 1065 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledPAE != oldSystemData.m_fEnabledPAE) 1051 if (fSuccess) 1052 { 1053 const CPlatform comPlatform = m_machine.GetPlatform(); 1054 switch (comPlatform.GetArchitecture()) 1055 { 1056 case KPlatformArchitecture_x86: 1066 1057 { 1067 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_PAE, newSystemData.m_fEnabledNestedPaging); 1068 fSuccess = comPlatformX86.isOk(); 1069 /// @todo convey error info .. 1058 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 1059 1060 /* Save whether PAE is enabled: */ 1061 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledPAE != oldSystemData.m_fEnabledPAE) 1062 { 1063 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_PAE, newSystemData.m_fEnabledNestedPaging); 1064 fSuccess = comPlatformX86.isOk(); 1065 /// @todo convey error info .. 1066 } 1067 /* Save whether Nested HW Virt Ex is enabled: */ 1068 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledNestedHwVirtEx != oldSystemData.m_fEnabledNestedHwVirtEx) 1069 { 1070 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_HWVirt, newSystemData.m_fEnabledNestedPaging); 1071 fSuccess = comPlatformX86.isOk(); 1072 /// @todo convey error info .. 1073 } 1074 1075 break; 1070 1076 } 1071 /* Save whether Nested HW Virt Ex is enabled: */ 1072 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledNestedHwVirtEx != oldSystemData.m_fEnabledNestedHwVirtEx) 1077 1078 #ifdef VBOX_WITH_VIRT_ARMV8 1079 case KPlatformArchitecture_ARM: 1073 1080 { 1074 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_HWVirt, newSystemData.m_fEnabledNestedPaging); 1075 fSuccess = comPlatformX86.isOk(); 1076 /// @todo convey error info .. 1081 /** @todo BUGBUG ARM stuff goes here. */ 1082 break; 1077 1083 } 1078 1079 break;1080 }1081 1082 #ifdef VBOX_WITH_VIRT_ARMV81083 case KPlatformArchitecture_ARM:1084 {1085 /** @todo BUGBUG ARM stuff goes here. */1086 break;1087 }1088 1084 #endif 1089 default: 1090 break; 1091 } 1092 1085 1086 default: 1087 break; 1088 } 1089 } 1093 1090 /* Save CPU execution cap: */ 1094 1091 if (fSuccess && newSystemData.m_iCPUExecCap != oldSystemData.m_iCPUExecCap) … … 1128 1125 fSuccess = m_machine.isOk(); 1129 1126 } 1130 1131 CPlatform comPlatform = m_machine.GetPlatform(); 1132 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 1133 switch (platformArch) 1134 { 1135 case KPlatformArchitecture_x86: 1136 { 1137 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 1138 1139 /* Save whether the nested paging is enabled: */ 1140 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledNestedPaging != oldSystemData.m_fEnabledNestedPaging) 1127 if (fSuccess) 1128 { 1129 const CPlatform comPlatform = m_machine.GetPlatform(); 1130 switch (comPlatform.GetArchitecture()) 1131 { 1132 case KPlatformArchitecture_x86: 1141 1133 { 1142 comPlatformX86.SetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging, newSystemData.m_fEnabledNestedPaging); 1143 fSuccess = comPlatformX86.isOk(); 1144 /// @todo convey error info .. 1134 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 1135 1136 /* Save whether the nested paging is enabled: */ 1137 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledNestedPaging != oldSystemData.m_fEnabledNestedPaging) 1138 { 1139 comPlatformX86.SetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging, newSystemData.m_fEnabledNestedPaging); 1140 fSuccess = comPlatformX86.isOk(); 1141 /// @todo convey error info .. 1142 } 1143 1144 break; 1145 1145 } 1146 1146 1147 break;1148 }1149 1150 1147 #ifdef VBOX_WITH_VIRT_ARMV8 1151 case KPlatformArchitecture_ARM:1152 {1153 /** @todo BUGBUG ARM stuff goes here. */1154 break;1155 }1148 case KPlatformArchitecture_ARM: 1149 { 1150 /** @todo BUGBUG ARM stuff goes here. */ 1151 break; 1152 } 1156 1153 #endif 1157 default: 1158 break; 1159 } 1154 1155 default: 1156 break; 1157 } 1158 } 1160 1159 1161 1160 /* Show error message if necessary: */ -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp
r101064 r101074 1768 1768 /* Prepare report: */ 1769 1769 QStringList aReport; 1770 1771 KPlatformArchitecture const platformArch = comPlatform.GetArchitecture(); 1772 switch (platformArch) 1770 switch (comPlatform.GetArchitecture()) 1773 1771 { 1774 1772 case KPlatformArchitecture_x86: … … 1791 1789 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE)) 1792 1790 aReport << QApplication::translate("UIDetails", "PAE/NX", "details (system)"); 1791 1793 1792 break; 1794 1793 } … … 1801 1800 } 1802 1801 #endif 1802 1803 1803 default: 1804 1804 break; 1805 1805 } 1806 1807 1806 /* Paravirtualization Interface? */ 1808 1807 switch (comMachine.GetEffectiveParavirtProvider())
Note:
See TracChangeset
for help on using the changeset viewer.