Changeset 101035 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Sep 7, 2023 8:59:15 AM (15 months ago)
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
r99604 r101035 1016 1016 break; 1017 1017 } 1018 CHECK_ERROR_RET(systemProperties, GetMaxPortCountForStorageBus(enmStorageBus, &maxPorts), 1019 RTEXITCODE_FAILURE); 1018 1019 PlatformArchitecture_T platformArch = PlatformArchitecture_x86; /** @todo BUGBUG Appliances only handle x86 so far! */ 1020 1021 ComPtr<IPlatformProperties> pPlatformProperties; 1022 CHECK_ERROR_RET(pVirtualBox, GetPlatformProperties(platformArch, pPlatformProperties.asOutParam()), 1023 RTEXITCODE_FAILURE); 1024 1025 CHECK_ERROR_RET(pPlatformProperties, GetMaxPortCountForStorageBus(enmStorageBus, &maxPorts), 1026 RTEXITCODE_FAILURE); 1020 1027 if (uTargetControllerPort >= maxPorts) 1021 1028 return errorSyntax(Appliance::tr("Illegal port value: %u. For %ls controllers the only valid values are 0 to %lu (inclusive)"), -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r99775 r101035 805 805 setCurrentSubcommand(HELP_SCOPE_CONTROLVM_SETLINKSTATE); 806 806 /* Get the number of network adapters */ 807 ULONG NetworkAdapterCount = getMaxNics( a->virtualBox,sessionMachine);807 ULONG NetworkAdapterCount = getMaxNics(sessionMachine); 808 808 unsigned n = parseNum(&a->argv[1][12], NetworkAdapterCount, "NIC"); 809 809 if (!n) … … 843 843 setCurrentSubcommand(HELP_SCOPE_CONTROLVM_NICTRACEFILE); 844 844 /* Get the number of network adapters */ 845 ULONG NetworkAdapterCount = getMaxNics( a->virtualBox,sessionMachine);845 ULONG NetworkAdapterCount = getMaxNics(sessionMachine); 846 846 unsigned n = parseNum(&a->argv[1][12], NetworkAdapterCount, "NIC"); 847 847 if (!n) … … 887 887 setCurrentSubcommand(HELP_SCOPE_CONTROLVM_NICTRACE); 888 888 /* Get the number of network adapters */ 889 ULONG NetworkAdapterCount = getMaxNics( a->virtualBox,sessionMachine);889 ULONG NetworkAdapterCount = getMaxNics(sessionMachine); 890 890 unsigned n = parseNum(&a->argv[1][8], NetworkAdapterCount, "NIC"); 891 891 if (!n) … … 928 928 { 929 929 /* Get the number of network adapters */ 930 ULONG NetworkAdapterCount = getMaxNics( a->virtualBox,sessionMachine);930 ULONG NetworkAdapterCount = getMaxNics(sessionMachine); 931 931 unsigned n = parseNum(&a->argv[1][5], NetworkAdapterCount, "NIC"); 932 932 if (!n) … … 1022 1022 setCurrentSubcommand(HELP_SCOPE_CONTROLVM_NICPROPERTY); 1023 1023 /* Get the number of network adapters */ 1024 ULONG NetworkAdapterCount = getMaxNics( a->virtualBox,sessionMachine);1024 ULONG NetworkAdapterCount = getMaxNics(sessionMachine); 1025 1025 unsigned n = parseNum(&a->argv[1][11], NetworkAdapterCount, "NIC"); 1026 1026 if (!n) … … 1084 1084 setCurrentSubcommand(HELP_SCOPE_CONTROLVM_NICPROMISC); 1085 1085 /* Get the number of network adapters */ 1086 ULONG NetworkAdapterCount = getMaxNics( a->virtualBox,sessionMachine);1086 ULONG NetworkAdapterCount = getMaxNics(sessionMachine); 1087 1087 unsigned n = parseNum(&a->argv[1][10], NetworkAdapterCount, "NIC"); 1088 1088 if (!n) … … 1134 1134 setCurrentSubcommand(HELP_SCOPE_CONTROLVM_NIC); 1135 1135 /* Get the number of network adapters */ 1136 ULONG NetworkAdapterCount = getMaxNics( a->virtualBox,sessionMachine);1136 ULONG NetworkAdapterCount = getMaxNics(sessionMachine); 1137 1137 unsigned n = parseNum(&a->argv[1][3], NetworkAdapterCount, "NIC"); 1138 1138 if (!n) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r99775 r101035 1092 1092 pSession->COMGETTER(Console)(pConsole.asOutParam()); 1093 1093 1094 ComPtr<IPlatform> platform; 1095 CHECK_ERROR_RET(machine, COMGETTER(Platform)(platform.asOutParam()), hrc); 1096 ComPtr<IPlatformProperties> platformProperties; 1097 CHECK_ERROR_RET(platform, COMGETTER(Properties)(platformProperties.asOutParam()), hrc); 1098 1099 PlatformArchitecture_T platformArch; 1100 CHECK_ERROR_RET(platform, COMGETTER(Architecture)(&platformArch), hrc); 1101 1102 ComPtr<IFirmwareSettings> firmwareSettings; 1103 CHECK_ERROR_RET(machine, COMGETTER(FirmwareSettings)(firmwareSettings.asOutParam()), hrc); 1104 1094 1105 char szNm[80]; 1095 1106 char szValue[256]; … … 1170 1181 Bstr strPasswordId; 1171 1182 HRESULT hrc2 = machine->GetEncryptionSettings(strCipher.asOutParam(), strPasswordId.asOutParam()); 1183 1184 SHOW_UTF8_STRING( "encryption", Info::tr("Encryption:"), 1185 SUCCEEDED(hrc2) ? "enabled" : "disabled"); 1172 1186 if (SUCCEEDED(hrc2)) 1173 1187 { 1174 RTPrintf("Encryption: enabled\n"); 1175 RTPrintf("Cipher: %ls\n", strCipher.raw()); 1176 RTPrintf("Password ID: %ls\n", strPasswordId.raw()); 1177 } 1178 else 1179 RTPrintf("Encryption: disabled\n"); 1188 SHOW_BSTR_STRING( "enc_cipher", Info::tr("Cipher:"), strCipher); 1189 SHOW_BSTR_STRING( "enc_password_id", Info::tr("Password ID:"), strPasswordId); 1190 } 1180 1191 } 1181 1192 SHOW_STRINGARRAY_PROP( machine, Groups, "groups", Info::tr("Groups:")); 1193 SHOW_UTF8_STRING( "platformArchitecture", Info::tr("Platform Architecture:"), 1194 platformArch == PlatformArchitecture_x86 ? "x86" : "ARM"); 1182 1195 Bstr osTypeId; 1183 1196 CHECK_ERROR2I_RET(machine, COMGETTER(OSTypeId)(osTypeId.asOutParam()), hrcCheck); … … 1199 1212 SHOW_ULONG_PROP(pGraphicsAdapter, VRAMSize, "vram", Info::tr("VRAM size:"), "MB"); 1200 1213 SHOW_ULONG_PROP( machine, CPUExecutionCap, "cpuexecutioncap", Info::tr("CPU exec cap:"), "%"); 1201 SHOW_BOOLEAN_PROP( machine, HPETEnabled, "hpet", Info::tr("HPET:"));1202 1214 SHOW_STRING_PROP_MAJ( machine, CPUProfile, "cpu-profile", Info::tr("CPUProfile:"), "host", 6); 1203 1215 1204 1216 ChipsetType_T chipsetType; 1205 CHECK_ERROR2I_RET( machine, COMGETTER(ChipsetType)(&chipsetType), hrcCheck);1217 CHECK_ERROR2I_RET(platform, COMGETTER(ChipsetType)(&chipsetType), hrcCheck); 1206 1218 const char *pszChipsetType; 1207 1219 switch (chipsetType) … … 1226 1238 1227 1239 FirmwareType_T firmwareType; 1228 CHECK_ERROR2I_RET( machine, COMGETTER(FirmwareType)(&firmwareType), hrcCheck);1240 CHECK_ERROR2I_RET(firmwareSettings, COMGETTER(FirmwareType)(&firmwareType), hrcCheck); 1229 1241 const char *pszFirmwareType; 1230 1242 switch (firmwareType) … … 1246 1258 1247 1259 SHOW_ULONG_PROP( machine, CPUCount, "cpus", Info::tr("Number of CPUs:"), ""); 1248 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_PAE, &f), "pae", "PAE:"); 1249 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_LongMode, &f), "longmode", Info::tr("Long Mode:")); 1250 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_TripleFaultReset, &f), "triplefaultreset", Info::tr("Triple Fault Reset:")); 1251 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_APIC, &f), "apic", "APIC:"); 1252 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_X2APIC, &f), "x2apic", "X2APIC:"); 1253 SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_HWVirt, &f), "nested-hw-virt", Info::tr("Nested VT-x/AMD-V:")); 1260 1261 switch (platformArch) 1262 { 1263 case PlatformArchitecture_x86: 1264 { 1265 ComPtr<IPlatformX86> platformX86; 1266 CHECK_ERROR_RET(platform, COMGETTER(X86)(platformX86.asOutParam()), hrc); 1267 1268 SHOW_BOOLEAN_PROP( platformX86, HPETEnabled, "hpet", Info::tr("HPET:")); 1269 SHOW_BOOLEAN_METHOD( platformX86, GetCPUProperty(CPUPropertyTypeX86_PAE, &f), "pae", "PAE:"); 1270 SHOW_BOOLEAN_METHOD( platformX86, GetCPUProperty(CPUPropertyTypeX86_LongMode, &f), "longmode", Info::tr("Long Mode:")); 1271 SHOW_BOOLEAN_METHOD( platformX86, GetCPUProperty(CPUPropertyTypeX86_TripleFaultReset, &f), "triplefaultreset", Info::tr("Triple Fault Reset:")); 1272 SHOW_BOOLEAN_METHOD( platformX86, GetCPUProperty(CPUPropertyTypeX86_APIC, &f), "apic", "APIC:"); 1273 SHOW_BOOLEAN_METHOD( platformX86, GetCPUProperty(CPUPropertyTypeX86_X2APIC, &f), "x2apic", "X2APIC:"); 1274 SHOW_BOOLEAN_METHOD( platformX86, GetCPUProperty(CPUPropertyTypeX86_HWVirt, &f), "nested-hw-virt", Info::tr("Nested VT-x/AMD-V:")); 1275 1276 if (details != VMINFO_MACHINEREADABLE) 1277 RTPrintf("%-28s ", Info::tr("CPUID overrides:")); 1278 ULONG uOrdinal = 0; 1279 for (uOrdinal = 0; uOrdinal < _4K; uOrdinal++) 1280 { 1281 ULONG uLeaf, uSubLeaf, uEAX, uEBX, uECX, uEDX; 1282 hrc = platformX86->GetCPUIDLeafByOrdinal(uOrdinal, &uLeaf, &uSubLeaf, &uEAX, &uEBX, &uECX, &uEDX); 1283 if (SUCCEEDED(hrc)) 1284 { 1285 if (details == VMINFO_MACHINEREADABLE) 1286 RTPrintf("cpuid=%08x,%08x,%08x,%08x,%08x,%08x", uLeaf, uSubLeaf, uEAX, uEBX, uECX, uEDX); 1287 else 1288 { 1289 if (!uOrdinal) 1290 RTPrintf(Info::tr("Leaf no. EAX EBX ECX EDX\n")); 1291 RTPrintf("%-28s %08x/%03x %08x %08x %08x %08x\n", "", uLeaf, uSubLeaf, uEAX, uEBX, uECX, uEDX); 1292 } 1293 } 1294 else 1295 { 1296 if (hrc != E_INVALIDARG) 1297 com::GlueHandleComError(machine, "GetCPUIDLeaf", hrc, __FILE__, __LINE__); 1298 break; 1299 } 1300 } 1301 if (!uOrdinal && details != VMINFO_MACHINEREADABLE) 1302 RTPrintf(Info::tr("None\n")); 1303 1304 SHOW_BOOLEAN_METHOD(platformX86, GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &f), "hwvirtex", Info::tr("Hardware Virtualization:")); 1305 SHOW_BOOLEAN_METHOD(platformX86, GetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, &f),"nestedpaging", Info::tr("Nested Paging:")); 1306 SHOW_BOOLEAN_METHOD(platformX86, GetHWVirtExProperty(HWVirtExPropertyType_LargePages, &f), "largepages", Info::tr("Large Pages:")); 1307 SHOW_BOOLEAN_METHOD(platformX86, GetHWVirtExProperty(HWVirtExPropertyType_VPID, &f), "vtxvpid", "VT-x VPID:"); 1308 SHOW_BOOLEAN_METHOD(platformX86, GetHWVirtExProperty(HWVirtExPropertyType_UnrestrictedExecution, &f), "vtxux", Info::tr("VT-x Unrestricted Exec.:")); 1309 SHOW_BOOLEAN_METHOD(platformX86, GetHWVirtExProperty(HWVirtExPropertyType_VirtVmsaveVmload, &f), "virtvmsavevmload", Info::tr("AMD-V Virt. Vmsave/Vmload:")); 1310 break; 1311 } 1312 1313 case PlatformArchitecture_ARM: 1314 { 1315 /** @todo BUGBUG ARM stuff here */ 1316 break; 1317 } 1318 1319 default: 1320 AssertFailed(); 1321 break; 1322 } 1323 1254 1324 SHOW_ULONG_PROP( machine, CPUIDPortabilityLevel, "cpuid-portability-level", Info::tr("CPUID Portability Level:"), ""); 1255 1256 if (details != VMINFO_MACHINEREADABLE)1257 RTPrintf("%-28s ", Info::tr("CPUID overrides:"));1258 ULONG uOrdinal = 0;1259 for (uOrdinal = 0; uOrdinal < _4K; uOrdinal++)1260 {1261 ULONG uLeaf, uSubLeaf, uEAX, uEBX, uECX, uEDX;1262 hrc = machine->GetCPUIDLeafByOrdinal(uOrdinal, &uLeaf, &uSubLeaf, &uEAX, &uEBX, &uECX, &uEDX);1263 if (SUCCEEDED(hrc))1264 {1265 if (details == VMINFO_MACHINEREADABLE)1266 RTPrintf("cpuid=%08x,%08x,%08x,%08x,%08x,%08x", uLeaf, uSubLeaf, uEAX, uEBX, uECX, uEDX);1267 else1268 {1269 if (!uOrdinal)1270 RTPrintf(Info::tr("Leaf no. EAX EBX ECX EDX\n"));1271 RTPrintf("%-28s %08x/%03x %08x %08x %08x %08x\n", "", uLeaf, uSubLeaf, uEAX, uEBX, uECX, uEDX);1272 }1273 }1274 else1275 {1276 if (hrc != E_INVALIDARG)1277 com::GlueHandleComError(machine, "GetCPUIDLeaf", hrc, __FILE__, __LINE__);1278 break;1279 }1280 }1281 if (!uOrdinal && details != VMINFO_MACHINEREADABLE)1282 RTPrintf(Info::tr("None\n"));1283 1284 ComPtr<IBIOSSettings> biosSettings;1285 CHECK_ERROR2I_RET(machine, COMGETTER(BIOSSettings)(biosSettings.asOutParam()), hrcCheck);1286 1325 1287 1326 ComPtr<INvramStore> nvramStore; 1288 1327 CHECK_ERROR2I_RET(machine, COMGETTER(NonVolatileStore)(nvramStore.asOutParam()), hrcCheck); 1289 1328 1290 BIOSBootMenuMode_T bootMenuMode;1291 CHECK_ERROR2I_RET( biosSettings, COMGETTER(BootMenuMode)(&bootMenuMode), hrcCheck);1329 FirmwareBootMenuMode_T enmBootMenuMode; 1330 CHECK_ERROR2I_RET(firmwareSettings, COMGETTER(BootMenuMode)(&enmBootMenuMode), hrcCheck); 1292 1331 const char *pszBootMenu; 1293 switch ( bootMenuMode)1294 { 1295 case BIOSBootMenuMode_Disabled:1332 switch (enmBootMenuMode) 1333 { 1334 case FirmwareBootMenuMode_Disabled: 1296 1335 if (details == VMINFO_MACHINEREADABLE) 1297 1336 pszBootMenu = "disabled"; … … 1299 1338 pszBootMenu = Info::tr("disabled"); 1300 1339 break; 1301 case BIOSBootMenuMode_MenuOnly:1340 case FirmwareBootMenuMode_MenuOnly: 1302 1341 if (details == VMINFO_MACHINEREADABLE) 1303 1342 pszBootMenu = "menuonly"; … … 1316 1355 CHECK_ERROR2I_RET(pVirtualBox, COMGETTER(SystemProperties)(systemProperties.asOutParam()), hrcCheck); 1317 1356 ULONG maxBootPosition = 0; 1318 CHECK_ERROR2I_RET( systemProperties, COMGETTER(MaxBootPosition)(&maxBootPosition), hrcCheck);1357 CHECK_ERROR2I_RET(platformProperties, COMGETTER(MaxBootPosition)(&maxBootPosition), hrcCheck); 1319 1358 for (ULONG i = 1; i <= maxBootPosition; i++) 1320 1359 { … … 1339 1378 } 1340 1379 1341 SHOW_BOOLEAN_PROP( biosSettings, ACPIEnabled, "acpi", "ACPI:");1342 SHOW_BOOLEAN_PROP( biosSettings, IOAPICEnabled, "ioapic", "IOAPIC:");1380 SHOW_BOOLEAN_PROP(firmwareSettings, ACPIEnabled, "acpi", "ACPI:"); 1381 SHOW_BOOLEAN_PROP(firmwareSettings, IOAPICEnabled, "ioapic", "IOAPIC:"); 1343 1382 1344 1383 APICMode_T apicMode; 1345 CHECK_ERROR2I_RET( biosSettings, COMGETTER(APICMode)(&apicMode), hrcCheck);1384 CHECK_ERROR2I_RET(firmwareSettings, COMGETTER(APICMode)(&apicMode), hrcCheck); 1346 1385 const char *pszAPIC; 1347 1386 switch (apicMode) … … 1369 1408 SHOW_UTF8_STRING("biosapic", Info::tr("BIOS APIC mode:"), pszAPIC); 1370 1409 1371 SHOW_LONG64_PROP( biosSettings, TimeOffset, "biossystemtimeoffset", Info::tr("Time offset:"), Info::tr("ms"));1410 SHOW_LONG64_PROP(firmwareSettings, TimeOffset, "biossystemtimeoffset", Info::tr("Time offset:"), Info::tr("ms")); 1372 1411 Bstr bstrNVRAMFile; 1373 1412 CHECK_ERROR2I_RET(nvramStore, COMGETTER(NonVolatileStorageFile)(bstrNVRAMFile.asOutParam()), hrcCheck); 1374 1413 if (bstrNVRAMFile.isNotEmpty()) 1375 1414 SHOW_BSTR_STRING("BIOS NVRAM File", Info::tr("BIOS NVRAM File:"), bstrNVRAMFile); 1376 SHOW_BOOLEAN_PROP_EX(machine, RTCUseUTC, "rtcuseutc", Info::tr("RTC:"), "UTC", Info::tr("local time")); 1377 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &f), "hwvirtex", Info::tr("Hardware Virtualization:")); 1378 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, &f),"nestedpaging", Info::tr("Nested Paging:")); 1379 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_LargePages, &f), "largepages", Info::tr("Large Pages:")); 1380 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_VPID, &f), "vtxvpid", "VT-x VPID:"); 1381 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_UnrestrictedExecution, &f), "vtxux", Info::tr("VT-x Unrestricted Exec.:")); 1382 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_VirtVmsaveVmload, &f), "virtvmsavevmload", Info::tr("AMD-V Virt. Vmsave/Vmload:")); 1383 1384 #ifdef VBOX_WITH_IOMMU_AMD 1415 SHOW_BOOLEAN_PROP_EX(platform, RTCUseUTC, "rtcuseutc", Info::tr("RTC:"), "UTC", Info::tr("local time")); 1416 1417 #ifdef VBOX_WITH_IOMMU_AMD /** @todo BUGBUG Do we set / needs this for ARM as well? */ 1385 1418 IommuType_T iommuType; 1386 CHECK_ERROR2I_RET( machine, COMGETTER(IommuType)(&iommuType), hrcCheck);1419 CHECK_ERROR2I_RET(platform, COMGETTER(IommuType)(&iommuType), hrcCheck); 1387 1420 const char *pszIommuType = iommuTypeToString(iommuType, details); 1388 1421 SHOW_UTF8_STRING("iommu", "IOMMU:", pszIommuType); … … 1587 1620 1588 1621 /* get the maximum amount of NICS */ 1589 ULONG maxNICs = getMaxNics( pVirtualBox,machine);1622 ULONG maxNICs = getMaxNics(machine); 1590 1623 1591 1624 for (ULONG currentNIC = 0; currentNIC < maxNICs; currentNIC++) … … 2009 2042 /* get the maximum amount of UARTs */ 2010 2043 ULONG maxUARTs = 0; 2011 sysProps->COMGETTER(SerialPortCount)(&maxUARTs);2044 platformProperties->COMGETTER(SerialPortCount)(&maxUARTs); 2012 2045 for (ULONG currentUART = 0; currentUART < maxUARTs; currentUART++) 2013 2046 { … … 2030 2063 else 2031 2064 { 2032 ULONG ulIRQ, ulIO Base;2065 ULONG ulIRQ, ulIOAddress; 2033 2066 PortMode_T HostMode; 2034 2067 Bstr path; … … 2036 2069 UartType_T UartType; 2037 2070 uart->COMGETTER(IRQ)(&ulIRQ); 2038 uart->COMGETTER(IO Base)(&ulIOBase);2071 uart->COMGETTER(IOAddress)(&ulIOAddress); 2039 2072 uart->COMGETTER(Path)(path.asOutParam()); 2040 2073 uart->COMGETTER(Server)(&fServer); … … 2043 2076 2044 2077 if (details == VMINFO_MACHINEREADABLE) 2045 RTPrintf("%s=\"%#06x,%d\"\n", szNm, ulIO Base, ulIRQ);2078 RTPrintf("%s=\"%#06x,%d\"\n", szNm, ulIOAddress, ulIRQ); 2046 2079 else 2047 RTPrintf(Info::tr("%-28s I/O base: %#06x, IRQ: %d"), szNm, ulIOBase, ulIRQ);2080 RTPrintf(Info::tr("%-28s I/O address: %#06x, IRQ: %d"), szNm, ulIOAddress, ulIRQ); 2048 2081 switch (HostMode) 2049 2082 { … … 2115 2148 /* get the maximum amount of LPTs */ 2116 2149 ULONG maxLPTs = 0; 2117 sysProps->COMGETTER(ParallelPortCount)(&maxLPTs);2150 platformProperties->COMGETTER(ParallelPortCount)(&maxLPTs); 2118 2151 for (ULONG currentLPT = 0; currentLPT < maxLPTs; currentLPT++) 2119 2152 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r100772 r101035 732 732 CHECK_ERROR2I_RET(pVirtualBox, COMGETTER(SystemProperties)(systemProperties.asOutParam()), hrcCheck); 733 733 734 ComPtr<IPlatformProperties> platformProperties; 735 CHECK_ERROR2I_RET(systemProperties, COMGETTER(Platform)(platformProperties.asOutParam()), hrcCheck); 736 734 737 Bstr str; 735 738 ULONG ulValue; … … 757 760 systemProperties->COMGETTER(InfoVDSize)(&i64Value); 758 761 RTPrintf(List::tr("Virtual disk limit (info): %lld Bytes\n", "" , i64Value), i64Value); 759 systemProperties->COMGETTER(SerialPortCount)(&ulValue);762 platformProperties->COMGETTER(SerialPortCount)(&ulValue); 760 763 RTPrintf(List::tr("Maximum Serial Port count: %u\n"), ulValue); 761 systemProperties->COMGETTER(ParallelPortCount)(&ulValue);764 platformProperties->COMGETTER(ParallelPortCount)(&ulValue); 762 765 RTPrintf(List::tr("Maximum Parallel Port count: %u\n"), ulValue); 763 systemProperties->COMGETTER(MaxBootPosition)(&ulValue);766 platformProperties->COMGETTER(MaxBootPosition)(&ulValue); 764 767 RTPrintf(List::tr("Maximum Boot Position: %u\n"), ulValue); 765 systemProperties->GetMaxNetworkAdapters(ChipsetType_PIIX3, &ulValue);768 platformProperties->GetMaxNetworkAdapters(ChipsetType_PIIX3, &ulValue); 766 769 RTPrintf(List::tr("Maximum PIIX3 Network Adapter count: %u\n"), ulValue); 767 systemProperties->GetMaxNetworkAdapters(ChipsetType_ICH9, &ulValue);770 platformProperties->GetMaxNetworkAdapters(ChipsetType_ICH9, &ulValue); 768 771 RTPrintf(List::tr("Maximum ICH9 Network Adapter count: %u\n"), ulValue); 769 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_IDE, &ulValue);772 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_IDE, &ulValue); 770 773 RTPrintf(List::tr("Maximum PIIX3 IDE Controllers: %u\n"), ulValue); 771 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_IDE, &ulValue);774 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_IDE, &ulValue); 772 775 RTPrintf(List::tr("Maximum ICH9 IDE Controllers: %u\n"), ulValue); 773 systemProperties->GetMaxPortCountForStorageBus(StorageBus_IDE, &ulValue);776 platformProperties->GetMaxPortCountForStorageBus(StorageBus_IDE, &ulValue); 774 777 RTPrintf(List::tr("Maximum IDE Port count: %u\n"), ulValue); 775 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_IDE, &ulValue);778 platformProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_IDE, &ulValue); 776 779 RTPrintf(List::tr("Maximum Devices per IDE Port: %u\n"), ulValue); 777 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SATA, &ulValue);780 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SATA, &ulValue); 778 781 RTPrintf(List::tr("Maximum PIIX3 SATA Controllers: %u\n"), ulValue); 779 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SATA, &ulValue);782 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SATA, &ulValue); 780 783 RTPrintf(List::tr("Maximum ICH9 SATA Controllers: %u\n"), ulValue); 781 systemProperties->GetMaxPortCountForStorageBus(StorageBus_SATA, &ulValue);784 platformProperties->GetMaxPortCountForStorageBus(StorageBus_SATA, &ulValue); 782 785 RTPrintf(List::tr("Maximum SATA Port count: %u\n"), ulValue); 783 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SATA, &ulValue);786 platformProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SATA, &ulValue); 784 787 RTPrintf(List::tr("Maximum Devices per SATA Port: %u\n"), ulValue); 785 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SCSI, &ulValue);788 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SCSI, &ulValue); 786 789 RTPrintf(List::tr("Maximum PIIX3 SCSI Controllers: %u\n"), ulValue); 787 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SCSI, &ulValue);790 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SCSI, &ulValue); 788 791 RTPrintf(List::tr("Maximum ICH9 SCSI Controllers: %u\n"), ulValue); 789 systemProperties->GetMaxPortCountForStorageBus(StorageBus_SCSI, &ulValue);792 platformProperties->GetMaxPortCountForStorageBus(StorageBus_SCSI, &ulValue); 790 793 RTPrintf(List::tr("Maximum SCSI Port count: %u\n"), ulValue); 791 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SCSI, &ulValue);794 platformProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SCSI, &ulValue); 792 795 RTPrintf(List::tr("Maximum Devices per SCSI Port: %u\n"), ulValue); 793 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SAS, &ulValue);796 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SAS, &ulValue); 794 797 RTPrintf(List::tr("Maximum SAS PIIX3 Controllers: %u\n"), ulValue); 795 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SAS, &ulValue);798 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SAS, &ulValue); 796 799 RTPrintf(List::tr("Maximum SAS ICH9 Controllers: %u\n"), ulValue); 797 systemProperties->GetMaxPortCountForStorageBus(StorageBus_SAS, &ulValue);800 platformProperties->GetMaxPortCountForStorageBus(StorageBus_SAS, &ulValue); 798 801 RTPrintf(List::tr("Maximum SAS Port count: %u\n"), ulValue); 799 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SAS, &ulValue);802 platformProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SAS, &ulValue); 800 803 RTPrintf(List::tr("Maximum Devices per SAS Port: %u\n"), ulValue); 801 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_PCIe, &ulValue);804 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_PCIe, &ulValue); 802 805 RTPrintf(List::tr("Maximum NVMe PIIX3 Controllers: %u\n"), ulValue); 803 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_PCIe, &ulValue);806 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_PCIe, &ulValue); 804 807 RTPrintf(List::tr("Maximum NVMe ICH9 Controllers: %u\n"), ulValue); 805 systemProperties->GetMaxPortCountForStorageBus(StorageBus_PCIe, &ulValue);808 platformProperties->GetMaxPortCountForStorageBus(StorageBus_PCIe, &ulValue); 806 809 RTPrintf(List::tr("Maximum NVMe Port count: %u\n"), ulValue); 807 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_PCIe, &ulValue);810 platformProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_PCIe, &ulValue); 808 811 RTPrintf(List::tr("Maximum Devices per NVMe Port: %u\n"), ulValue); 809 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_VirtioSCSI, &ulValue);812 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_VirtioSCSI, &ulValue); 810 813 RTPrintf(List::tr("Maximum virtio-scsi PIIX3 Controllers: %u\n"), ulValue); 811 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_VirtioSCSI, &ulValue);814 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_VirtioSCSI, &ulValue); 812 815 RTPrintf(List::tr("Maximum virtio-scsi ICH9 Controllers: %u\n"), ulValue); 813 systemProperties->GetMaxPortCountForStorageBus(StorageBus_VirtioSCSI, &ulValue);816 platformProperties->GetMaxPortCountForStorageBus(StorageBus_VirtioSCSI, &ulValue); 814 817 RTPrintf(List::tr("Maximum virtio-scsi Port count: %u\n"), ulValue); 815 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_VirtioSCSI, &ulValue);818 platformProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_VirtioSCSI, &ulValue); 816 819 RTPrintf(List::tr("Maximum Devices per virtio-scsi Port: %u\n"), ulValue); 817 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_Floppy, &ulValue);820 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_Floppy, &ulValue); 818 821 RTPrintf(List::tr("Maximum PIIX3 Floppy Controllers:%u\n"), ulValue); 819 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_Floppy, &ulValue);822 platformProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_Floppy, &ulValue); 820 823 RTPrintf(List::tr("Maximum ICH9 Floppy Controllers: %u\n"), ulValue); 821 systemProperties->GetMaxPortCountForStorageBus(StorageBus_Floppy, &ulValue);824 platformProperties->GetMaxPortCountForStorageBus(StorageBus_Floppy, &ulValue); 822 825 RTPrintf(List::tr("Maximum Floppy Port count: %u\n"), ulValue); 823 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_Floppy, &ulValue);826 platformProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_Floppy, &ulValue); 824 827 RTPrintf(List::tr("Maximum Devices per Floppy Port: %u\n"), ulValue); 825 828 #if 0 … … 835 838 systemProperties->COMGETTER(DefaultMachineFolder)(str.asOutParam()); 836 839 RTPrintf(List::tr("Default machine folder: %ls\n"), str.raw()); 837 systemProperties->COMGETTER(RawModeSupported)(&fValue);840 platformProperties->COMGETTER(RawModeSupported)(&fValue); 838 841 RTPrintf(List::tr("Raw-mode Supported: %s\n"), fValue ? List::tr("yes") : List::tr("no")); 839 systemProperties->COMGETTER(ExclusiveHwVirt)(&fValue);842 platformProperties->COMGETTER(ExclusiveHwVirt)(&fValue); 840 843 RTPrintf(List::tr("Exclusive HW virtualization use: %s\n"), fValue ? List::tr("on") : List::tr("off")); 841 844 systemProperties->COMGETTER(DefaultHardDiskFormat)(str.asOutParam()); … … 1442 1445 switch (enmArchitecture) 1443 1446 { 1444 case CPUArchitecture_x86: pszArchitecture = "x86"; break; 1445 case CPUArchitecture_AMD64: pszArchitecture = "AMD64"; break; 1446 1447 case CPUArchitecture_x86: pszArchitecture = "x86"; break; 1448 case CPUArchitecture_AMD64: pszArchitecture = "AMD64"; break; 1449 case CPUArchitecture_ARMv8_32: pszArchitecture = "ARMv8 (32-bit only)"; break; 1450 case CPUArchitecture_ARMv8_64: pszArchitecture = "ARMv8 (64-bit)"; break; 1447 1451 #ifdef VBOX_WITH_XPCOM_CPP_ENUM_HACK 1448 1452 case CPUArchitecture_32BitHack: … … 2154 2158 { 2155 2159 ComPtr<IHost> Host; 2156 CHECK_ERROR (pVirtualBox, COMGETTER(Host)(Host.asOutParam()));2157 2158 RTPrintf(List::tr("Host CPUIDs:\n\nLeaf no. EAX EBX ECX EDX\n"));2159 ULONG uCpuNo = 0; /* ASSUMES that CPU#0 is online. */ 2160 s tatic uint32_t const s_auCpuIdRanges[] =2160 CHECK_ERROR_BREAK(pVirtualBox, COMGETTER(Host)(Host.asOutParam())); 2161 PlatformArchitecture_T platformArch; 2162 CHECK_ERROR_BREAK(Host, COMGETTER(Architecture)(&platformArch)); 2163 2164 switch (platformArch) 2161 2165 { 2162 UINT32_C(0x00000000), UINT32_C(0x0000007f), 2163 UINT32_C(0x80000000), UINT32_C(0x8000007f), 2164 UINT32_C(0xc0000000), UINT32_C(0xc000007f) 2165 }; 2166 for (unsigned i = 0; i < RT_ELEMENTS(s_auCpuIdRanges); i += 2) 2167 { 2168 ULONG uEAX, uEBX, uECX, uEDX, cLeafs; 2169 CHECK_ERROR(Host, GetProcessorCPUIDLeaf(uCpuNo, s_auCpuIdRanges[i], 0, &cLeafs, &uEBX, &uECX, &uEDX)); 2170 if (cLeafs < s_auCpuIdRanges[i] || cLeafs > s_auCpuIdRanges[i+1]) 2171 continue; 2172 cLeafs++; 2173 for (ULONG iLeaf = s_auCpuIdRanges[i]; iLeaf <= cLeafs; iLeaf++) 2166 case PlatformArchitecture_x86: 2174 2167 { 2175 CHECK_ERROR(Host, GetProcessorCPUIDLeaf(uCpuNo, iLeaf, 0, &uEAX, &uEBX, &uECX, &uEDX)); 2176 RTPrintf("%08x %08x %08x %08x %08x\n", iLeaf, uEAX, uEBX, uECX, uEDX); 2168 ComPtr<IHostX86> HostX86; 2169 CHECK_ERROR_BREAK(Host, COMGETTER(X86)(HostX86.asOutParam())); 2170 2171 RTPrintf(List::tr("Host CPUIDs:\n\nLeaf no. EAX EBX ECX EDX\n")); 2172 ULONG uCpuNo = 0; /* ASSUMES that CPU#0 is online. */ 2173 static uint32_t const s_auCpuIdRanges[] = 2174 { 2175 UINT32_C(0x00000000), UINT32_C(0x0000007f), 2176 UINT32_C(0x80000000), UINT32_C(0x8000007f), 2177 UINT32_C(0xc0000000), UINT32_C(0xc000007f) 2178 }; 2179 for (unsigned i = 0; i < RT_ELEMENTS(s_auCpuIdRanges); i += 2) 2180 { 2181 ULONG uEAX, uEBX, uECX, uEDX, cLeafs; 2182 CHECK_ERROR(HostX86, GetProcessorCPUIDLeaf(uCpuNo, s_auCpuIdRanges[i], 0, &cLeafs, &uEBX, &uECX, &uEDX)); 2183 if (cLeafs < s_auCpuIdRanges[i] || cLeafs > s_auCpuIdRanges[i+1]) 2184 continue; 2185 cLeafs++; 2186 for (ULONG iLeaf = s_auCpuIdRanges[i]; iLeaf <= cLeafs; iLeaf++) 2187 { 2188 CHECK_ERROR(HostX86, GetProcessorCPUIDLeaf(uCpuNo, iLeaf, 0, &uEAX, &uEBX, &uECX, &uEDX)); 2189 RTPrintf("%08x %08x %08x %08x %08x\n", iLeaf, uEAX, uEBX, uECX, uEDX); 2190 } 2191 } 2192 2193 break; 2177 2194 } 2195 2196 case PlatformArchitecture_ARM: 2197 { 2198 /** @todo BUGBUG Implement this for ARM! */ 2199 break; 2200 } 2201 2202 default: 2203 AssertFailed(); 2204 break; 2178 2205 } 2179 2206 break; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
r99775 r101035 263 263 static const RTGETOPTDEF g_aCreateVMOptions[] = 264 264 { 265 { "--name", 'n', RTGETOPT_REQ_STRING }, 266 { "-name", 'n', RTGETOPT_REQ_STRING }, 267 { "--groups", 'g', RTGETOPT_REQ_STRING }, 268 { "--basefolder", 'p', RTGETOPT_REQ_STRING }, 269 { "-basefolder", 'p', RTGETOPT_REQ_STRING }, 270 { "--ostype", 'o', RTGETOPT_REQ_STRING }, 271 { "-ostype", 'o', RTGETOPT_REQ_STRING }, 272 { "--uuid", 'u', RTGETOPT_REQ_UUID }, 273 { "-uuid", 'u', RTGETOPT_REQ_UUID }, 274 { "--register", 'r', RTGETOPT_REQ_NOTHING }, 275 { "-register", 'r', RTGETOPT_REQ_NOTHING }, 276 { "--default", 'd', RTGETOPT_REQ_NOTHING }, 277 { "-default", 'd', RTGETOPT_REQ_NOTHING }, 278 { "--cipher", 'c', RTGETOPT_REQ_STRING }, 279 { "-cipher", 'c', RTGETOPT_REQ_STRING }, 280 { "--password-id", 'i', RTGETOPT_REQ_STRING }, 281 { "-password-id", 'i', RTGETOPT_REQ_STRING }, 282 { "--password", 'w', RTGETOPT_REQ_STRING }, 283 { "-password", 'w', RTGETOPT_REQ_STRING }, 265 { "--name", 'n', RTGETOPT_REQ_STRING }, 266 { "-name", 'n', RTGETOPT_REQ_STRING }, 267 { "--groups", 'g', RTGETOPT_REQ_STRING }, 268 { "--basefolder", 'p', RTGETOPT_REQ_STRING }, 269 { "-basefolder", 'p', RTGETOPT_REQ_STRING }, 270 { "--ostype", 'o', RTGETOPT_REQ_STRING }, 271 { "-ostype", 'o', RTGETOPT_REQ_STRING }, 272 { "--uuid", 'u', RTGETOPT_REQ_UUID }, 273 { "-uuid", 'u', RTGETOPT_REQ_UUID }, 274 { "--register", 'r', RTGETOPT_REQ_NOTHING }, 275 { "-register", 'r', RTGETOPT_REQ_NOTHING }, 276 { "--default", 'd', RTGETOPT_REQ_NOTHING }, 277 { "-default", 'd', RTGETOPT_REQ_NOTHING }, 278 { "--cipher", 'c', RTGETOPT_REQ_STRING }, 279 { "-cipher", 'c', RTGETOPT_REQ_STRING }, 280 { "--password-id", 'i', RTGETOPT_REQ_STRING }, 281 { "-password-id", 'i', RTGETOPT_REQ_STRING }, 282 { "--password", 'w', RTGETOPT_REQ_STRING }, 283 { "-password", 'w', RTGETOPT_REQ_STRING }, 284 { "--platform-architecture", 'a', RTGETOPT_REQ_STRING }, 285 { "--platform-arch", 'a', RTGETOPT_REQ_STRING }, /* Shorter. */ 284 286 }; 285 287 … … 287 289 { 288 290 HRESULT hrc; 291 PlatformArchitecture_T platformArch = PlatformArchitecture_None; 289 292 Bstr bstrBaseFolder; 290 293 Bstr bstrName; … … 350 353 break; 351 354 355 case 'a': // --platform-architecture 356 if (!RTStrICmp(ValueUnion.psz, "x86")) 357 platformArch = PlatformArchitecture_x86; 358 else if (!RTStrICmp(ValueUnion.psz, "arm")) 359 platformArch = PlatformArchitecture_ARM; 360 else 361 return errorArgument(Misc::tr("Invalid --platform-architecture argument '%s'"), ValueUnion.psz); 362 break; 363 352 364 default: 353 365 return errorGetOpt(c, &ValueUnion); … … 356 368 357 369 /* check for required options */ 370 if (platformArch == PlatformArchitecture_None) 371 return errorSyntax(Misc::tr("Parameter --platform-architecture is required")); 358 372 if (bstrName.isEmpty()) 359 373 return errorSyntax(Misc::tr("Parameter --name is required")); … … 398 412 CreateMachine(bstrSettingsFile.raw(), 399 413 bstrName.raw(), 414 platformArch, 400 415 ComSafeArrayAsInParam(groups), 401 416 bstrOsTypeId.raw(), … … 670 685 RTEXITCODE_FAILURE); 671 686 687 /* Get the platform architecture, to clone a VM which has the same architecture. */ 688 ComPtr<IPlatform> platform; 689 CHECK_ERROR_RET(srcMachine, COMGETTER(Platform)(platform.asOutParam()), RTEXITCODE_FAILURE); 690 PlatformArchitecture_T platformArch; 691 CHECK_ERROR_RET(platform, COMGETTER(Architecture)(&platformArch), RTEXITCODE_FAILURE); 692 672 693 /* If a snapshot name/uuid was given, get the particular machine of this 673 694 * snapshot. */ … … 704 725 CHECK_ERROR_RET(a->virtualBox, CreateMachine(bstrSettingsFile.raw(), 705 726 Bstr(pszTrgName).raw(), 727 platformArch, 706 728 ComSafeArrayAsInParam(groups), 707 729 NULL, … … 1419 1441 } 1420 1442 1421 RTEXITCODE handleSetProperty(HandlerArg *a) 1443 RTEXITCODE handleSetProperty(HandlerArg *a) /** @todo r=andy Rename this to handle[Get|Set]SystemProperty? */ 1422 1444 { 1423 1445 HRESULT hrc; … … 1429 1451 ComPtr<ISystemProperties> systemProperties; 1430 1452 a->virtualBox->COMGETTER(SystemProperties)(systemProperties.asOutParam()); 1453 1454 ComPtr<IPlatformProperties> platformProperties; 1455 systemProperties->COMGETTER(Platform)(platformProperties.asOutParam()); 1431 1456 1432 1457 if (!strcmp(a->argv[0], "machinefolder")) … … 1448 1473 else 1449 1474 return errorArgument(Misc::tr("Invalid hwvirtexclusive argument '%s'"), a->argv[1]); 1450 CHECK_ERROR( systemProperties, COMSETTER(ExclusiveHwVirt)(fHwVirtExclusive));1475 CHECK_ERROR(platformProperties, COMSETTER(ExclusiveHwVirt)(fHwVirtExclusive)); 1451 1476 } 1452 1477 else if ( !strcmp(a->argv[0], "vrdeauthlibrary") -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r98298 r101035 72 72 MODIFYVM_ACPI, 73 73 MODIFYVM_IOAPIC, 74 MODIFYVM_PAE,75 MODIFYVM_LONGMODE,76 74 MODIFYVM_CPUID_PORTABILITY, 77 MODIFYVM_TFRESET,78 MODIFYVM_APIC,79 MODIFYVM_X2APIC,80 75 MODIFYVM_PARAVIRTPROVIDER, 81 76 MODIFYVM_PARAVIRTDEBUG, 82 MODIFYVM_HWVIRTEX,83 MODIFYVM_NESTEDPAGING,84 MODIFYVM_LARGEPAGES,85 MODIFYVM_VTXVPID,86 MODIFYVM_VTXUX,87 MODIFYVM_VIRT_VMSAVE_VMLOAD,88 MODIFYVM_IBPB_ON_VM_EXIT,89 MODIFYVM_IBPB_ON_VM_ENTRY,90 MODIFYVM_SPEC_CTRL,91 MODIFYVM_L1D_FLUSH_ON_SCHED,92 MODIFYVM_L1D_FLUSH_ON_VM_ENTRY,93 MODIFYVM_MDS_CLEAR_ON_SCHED,94 MODIFYVM_MDS_CLEAR_ON_VM_ENTRY,95 MODIFYVM_NESTED_HW_VIRT,96 77 MODIFYVM_CPUS, 97 78 MODIFYVM_CPUHOTPLUG, … … 99 80 MODIFYVM_PLUGCPU, 100 81 MODIFYVM_UNPLUGCPU, 101 MODIFYVM_SETCPUID,102 MODIFYVM_DELCPUID,103 MODIFYVM_DELCPUID_OLD, // legacy, different syntax from MODIFYVM_DELCPUID104 MODIFYVM_DELALLCPUID,105 82 MODIFYVM_GRAPHICSCONTROLLER, 106 83 MODIFYVM_MONITORCOUNT, … … 109 86 MODIFYVM_ACCELERATE2DVIDEO, 110 87 #endif 111 MODIFYVM_BIOSLOGOFADEIN, 112 MODIFYVM_BIOSLOGOFADEOUT, 113 MODIFYVM_BIOSLOGODISPLAYTIME, 114 MODIFYVM_BIOSLOGOIMAGEPATH, 115 MODIFYVM_BIOSBOOTMENU, 116 MODIFYVM_BIOSAPIC, 117 MODIFYVM_BIOSSYSTEMTIMEOFFSET, 118 MODIFYVM_BIOSPXEDEBUG, 88 /* 89 * Firmware-specific stuff. 90 */ 91 MODIFYVM_FWLOGOFADEIN, 92 MODIFYVM_FWLOGOFADEOUT, 93 MODIFYVM_FWLOGODISPLAYTIME, 94 MODIFYVM_FWLOGOIMAGEPATH, 95 MODIFYVM_FWBOOTMENU, 96 MODIFYVM_FWAPIC, 97 MODIFYVM_FWSYSTEMTIMEOFFSET, 98 MODIFYVM_FWPXEDEBUG, 119 99 MODIFYVM_SYSTEMUUIDLE, 120 100 MODIFYVM_BOOT, … … 224 204 MODIFYVM_TRACING_ALLOW_VM_ACCESS, 225 205 MODIFYVM_HARDWARE_UUID, 226 MODIFYVM_HPET,227 206 MODIFYVM_IOCACHE, 228 207 MODIFYVM_IOCACHESIZE, … … 269 248 MODIFYVM_GUEST_DEBUG_ADDRESS, 270 249 MODIFYVM_GUEST_DEBUG_PORT, 250 /* 251 * x86-specific stuff. 252 */ 253 MODIFYVM_X86_APIC, 254 MODIFYVM_X86_DELCPUID, 255 MODIFYVM_X86_DELCPUID_OLD, // legacy, different syntax from MODIFYVM_DELCPUID 256 MODIFYVM_X86_DELALLCPUID, 257 MODIFYVM_X86_HPET, 258 MODIFYVM_X86_HWVIRTEX, 259 MODIFYVM_X86_IBPB_ON_VM_ENTRY, 260 MODIFYVM_X86_IBPB_ON_VM_EXIT, 261 MODIFYVM_X86_L1D_FLUSH_ON_SCHED, 262 MODIFYVM_X86_L1D_FLUSH_ON_VM_ENTRY, 263 MODIFYVM_X86_LARGEPAGES, 264 MODIFYVM_X86_LONGMODE, 265 MODIFYVM_X86_MDS_CLEAR_ON_SCHED, 266 MODIFYVM_X86_MDS_CLEAR_ON_VM_ENTRY, 267 MODIFYVM_X86_NESTED_HW_VIRT, 268 MODIFYVM_X86_NESTEDPAGING, 269 MODIFYVM_X86_PAE, 270 MODIFYVM_X86_SETCPUID, 271 MODIFYVM_X86_SPEC_CTRL, 272 MODIFYVM_X86_TFRESET, 273 MODIFYVM_X86_VIRT_VMSAVE_VMLOAD, 274 MODIFYVM_X86_VTXUX, 275 MODIFYVM_X86_VTXVPID, 276 MODIFYVM_X86_X2APIC 271 277 }; 272 278 … … 284 290 OPT1("--acpi", MODIFYVM_ACPI, RTGETOPT_REQ_BOOL_ONOFF), 285 291 OPT1("--ioapic", MODIFYVM_IOAPIC, RTGETOPT_REQ_BOOL_ONOFF), 286 OPT1("--pae", MODIFYVM_PAE, RTGETOPT_REQ_BOOL_ONOFF),287 OPT2("--long-mode", "--longmode", MODIFYVM_LONGMODE, RTGETOPT_REQ_BOOL_ONOFF),288 292 OPT1("--cpuid-portability-level", MODIFYVM_CPUID_PORTABILITY, RTGETOPT_REQ_UINT32), 289 OPT2("--triple-fault-reset", "--triplefaultreset", MODIFYVM_TFRESET, RTGETOPT_REQ_BOOL_ONOFF),290 OPT1("--apic", MODIFYVM_APIC, RTGETOPT_REQ_BOOL_ONOFF),291 OPT1("--x2apic", MODIFYVM_X2APIC, RTGETOPT_REQ_BOOL_ONOFF),292 293 OPT2("--paravirt-provider", "--paravirtprovider", MODIFYVM_PARAVIRTPROVIDER, RTGETOPT_REQ_STRING), 293 294 OPT2("--paravirt-debug", "--paravirtdebug", MODIFYVM_PARAVIRTDEBUG, RTGETOPT_REQ_STRING), 294 OPT1("--hwvirtex", MODIFYVM_HWVIRTEX, RTGETOPT_REQ_BOOL_ONOFF),295 OPT2("--nested-paging", "--nestedpaging", MODIFYVM_NESTEDPAGING, RTGETOPT_REQ_BOOL_ONOFF),296 OPT2("--large-pages", "--largepages", MODIFYVM_LARGEPAGES, RTGETOPT_REQ_BOOL_ONOFF),297 OPT2("--vtx-vpid", "--vtxvpid", MODIFYVM_VTXVPID, RTGETOPT_REQ_BOOL_ONOFF),298 OPT2("--vtx-ux", "--vtxux", MODIFYVM_VTXUX, RTGETOPT_REQ_BOOL_ONOFF),299 OPT1("--virt-vmsave-vmload", MODIFYVM_VIRT_VMSAVE_VMLOAD, RTGETOPT_REQ_BOOL_ONOFF),300 OPT1("--ibpb-on-vm-exit", MODIFYVM_IBPB_ON_VM_EXIT, RTGETOPT_REQ_BOOL_ONOFF),301 OPT1("--ibpb-on-vm-entry", MODIFYVM_IBPB_ON_VM_ENTRY, RTGETOPT_REQ_BOOL_ONOFF),302 OPT1("--spec-ctrl", MODIFYVM_SPEC_CTRL, RTGETOPT_REQ_BOOL_ONOFF),303 OPT1("--l1d-flush-on-sched", MODIFYVM_L1D_FLUSH_ON_SCHED, RTGETOPT_REQ_BOOL_ONOFF),304 OPT1("--l1d-flush-on-vm-entry", MODIFYVM_L1D_FLUSH_ON_VM_ENTRY, RTGETOPT_REQ_BOOL_ONOFF),305 OPT1("--mds-clear-on-sched", MODIFYVM_MDS_CLEAR_ON_SCHED, RTGETOPT_REQ_BOOL_ONOFF),306 OPT1("--mds-clear-on-vm-entry", MODIFYVM_MDS_CLEAR_ON_VM_ENTRY, RTGETOPT_REQ_BOOL_ONOFF),307 OPT1("--nested-hw-virt", MODIFYVM_NESTED_HW_VIRT, RTGETOPT_REQ_BOOL_ONOFF),308 OPT2("--cpuid-set", "--cpuidset", MODIFYVM_SETCPUID, RTGETOPT_REQ_UINT32_OPTIONAL_PAIR | RTGETOPT_FLAG_HEX),309 OPT1("--cpuid-remove", MODIFYVM_DELCPUID, RTGETOPT_REQ_UINT32_OPTIONAL_PAIR | RTGETOPT_FLAG_HEX),310 OPT1("--cpuidremove", MODIFYVM_DELCPUID_OLD, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_HEX), /* legacy - syntax differs */311 OPT2("--cpuid-remove-all", "--cpuidremoveall", MODIFYVM_DELALLCPUID, RTGETOPT_REQ_NOTHING),312 295 OPT1("--cpus", MODIFYVM_CPUS, RTGETOPT_REQ_UINT32), 313 296 OPT2("--cpu-hotplug", "--cpuhotplug", MODIFYVM_CPUHOTPLUG, RTGETOPT_REQ_BOOL_ONOFF), … … 323 306 OPT2("--accelerate-2d-video", "--accelerate2dvideo", MODIFYVM_ACCELERATE2DVIDEO, RTGETOPT_REQ_BOOL_ONOFF), 324 307 #endif 325 OPT2("--bios-logo-fade-in", "--bioslogofadein", MODIFYVM_BIOSLOGOFADEIN, RTGETOPT_REQ_BOOL_ONOFF), 326 OPT2("--bios-logo-fade-out", "--bioslogofadeout", MODIFYVM_BIOSLOGOFADEOUT, RTGETOPT_REQ_BOOL_ONOFF), 327 OPT2("--bios-logo-display-time", "--bioslogodisplaytime", MODIFYVM_BIOSLOGODISPLAYTIME, RTGETOPT_REQ_UINT32), 328 OPT2("--bios-logo-image-path", "--bioslogoimagepath", MODIFYVM_BIOSLOGOIMAGEPATH, RTGETOPT_REQ_STRING), 329 OPT2("--bios-boot-menu", "--biosbootmenu", MODIFYVM_BIOSBOOTMENU, RTGETOPT_REQ_STRING), 330 OPT2("--bios-system-time-offset", "--biossystemtimeoffset", MODIFYVM_BIOSSYSTEMTIMEOFFSET, RTGETOPT_REQ_INT64), 331 OPT2("--bios-apic", "--biosapic", MODIFYVM_BIOSAPIC, RTGETOPT_REQ_STRING), 332 OPT2("--bios-pxe-debug", "--biospxedebug", MODIFYVM_BIOSPXEDEBUG, RTGETOPT_REQ_BOOL_ONOFF), 308 /** Kept for backwards-compatibility. */ 309 OPT1("--firmware-logo-fade-in", MODIFYVM_FWLOGOFADEIN, RTGETOPT_REQ_BOOL_ONOFF), 310 /** Kept for backwards-compatibility. */ 311 OPT2("--bios-logo-fade-in", "--bioslogofadein", MODIFYVM_FWLOGOFADEIN, RTGETOPT_REQ_BOOL_ONOFF), 312 OPT1("--firmware-fade-out", MODIFYVM_FWLOGOFADEOUT, RTGETOPT_REQ_BOOL_ONOFF), 313 /** Kept for backwards-compatibility. */ 314 OPT2("--bios-logo-fade-out", "--bioslogofadeout", MODIFYVM_FWLOGOFADEOUT, RTGETOPT_REQ_BOOL_ONOFF), 315 OPT1("--firmware-logo-display-time", MODIFYVM_FWLOGODISPLAYTIME, RTGETOPT_REQ_UINT32), 316 /** Kept for backwards-compatibility. */ 317 OPT2("--bios-logo-display-time", "--bioslogodisplaytime", MODIFYVM_FWLOGODISPLAYTIME, RTGETOPT_REQ_UINT32), 318 OPT1("--firmware-logo-image-path", MODIFYVM_FWLOGOIMAGEPATH, RTGETOPT_REQ_STRING), 319 /** Kept for backwards-compatibility. */ 320 OPT2("--bios-logo-image-path", "--bioslogoimagepath", MODIFYVM_FWLOGOIMAGEPATH, RTGETOPT_REQ_STRING), 321 OPT1("--firmware-boot-menu", MODIFYVM_FWBOOTMENU, RTGETOPT_REQ_STRING), 322 /** Kept for backwards-compatibility. */ 323 OPT2("--bios-boot-menu", "--biosbootmenu", MODIFYVM_FWBOOTMENU, RTGETOPT_REQ_STRING), 324 OPT1("--firmware-system-time-offset", MODIFYVM_FWSYSTEMTIMEOFFSET, RTGETOPT_REQ_INT64), 325 /** Kept for backwards-compatibility. */ 326 OPT2("--bios-system-time-offset", "--biossystemtimeoffset", MODIFYVM_FWSYSTEMTIMEOFFSET, RTGETOPT_REQ_INT64), 327 OPT1("--firmware-apic", MODIFYVM_FWAPIC, RTGETOPT_REQ_STRING), 328 /** Kept for backwards-compatibility. */ 329 OPT2("--bios-apic", "--biosapic", MODIFYVM_FWAPIC, RTGETOPT_REQ_STRING), 330 OPT1("--firmware-pxe-debug", MODIFYVM_FWPXEDEBUG, RTGETOPT_REQ_BOOL_ONOFF), 331 /** Kept for backwards-compatibility. */ 332 OPT2("--bios-pxe-debug", "--biospxedebug", MODIFYVM_FWPXEDEBUG, RTGETOPT_REQ_BOOL_ONOFF), 333 333 OPT2("--system-uuid-le", "--system-uuid-le", MODIFYVM_SYSTEMUUIDLE, RTGETOPT_REQ_BOOL_ONOFF), 334 334 OPT1("--boot", MODIFYVM_BOOT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX), … … 440 440 OPT1("--tracing-allow-vm-access", MODIFYVM_TRACING_ALLOW_VM_ACCESS, RTGETOPT_REQ_BOOL_ONOFF), 441 441 OPT2("--hardware-uuid", "--hardwareuuid", MODIFYVM_HARDWARE_UUID, RTGETOPT_REQ_STRING), 442 OPT1("--hpet", MODIFYVM_HPET, RTGETOPT_REQ_BOOL_ONOFF),443 442 OPT1("--iocache", MODIFYVM_IOCACHE, RTGETOPT_REQ_BOOL_ONOFF), 444 443 OPT2("--iocache-size", "--iocachesize", MODIFYVM_IOCACHESIZE, RTGETOPT_REQ_UINT32), … … 483 482 OPT1("--guest-debug-address", MODIFYVM_GUEST_DEBUG_ADDRESS, RTGETOPT_REQ_STRING), 484 483 OPT1("--guest-debug-port", MODIFYVM_GUEST_DEBUG_PORT, RTGETOPT_REQ_UINT32), 484 485 /* 486 * x86-only stuff. 487 * 488 * Note: The non-prefixed options (e.g. "hpet" vs. "x86-hpet") are being kept 489 * to maintain backwards compatibility, at least for a while. Remove them before going on pension. 490 * 491 * Sorted after their MODIFYVM_X86_XXX values. 492 */ 493 OPT1("--x86-apic", MODIFYVM_X86_APIC, RTGETOPT_REQ_BOOL_ONOFF), 494 OPT1("--apic", MODIFYVM_X86_APIC, RTGETOPT_REQ_BOOL_ONOFF), 495 OPT1("--x86-cpuid-remove", MODIFYVM_X86_DELCPUID, RTGETOPT_REQ_UINT32_OPTIONAL_PAIR | RTGETOPT_FLAG_HEX), 496 OPT1("--cpuid-remove", MODIFYVM_X86_DELCPUID, RTGETOPT_REQ_UINT32_OPTIONAL_PAIR | RTGETOPT_FLAG_HEX), 497 OPT1("--cpuidremove", MODIFYVM_X86_DELCPUID_OLD, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_HEX), /* legacy - syntax differs */ 498 OPT1("--x86-cpuid-remove-all", MODIFYVM_X86_DELALLCPUID, RTGETOPT_REQ_NOTHING), 499 OPT2("--cpuid-remove-all", "--cpuidremoveall", MODIFYVM_X86_DELALLCPUID, RTGETOPT_REQ_NOTHING), 500 OPT1("--x86-hpet", MODIFYVM_X86_HPET, RTGETOPT_REQ_BOOL_ONOFF), 501 OPT1("--hpet", MODIFYVM_X86_HPET, RTGETOPT_REQ_BOOL_ONOFF), 502 OPT1("--x86-hwvirtex", MODIFYVM_X86_HWVIRTEX, RTGETOPT_REQ_BOOL_ONOFF), 503 OPT1("--hwvirtex", MODIFYVM_X86_HWVIRTEX, RTGETOPT_REQ_BOOL_ONOFF), 504 OPT1("--x86-ibpb-on-vm-entry", MODIFYVM_X86_IBPB_ON_VM_ENTRY, RTGETOPT_REQ_BOOL_ONOFF), 505 OPT1("--ibpb-on-vm-entry", MODIFYVM_X86_IBPB_ON_VM_ENTRY, RTGETOPT_REQ_BOOL_ONOFF), 506 OPT1("--x86-ibpb-on-vm-exit", MODIFYVM_X86_IBPB_ON_VM_EXIT, RTGETOPT_REQ_BOOL_ONOFF), 507 OPT1("--ibpb-on-vm-exit", MODIFYVM_X86_IBPB_ON_VM_EXIT, RTGETOPT_REQ_BOOL_ONOFF), 508 OPT1("--x86-l1d-flush-on-sched", MODIFYVM_X86_L1D_FLUSH_ON_SCHED, RTGETOPT_REQ_BOOL_ONOFF), 509 OPT1("--l1d-flush-on-sched", MODIFYVM_X86_L1D_FLUSH_ON_SCHED, RTGETOPT_REQ_BOOL_ONOFF), 510 OPT1("--x86-l1d-flush-on-vm-entry", MODIFYVM_X86_L1D_FLUSH_ON_VM_ENTRY, RTGETOPT_REQ_BOOL_ONOFF), 511 OPT1("--l1d-flush-on-vm-entry", MODIFYVM_X86_L1D_FLUSH_ON_VM_ENTRY, RTGETOPT_REQ_BOOL_ONOFF), 512 OPT1("--x86-large-pages", MODIFYVM_X86_LARGEPAGES, RTGETOPT_REQ_BOOL_ONOFF), 513 OPT2("--large-pages", "--largepages", MODIFYVM_X86_LARGEPAGES, RTGETOPT_REQ_BOOL_ONOFF), 514 OPT1("--x86-long-mode", MODIFYVM_X86_LONGMODE, RTGETOPT_REQ_BOOL_ONOFF), 515 OPT2("--long-mode", "--longmode", MODIFYVM_X86_LONGMODE, RTGETOPT_REQ_BOOL_ONOFF), 516 OPT1("--x86-mds-clear-on-sched", MODIFYVM_X86_MDS_CLEAR_ON_SCHED, RTGETOPT_REQ_BOOL_ONOFF), 517 OPT1("--mds-clear-on-sched", MODIFYVM_X86_MDS_CLEAR_ON_SCHED, RTGETOPT_REQ_BOOL_ONOFF), 518 OPT1("--x86-mds-clear-on-vm-entry", MODIFYVM_X86_MDS_CLEAR_ON_VM_ENTRY, RTGETOPT_REQ_BOOL_ONOFF), 519 OPT1("--mds-clear-on-vm-entry", MODIFYVM_X86_MDS_CLEAR_ON_VM_ENTRY, RTGETOPT_REQ_BOOL_ONOFF), 520 OPT1("--x86-nested-hw-virt", MODIFYVM_X86_NESTED_HW_VIRT, RTGETOPT_REQ_BOOL_ONOFF), 521 OPT1("--nested-hw-virt", MODIFYVM_X86_NESTED_HW_VIRT, RTGETOPT_REQ_BOOL_ONOFF), 522 OPT1("--x86-nested-paging", MODIFYVM_X86_NESTEDPAGING, RTGETOPT_REQ_BOOL_ONOFF), 523 OPT2("--nested-paging", "--nestedpaging", MODIFYVM_X86_NESTEDPAGING, RTGETOPT_REQ_BOOL_ONOFF), 524 OPT1("--x86-pae", MODIFYVM_X86_PAE, RTGETOPT_REQ_BOOL_ONOFF), 525 OPT1("--pae", MODIFYVM_X86_PAE, RTGETOPT_REQ_BOOL_ONOFF), 526 OPT1("--x86-cpuid-set", MODIFYVM_X86_SETCPUID, RTGETOPT_REQ_UINT32_OPTIONAL_PAIR | RTGETOPT_FLAG_HEX), 527 OPT2("--cpuid-set", "--cpuidset", MODIFYVM_X86_SETCPUID, RTGETOPT_REQ_UINT32_OPTIONAL_PAIR | RTGETOPT_FLAG_HEX), 528 OPT1("--x86-spec-ctrl", MODIFYVM_X86_SPEC_CTRL, RTGETOPT_REQ_BOOL_ONOFF), 529 OPT1("--spec-ctrl", MODIFYVM_X86_SPEC_CTRL, RTGETOPT_REQ_BOOL_ONOFF), 530 OPT1("--x86-triple-fault-reset", MODIFYVM_X86_TFRESET, RTGETOPT_REQ_BOOL_ONOFF), 531 OPT2("--triple-fault-reset", "--triplefaultreset", MODIFYVM_X86_TFRESET, RTGETOPT_REQ_BOOL_ONOFF), 532 OPT1("--virt-vmsave-vmload", MODIFYVM_X86_VIRT_VMSAVE_VMLOAD, RTGETOPT_REQ_BOOL_ONOFF), 533 OPT1("--x86-virt-vmsave-vmload", MODIFYVM_X86_VIRT_VMSAVE_VMLOAD, RTGETOPT_REQ_BOOL_ONOFF), 534 OPT1("--x86-vtx-ux", MODIFYVM_X86_VTXUX, RTGETOPT_REQ_BOOL_ONOFF), 535 OPT2("--vtx-ux", "--vtxux", MODIFYVM_X86_VTXUX, RTGETOPT_REQ_BOOL_ONOFF), 536 OPT1("--x86-vtx-vpid", MODIFYVM_X86_VTXVPID, RTGETOPT_REQ_BOOL_ONOFF), 537 OPT2("--vtx-vpid", "--vtxvpid", MODIFYVM_X86_VTXVPID, RTGETOPT_REQ_BOOL_ONOFF), 538 OPT1("--x86-x2apic", MODIFYVM_X86_X2APIC, RTGETOPT_REQ_BOOL_ONOFF), 539 OPT1("--x2apic", MODIFYVM_X86_X2APIC, RTGETOPT_REQ_BOOL_ONOFF), 485 540 }; 486 541 … … 617 672 } 618 673 674 /** 675 * Handles the x86-specific modifyvm options. 676 * 677 * @returns HRESULT 678 * @retval E_INVALIDARG if handed-in option was not being handled. 679 * @param pGetOptState Pointer to GetOpt state to use. 680 * @param c Current GetOpt value (short form). 681 * @param pValueUnion Pointer to current value union. 682 * @param sessionMachine Session machine to use. 683 * @param platformX86 x86-specific platform object to use. 684 */ 685 HRESULT handleModifyVM_x86(PRTGETOPTSTATE pGetOptState, int c, PRTGETOPTUNION pValueUnion, 686 ComPtr<IMachine> &sessionMachine, ComPtr<IPlatformX86> &platformX86) 687 { 688 RT_NOREF(sessionMachine); 689 690 HRESULT hrc = S_OK; 691 692 switch (c) 693 { 694 case MODIFYVM_X86_APIC: 695 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_APIC, pValueUnion->f)); 696 break; 697 698 case MODIFYVM_X86_DELCPUID: 699 CHECK_ERROR(platformX86, RemoveCPUIDLeaf(pValueUnion->PairU32.uFirst, pValueUnion->PairU32.uSecond)); 700 break; 701 702 case MODIFYVM_X86_DELCPUID_OLD: 703 CHECK_ERROR(platformX86, RemoveCPUIDLeaf(pValueUnion->u32, UINT32_MAX)); 704 break; 705 706 case MODIFYVM_X86_DELALLCPUID: 707 CHECK_ERROR(platformX86, RemoveAllCPUIDLeaves()); 708 break; 709 710 case MODIFYVM_X86_HPET: 711 CHECK_ERROR(platformX86, COMSETTER(HPETEnabled)(pValueUnion->f)); 712 break; 713 714 case MODIFYVM_X86_TFRESET: 715 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_TripleFaultReset, pValueUnion->f)); 716 break; 717 718 case MODIFYVM_X86_PAE: 719 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_PAE, pValueUnion->f)); 720 break; 721 722 case MODIFYVM_X86_LONGMODE: 723 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_LongMode, pValueUnion->f)); 724 break; 725 726 case MODIFYVM_X86_X2APIC: 727 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_X2APIC, pValueUnion->f)); 728 break; 729 730 case MODIFYVM_X86_NESTEDPAGING: 731 CHECK_ERROR(platformX86, SetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, pValueUnion->f)); 732 break; 733 734 case MODIFYVM_X86_LARGEPAGES: 735 CHECK_ERROR(platformX86, SetHWVirtExProperty(HWVirtExPropertyType_LargePages, pValueUnion->f)); 736 break; 737 738 case MODIFYVM_X86_VTXVPID: 739 CHECK_ERROR(platformX86, SetHWVirtExProperty(HWVirtExPropertyType_VPID, pValueUnion->f)); 740 break; 741 742 case MODIFYVM_X86_VTXUX: 743 CHECK_ERROR(platformX86, SetHWVirtExProperty(HWVirtExPropertyType_UnrestrictedExecution, pValueUnion->f)); 744 break; 745 746 case MODIFYVM_X86_VIRT_VMSAVE_VMLOAD: 747 CHECK_ERROR(platformX86, SetHWVirtExProperty(HWVirtExPropertyType_VirtVmsaveVmload, pValueUnion->f)); 748 break; 749 750 case MODIFYVM_X86_IBPB_ON_VM_EXIT: 751 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_IBPBOnVMExit, pValueUnion->f)); 752 break; 753 754 case MODIFYVM_X86_IBPB_ON_VM_ENTRY: 755 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_IBPBOnVMEntry, pValueUnion->f)); 756 break; 757 758 case MODIFYVM_X86_SPEC_CTRL: 759 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_SpecCtrl, pValueUnion->f)); 760 break; 761 762 case MODIFYVM_X86_L1D_FLUSH_ON_SCHED: 763 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_L1DFlushOnEMTScheduling, pValueUnion->f)); 764 break; 765 766 case MODIFYVM_X86_L1D_FLUSH_ON_VM_ENTRY: 767 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_L1DFlushOnVMEntry, pValueUnion->f)); 768 break; 769 770 case MODIFYVM_X86_MDS_CLEAR_ON_SCHED: 771 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_MDSClearOnEMTScheduling, pValueUnion->f)); 772 break; 773 774 case MODIFYVM_X86_MDS_CLEAR_ON_VM_ENTRY: 775 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_MDSClearOnVMEntry, pValueUnion->f)); 776 break; 777 778 case MODIFYVM_X86_NESTED_HW_VIRT: 779 CHECK_ERROR(platformX86, SetCPUProperty(CPUPropertyTypeX86_HWVirt, pValueUnion->f)); 780 break; 781 782 case MODIFYVM_X86_HWVIRTEX: 783 CHECK_ERROR(platformX86, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, pValueUnion->f)); 784 break; 785 786 case MODIFYVM_X86_SETCPUID: 787 { 788 uint32_t const idx = c == MODIFYVM_X86_SETCPUID ? pValueUnion->PairU32.uFirst : pValueUnion->u32; 789 uint32_t const idxSub = c == MODIFYVM_X86_SETCPUID ? pValueUnion->PairU32.uSecond : UINT32_MAX; 790 uint32_t aValue[4]; 791 for (unsigned i = 0; i < 4; i++) 792 { 793 int vrc = RTGetOptFetchValue(pGetOptState, pValueUnion, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_HEX); 794 if (RT_FAILURE(vrc)) 795 return errorSyntax(ModifyVM::tr("Missing or invalid argument to '%s'"), 796 pGetOptState->pDef->pszLong); 797 aValue[i] = pValueUnion->u32; 798 } 799 CHECK_ERROR(platformX86, SetCPUIDLeaf(idx, idxSub, aValue[0], aValue[1], aValue[2], aValue[3])); 800 break; 801 } 802 803 default: 804 hrc = E_INVALIDARG; 805 break; 806 } 807 808 return hrc; 809 } 810 619 811 RTEXITCODE handleModifyVM(HandlerArg *a) 620 812 { … … 635 827 636 828 /* Get the number of network adapters */ 637 ULONG NetworkAdapterCount = getMaxNics( a->virtualBox,machine);829 ULONG NetworkAdapterCount = getMaxNics(machine); 638 830 639 831 /* open a session for the VM */ … … 644 836 CHECK_ERROR_RET(a->session, COMGETTER(Machine)(sessionMachine.asOutParam()), RTEXITCODE_FAILURE); 645 837 646 ComPtr<IBIOSSettings> biosSettings; 647 sessionMachine->COMGETTER(BIOSSettings)(biosSettings.asOutParam()); 838 ComPtr<IFirmwareSettings> firmwareSettings; 839 CHECK_ERROR_RET(sessionMachine, COMGETTER(FirmwareSettings)(firmwareSettings.asOutParam()), RTEXITCODE_FAILURE); 840 841 ComPtr<IPlatform> platform; 842 CHECK_ERROR_RET(sessionMachine, COMGETTER(Platform)(platform.asOutParam()), RTEXITCODE_FAILURE); 843 844 /* For the x86-based options we need the x86-specific platform object. */ 845 ComPtr<IPlatformX86> platformX86; 846 platform->COMGETTER(X86)(platformX86.asOutParam()); 648 847 649 848 ComPtr<IGraphicsAdapter> pGraphicsAdapter; … … 742 941 if (!RTStrICmp(ValueUnion.psz, "efi")) 743 942 { 744 CHECK_ERROR( sessionMachine, COMSETTER(FirmwareType)(FirmwareType_EFI));943 CHECK_ERROR(firmwareSettings, COMSETTER(FirmwareType)(FirmwareType_EFI)); 745 944 } 746 945 else if (!RTStrICmp(ValueUnion.psz, "efi32")) 747 946 { 748 CHECK_ERROR( sessionMachine, COMSETTER(FirmwareType)(FirmwareType_EFI32));947 CHECK_ERROR(firmwareSettings, COMSETTER(FirmwareType)(FirmwareType_EFI32)); 749 948 } 750 949 else if (!RTStrICmp(ValueUnion.psz, "efi64")) 751 950 { 752 CHECK_ERROR( sessionMachine, COMSETTER(FirmwareType)(FirmwareType_EFI64));951 CHECK_ERROR(firmwareSettings, COMSETTER(FirmwareType)(FirmwareType_EFI64)); 753 952 } 754 953 else if (!RTStrICmp(ValueUnion.psz, "efidual")) 755 954 { 756 CHECK_ERROR( sessionMachine, COMSETTER(FirmwareType)(FirmwareType_EFIDUAL));955 CHECK_ERROR(firmwareSettings, COMSETTER(FirmwareType)(FirmwareType_EFIDUAL)); 757 956 } 758 957 else if (!RTStrICmp(ValueUnion.psz, "bios")) 759 958 { 760 CHECK_ERROR( sessionMachine, COMSETTER(FirmwareType)(FirmwareType_BIOS));959 CHECK_ERROR(firmwareSettings, COMSETTER(FirmwareType)(FirmwareType_BIOS)); 761 960 } 762 961 else … … 770 969 case MODIFYVM_ACPI: 771 970 { 772 CHECK_ERROR( biosSettings, COMSETTER(ACPIEnabled)(ValueUnion.f));971 CHECK_ERROR(firmwareSettings, COMSETTER(ACPIEnabled)(ValueUnion.f)); 773 972 break; 774 973 } … … 776 975 case MODIFYVM_IOAPIC: 777 976 { 778 CHECK_ERROR(biosSettings, COMSETTER(IOAPICEnabled)(ValueUnion.f)); 779 break; 780 } 781 782 case MODIFYVM_PAE: 783 { 784 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_PAE, ValueUnion.f)); 785 break; 786 } 787 788 case MODIFYVM_LONGMODE: 789 { 790 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_LongMode, ValueUnion.f)); 977 CHECK_ERROR(firmwareSettings, COMSETTER(IOAPICEnabled)(ValueUnion.f)); 791 978 break; 792 979 } … … 795 982 { 796 983 CHECK_ERROR(sessionMachine, COMSETTER(CPUIDPortabilityLevel)(ValueUnion.u32)); 797 break;798 }799 800 case MODIFYVM_TFRESET:801 {802 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_TripleFaultReset, ValueUnion.f));803 break;804 }805 806 case MODIFYVM_APIC:807 {808 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_APIC, ValueUnion.f));809 break;810 }811 812 case MODIFYVM_X2APIC:813 {814 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_X2APIC, ValueUnion.f));815 984 break; 816 985 } … … 845 1014 } 846 1015 847 case MODIFYVM_HWVIRTEX:848 {849 CHECK_ERROR(sessionMachine, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, ValueUnion.f));850 break;851 }852 853 case MODIFYVM_SETCPUID:854 {855 uint32_t const idx = c == MODIFYVM_SETCPUID ? ValueUnion.PairU32.uFirst : ValueUnion.u32;856 uint32_t const idxSub = c == MODIFYVM_SETCPUID ? ValueUnion.PairU32.uSecond : UINT32_MAX;857 uint32_t aValue[4];858 for (unsigned i = 0; i < 4; i++)859 {860 int vrc = RTGetOptFetchValue(&GetOptState, &ValueUnion, RTGETOPT_REQ_UINT32 | RTGETOPT_FLAG_HEX);861 if (RT_FAILURE(vrc))862 return errorSyntax(ModifyVM::tr("Missing or invalid argument to '%s'"),863 GetOptState.pDef->pszLong);864 aValue[i] = ValueUnion.u32;865 }866 CHECK_ERROR(sessionMachine, SetCPUIDLeaf(idx, idxSub, aValue[0], aValue[1], aValue[2], aValue[3]));867 break;868 }869 870 case MODIFYVM_DELCPUID:871 CHECK_ERROR(sessionMachine, RemoveCPUIDLeaf(ValueUnion.PairU32.uFirst, ValueUnion.PairU32.uSecond));872 break;873 874 case MODIFYVM_DELCPUID_OLD:875 CHECK_ERROR(sessionMachine, RemoveCPUIDLeaf(ValueUnion.u32, UINT32_MAX));876 break;877 878 case MODIFYVM_DELALLCPUID:879 {880 CHECK_ERROR(sessionMachine, RemoveAllCPUIDLeaves());881 break;882 }883 884 case MODIFYVM_NESTEDPAGING:885 {886 CHECK_ERROR(sessionMachine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, ValueUnion.f));887 break;888 }889 890 case MODIFYVM_LARGEPAGES:891 {892 CHECK_ERROR(sessionMachine, SetHWVirtExProperty(HWVirtExPropertyType_LargePages, ValueUnion.f));893 break;894 }895 896 case MODIFYVM_VTXVPID:897 {898 CHECK_ERROR(sessionMachine, SetHWVirtExProperty(HWVirtExPropertyType_VPID, ValueUnion.f));899 break;900 }901 902 case MODIFYVM_VTXUX:903 {904 CHECK_ERROR(sessionMachine, SetHWVirtExProperty(HWVirtExPropertyType_UnrestrictedExecution, ValueUnion.f));905 break;906 }907 908 case MODIFYVM_VIRT_VMSAVE_VMLOAD:909 CHECK_ERROR(sessionMachine, SetHWVirtExProperty(HWVirtExPropertyType_VirtVmsaveVmload, ValueUnion.f));910 break;911 912 case MODIFYVM_IBPB_ON_VM_EXIT:913 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_IBPBOnVMExit, ValueUnion.f));914 break;915 916 case MODIFYVM_IBPB_ON_VM_ENTRY:917 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_IBPBOnVMEntry, ValueUnion.f));918 break;919 920 case MODIFYVM_SPEC_CTRL:921 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_SpecCtrl, ValueUnion.f));922 break;923 924 case MODIFYVM_L1D_FLUSH_ON_SCHED:925 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_L1DFlushOnEMTScheduling, ValueUnion.f));926 break;927 928 case MODIFYVM_L1D_FLUSH_ON_VM_ENTRY:929 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_L1DFlushOnVMEntry, ValueUnion.f));930 break;931 932 case MODIFYVM_MDS_CLEAR_ON_SCHED:933 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_MDSClearOnEMTScheduling, ValueUnion.f));934 break;935 936 case MODIFYVM_MDS_CLEAR_ON_VM_ENTRY:937 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_MDSClearOnVMEntry, ValueUnion.f));938 break;939 940 case MODIFYVM_NESTED_HW_VIRT:941 CHECK_ERROR(sessionMachine, SetCPUProperty(CPUPropertyType_HWVirt, ValueUnion.f));942 break;943 944 1016 case MODIFYVM_CPUS: 945 1017 { … … 950 1022 case MODIFYVM_RTCUSEUTC: 951 1023 { 952 CHECK_ERROR( sessionMachine, COMSETTER(RTCUseUTC)(ValueUnion.f));1024 CHECK_ERROR(platform, COMSETTER(RTCUseUTC)(ValueUnion.f)); 953 1025 break; 954 1026 } … … 1029 1101 } 1030 1102 #endif 1031 1032 case MODIFYVM_BIOSLOGOFADEIN: 1033 { 1034 CHECK_ERROR(biosSettings, COMSETTER(LogoFadeIn)(ValueUnion.f)); 1035 break; 1036 } 1037 1038 case MODIFYVM_BIOSLOGOFADEOUT: 1039 { 1040 CHECK_ERROR(biosSettings, COMSETTER(LogoFadeOut)(ValueUnion.f)); 1041 break; 1042 } 1043 1044 case MODIFYVM_BIOSLOGODISPLAYTIME: 1045 { 1046 CHECK_ERROR(biosSettings, COMSETTER(LogoDisplayTime)(ValueUnion.u32)); 1047 break; 1048 } 1049 1050 case MODIFYVM_BIOSLOGOIMAGEPATH: 1051 { 1052 CHECK_ERROR(biosSettings, COMSETTER(LogoImagePath)(Bstr(ValueUnion.psz).raw())); 1053 break; 1054 } 1055 1056 case MODIFYVM_BIOSBOOTMENU: 1103 case MODIFYVM_FWLOGOFADEIN: 1104 { 1105 CHECK_ERROR(firmwareSettings, COMSETTER(LogoFadeIn)(ValueUnion.f)); 1106 break; 1107 } 1108 1109 case MODIFYVM_FWLOGOFADEOUT: 1110 { 1111 CHECK_ERROR(firmwareSettings, COMSETTER(LogoFadeOut)(ValueUnion.f)); 1112 break; 1113 } 1114 1115 case MODIFYVM_FWLOGODISPLAYTIME: 1116 { 1117 CHECK_ERROR(firmwareSettings, COMSETTER(LogoDisplayTime)(ValueUnion.u32)); 1118 break; 1119 } 1120 1121 case MODIFYVM_FWLOGOIMAGEPATH: 1122 { 1123 CHECK_ERROR(firmwareSettings, COMSETTER(LogoImagePath)(Bstr(ValueUnion.psz).raw())); 1124 break; 1125 } 1126 1127 case MODIFYVM_FWBOOTMENU: 1057 1128 { 1058 1129 if (!RTStrICmp(ValueUnion.psz, "disabled")) 1059 1130 { 1060 CHECK_ERROR( biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_Disabled));1131 CHECK_ERROR(firmwareSettings, COMSETTER(BootMenuMode)(FirmwareBootMenuMode_Disabled)); 1061 1132 } 1062 1133 else if (!RTStrICmp(ValueUnion.psz, "menuonly")) 1063 1134 { 1064 CHECK_ERROR( biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MenuOnly));1135 CHECK_ERROR(firmwareSettings, COMSETTER(BootMenuMode)(FirmwareBootMenuMode_MenuOnly)); 1065 1136 } 1066 1137 else if (!RTStrICmp(ValueUnion.psz, "messageandmenu")) 1067 1138 { 1068 CHECK_ERROR( biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MessageAndMenu));1139 CHECK_ERROR(firmwareSettings, COMSETTER(BootMenuMode)(FirmwareBootMenuMode_MessageAndMenu)); 1069 1140 } 1070 1141 else … … 1076 1147 } 1077 1148 1078 case MODIFYVM_ BIOSAPIC:1149 case MODIFYVM_FWAPIC: 1079 1150 { 1080 1151 if (!RTStrICmp(ValueUnion.psz, "disabled")) 1081 1152 { 1082 CHECK_ERROR( biosSettings, COMSETTER(APICMode)(APICMode_Disabled));1153 CHECK_ERROR(firmwareSettings, COMSETTER(APICMode)(APICMode_Disabled)); 1083 1154 } 1084 1155 else if ( !RTStrICmp(ValueUnion.psz, "apic") … … 1086 1157 || !RTStrICmp(ValueUnion.psz, "xapic")) 1087 1158 { 1088 CHECK_ERROR( biosSettings, COMSETTER(APICMode)(APICMode_APIC));1159 CHECK_ERROR(firmwareSettings, COMSETTER(APICMode)(APICMode_APIC)); 1089 1160 } 1090 1161 else if (!RTStrICmp(ValueUnion.psz, "x2apic")) 1091 1162 { 1092 CHECK_ERROR( biosSettings, COMSETTER(APICMode)(APICMode_X2APIC));1163 CHECK_ERROR(firmwareSettings, COMSETTER(APICMode)(APICMode_X2APIC)); 1093 1164 } 1094 1165 else … … 1100 1171 } 1101 1172 1102 case MODIFYVM_ BIOSSYSTEMTIMEOFFSET:1103 { 1104 CHECK_ERROR( biosSettings, COMSETTER(TimeOffset)(ValueUnion.i64));1105 break; 1106 } 1107 1108 case MODIFYVM_ BIOSPXEDEBUG:1109 { 1110 CHECK_ERROR( biosSettings, COMSETTER(PXEDebugEnabled)(ValueUnion.f));1173 case MODIFYVM_FWSYSTEMTIMEOFFSET: 1174 { 1175 CHECK_ERROR(firmwareSettings, COMSETTER(TimeOffset)(ValueUnion.i64)); 1176 break; 1177 } 1178 1179 case MODIFYVM_FWPXEDEBUG: 1180 { 1181 CHECK_ERROR(firmwareSettings, COMSETTER(PXEDebugEnabled)(ValueUnion.f)); 1111 1182 break; 1112 1183 } … … 1114 1185 case MODIFYVM_SYSTEMUUIDLE: 1115 1186 { 1116 CHECK_ERROR( biosSettings, COMSETTER(SMBIOSUuidLittleEndian)(ValueUnion.f));1187 CHECK_ERROR(firmwareSettings, COMSETTER(SMBIOSUuidLittleEndian)(ValueUnion.f)); 1117 1188 break; 1118 1189 } … … 2493 2564 if (vrc != VINF_SUCCESS || uVal == 0) 2494 2565 return errorArgument(ModifyVM::tr("Error parsing UART I/O base '%s'"), pszIOBase); 2495 CHECK_ERROR(uart, COMSETTER(IO Base)(uVal));2566 CHECK_ERROR(uart, COMSETTER(IOAddress)(uVal)); 2496 2567 2497 2568 CHECK_ERROR(uart, COMSETTER(Enabled)(TRUE)); … … 3165 3236 } 3166 3237 3167 case MODIFYVM_HPET:3168 {3169 CHECK_ERROR(sessionMachine, COMSETTER(HPETEnabled)(ValueUnion.f));3170 break;3171 }3172 3173 3238 case MODIFYVM_IOCACHE: 3174 3239 { … … 3187 3252 if (!RTStrICmp(ValueUnion.psz, "piix3")) 3188 3253 { 3189 CHECK_ERROR( sessionMachine, COMSETTER(ChipsetType)(ChipsetType_PIIX3));3254 CHECK_ERROR(platform, COMSETTER(ChipsetType)(ChipsetType_PIIX3)); 3190 3255 } 3191 3256 else if (!RTStrICmp(ValueUnion.psz, "ich9")) 3192 3257 { 3193 CHECK_ERROR( sessionMachine, COMSETTER(ChipsetType)(ChipsetType_ICH9));3258 CHECK_ERROR(platform, COMSETTER(ChipsetType)(ChipsetType_ICH9)); 3194 3259 BOOL fIoApic = FALSE; 3195 CHECK_ERROR( biosSettings, COMGETTER(IOAPICEnabled)(&fIoApic));3260 CHECK_ERROR(firmwareSettings, COMGETTER(IOAPICEnabled)(&fIoApic)); 3196 3261 if (!fIoApic) 3197 3262 { 3198 3263 RTStrmPrintf(g_pStdErr, ModifyVM::tr("*** I/O APIC must be enabled for ICH9, enabling. ***\n")); 3199 CHECK_ERROR( biosSettings, COMSETTER(IOAPICEnabled)(TRUE));3264 CHECK_ERROR(firmwareSettings, COMSETTER(IOAPICEnabled)(TRUE)); 3200 3265 } 3201 3266 } … … 3212 3277 if ( !RTStrICmp(ValueUnion.psz, "none") 3213 3278 || !RTStrICmp(ValueUnion.psz, "disabled")) 3214 CHECK_ERROR( sessionMachine, COMSETTER(IommuType)(IommuType_None));3279 CHECK_ERROR(platform, COMSETTER(IommuType)(IommuType_None)); 3215 3280 else if (!RTStrICmp(ValueUnion.psz, "amd")) 3216 CHECK_ERROR( sessionMachine, COMSETTER(IommuType)(IommuType_AMD));3281 CHECK_ERROR(platform, COMSETTER(IommuType)(IommuType_AMD)); 3217 3282 else if (!RTStrICmp(ValueUnion.psz, "intel")) 3218 3283 { 3219 3284 #ifdef VBOX_WITH_IOMMU_INTEL 3220 CHECK_ERROR( sessionMachine, COMSETTER(IommuType)(IommuType_Intel));3285 CHECK_ERROR(platform, COMSETTER(IommuType)(IommuType_Intel)); 3221 3286 #else 3222 3287 errorArgument(ModifyVM::tr("Invalid --iommu argument '%s' (valid: none,amd,automatic)"), ValueUnion.psz); … … 3226 3291 else if (!RTStrICmp(ValueUnion.psz, "automatic")) 3227 3292 { 3228 CHECK_ERROR( sessionMachine, COMSETTER(IommuType)(IommuType_Automatic));3293 CHECK_ERROR(platform, COMSETTER(IommuType)(IommuType_Automatic)); 3229 3294 #ifndef VBOX_WITH_IOMMU_INTEL 3230 3295 RTStrmPrintf(g_pStdErr, … … 3630 3695 3631 3696 default: 3632 errorGetOpt(c, &ValueUnion); 3697 { 3698 hrc = handleModifyVM_x86(&GetOptState, c, &ValueUnion, machine, platformX86); 3699 if (FAILED(hrc)) 3700 errorGetOpt(c, &ValueUnion); 3633 3701 hrc = E_FAIL; 3634 3702 break; 3703 } 3635 3704 } 3636 3705 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
r98103 r101035 123 123 ComPtr<IMachine> machine; 124 124 ComPtr<IStorageController> storageCtl; 125 ComPtr<ISystemProperties> systemProperties;126 125 127 126 RTGetOptInit(&GetState, a->argc, a->argv, g_aStorageAttachOptions, … … 337 336 return errorSyntax(Storage::tr("Storage controller name not specified")); 338 337 339 /* get the virtualbox system properties */340 CHECK_ERROR_RET(a->virtualBox, COMGETTER(SystemProperties)(systemProperties.asOutParam()), RTEXITCODE_FAILURE);341 342 338 // find the machine, lock it, get the mutable session machine 343 339 CHECK_ERROR_RET(a->virtualBox, FindMachine(Bstr(a->argv[0]).raw(), … … 348 344 a->session->COMGETTER(Machine)(machine.asOutParam()); 349 345 346 ComPtr<IPlatform> platform; 347 CHECK_ERROR_RET(machine, COMGETTER(Platform)(platform.asOutParam()), RTEXITCODE_FAILURE); 348 ComPtr<IPlatformProperties> platformProperties; 349 CHECK_ERROR_RET(platform, COMGETTER(Properties)(platformProperties.asOutParam()), RTEXITCODE_FAILURE); 350 350 351 try 351 352 { … … 369 370 CHECK_ERROR_RET(storageCtl, COMGETTER(Bus)(&storageBus), RTEXITCODE_FAILURE); 370 371 ULONG maxPorts = 0; 371 CHECK_ERROR_RET( systemProperties, GetMaxPortCountForStorageBus(storageBus, &maxPorts), RTEXITCODE_FAILURE);372 CHECK_ERROR_RET(platformProperties, GetMaxPortCountForStorageBus(storageBus, &maxPorts), RTEXITCODE_FAILURE); 372 373 ULONG maxDevices = 0; 373 CHECK_ERROR_RET( systemProperties, GetMaxDevicesPerPortForStorageBus(storageBus, &maxDevices), RTEXITCODE_FAILURE);374 CHECK_ERROR_RET(platformProperties, GetMaxDevicesPerPortForStorageBus(storageBus, &maxDevices), RTEXITCODE_FAILURE); 374 375 375 376 if (port == ~0U) … … 460 461 461 462 /* check if the device type is supported by the controller */ 462 CHECK_ERROR( systemProperties, GetDeviceTypesForStorageBus(storageBus, ComSafeArrayAsOutParam(saDeviceTypes)));463 CHECK_ERROR(platformProperties, GetDeviceTypesForStorageBus(storageBus, ComSafeArrayAsOutParam(saDeviceTypes))); 463 464 for (size_t i = 0; i < saDeviceTypes.size(); ++ i) 464 465 { … … 556 557 com::SafeArray <DeviceType_T> saDeviceTypes; 557 558 558 CHECK_ERROR( systemProperties, GetDeviceTypesForStorageBus(storageBus, ComSafeArrayAsOutParam(saDeviceTypes)));559 CHECK_ERROR(platformProperties, GetDeviceTypesForStorageBus(storageBus, ComSafeArrayAsOutParam(saDeviceTypes))); 559 560 if (SUCCEEDED(hrc)) 560 561 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUtils.cpp
r98103 r101035 40 40 DECLARE_TRANSLATION_CONTEXT(Utils); 41 41 42 unsigned int getMaxNics(const ComPtr<IVirtualBox> &pVirtualBox, 43 const ComPtr<IMachine> &pMachine) 42 ULONG getMaxNics(const ComPtr<IMachine> &pMachine) 44 43 { 45 ULONG NetworkAdapterCount = 0; 44 HRESULT hrc; 45 46 ULONG maxNetworkAdapters = 0; 46 47 do { 47 HRESULT hrc; 48 ComPtr<IPlatform> pPlatform; 49 CHECK_ERROR_BREAK(pMachine, COMGETTER(Platform)(pPlatform.asOutParam())); 48 50 49 C omPtr<ISystemProperties> info;50 CHECK_ERROR_BREAK(p VirtualBox, COMGETTER(SystemProperties)(info.asOutParam()));51 ChipsetType_T chipsetType; 52 CHECK_ERROR_BREAK(pPlatform, COMGETTER(ChipsetType)(&chipsetType)); 51 53 52 C hipsetType_T aChipset;53 CHECK_ERROR_BREAK(p Machine, COMGETTER(ChipsetType)(&aChipset));54 ComPtr<IPlatformProperties> pPlatformProperties; 55 CHECK_ERROR_BREAK(pPlatform, COMGETTER(Properties)(pPlatformProperties.asOutParam())); 54 56 55 CHECK_ERROR_BREAK( info, GetMaxNetworkAdapters(aChipset, &NetworkAdapterCount));57 CHECK_ERROR_BREAK(pPlatformProperties, GetMaxNetworkAdapters(chipsetType, &maxNetworkAdapters)); 56 58 } while (0); 57 59 58 return (unsigned int)NetworkAdapterCount;60 return maxNetworkAdapters; 59 61 } 60 62 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUtils.h
r98103 r101035 36 36 #include <VBox/com/VirtualBox.h> 37 37 38 unsigned int getMaxNics(const ComPtr<IVirtualBox> &pVirtualBox, 39 const ComPtr<IMachine> &pMachine); 38 ULONG getMaxNics(const ComPtr<IMachine> &pMachine); 40 39 41 40 void verifyHostNetworkInterfaceName(const ComPtr<IVirtualBox> &pVirtualBox, -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r100064 r101035 38 38 39 39 /* COM includes: */ 40 #include "C SystemProperties.h"40 #include "CPlatformProperties.h" 41 41 42 42 … … 200 200 case KStorageBus_IDE: 201 201 { 202 int iMaxPort = uiCommon().virtualBox().Get SystemProperties().GetMaxPortCountForStorageBus(storageSlot.bus);203 int iMaxDevice = uiCommon().virtualBox().Get SystemProperties().GetMaxDevicesPerPortForStorageBus(storageSlot.bus);202 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 203 int iMaxDevice = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxDevicesPerPortForStorageBus(storageSlot.bus); 204 204 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 205 205 { … … 224 224 case KStorageBus_SATA: 225 225 { 226 int iMaxPort = uiCommon().virtualBox().Get SystemProperties().GetMaxPortCountForStorageBus(storageSlot.bus);226 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 227 227 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 228 228 { … … 240 240 case KStorageBus_SCSI: 241 241 { 242 int iMaxPort = uiCommon().virtualBox().Get SystemProperties().GetMaxPortCountForStorageBus(storageSlot.bus);242 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 243 243 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 244 244 { … … 256 256 case KStorageBus_SAS: 257 257 { 258 int iMaxPort = uiCommon().virtualBox().Get SystemProperties().GetMaxPortCountForStorageBus(storageSlot.bus);258 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 259 259 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 260 260 { … … 272 272 case KStorageBus_Floppy: 273 273 { 274 int iMaxDevice = uiCommon().virtualBox().Get SystemProperties().GetMaxDevicesPerPortForStorageBus(storageSlot.bus);274 int iMaxDevice = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxDevicesPerPortForStorageBus(storageSlot.bus); 275 275 if (storageSlot.port != 0) 276 276 { … … 288 288 case KStorageBus_USB: 289 289 { 290 int iMaxPort = uiCommon().virtualBox().Get SystemProperties().GetMaxPortCountForStorageBus(storageSlot.bus);290 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 291 291 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 292 292 { … … 304 304 case KStorageBus_PCIe: 305 305 { 306 int iMaxPort = uiCommon().virtualBox().Get SystemProperties().GetMaxPortCountForStorageBus(storageSlot.bus);306 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 307 307 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 308 308 { … … 320 320 case KStorageBus_VirtioSCSI: 321 321 { 322 int iMaxPort = uiCommon().virtualBox().Get SystemProperties().GetMaxPortCountForStorageBus(storageSlot.bus);322 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 323 323 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 324 324 { … … 403 403 if (result.bus == KStorageBus_Null) 404 404 break; 405 const int iMaxPort = uiCommon().virtualBox().Get SystemProperties().GetMaxPortCountForStorageBus(result.bus);406 const int iMaxDevice = uiCommon().virtualBox().Get SystemProperties().GetMaxDevicesPerPortForStorageBus(result.bus);405 const int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(result.bus); 406 const int iMaxDevice = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxDevicesPerPortForStorageBus(result.bus); 407 407 const LONG iPort = iIndex / iMaxPort; 408 408 const LONG iDevice = iIndex % iMaxPort; … … 431 431 if (result.bus == KStorageBus_Null) 432 432 break; 433 const int iMaxPort = uiCommon().virtualBox().Get SystemProperties().GetMaxPortCountForStorageBus(result.bus);433 const int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(result.bus); 434 434 const LONG iPort = regExp.cap(1).toInt(); 435 435 const LONG iDevice = 0; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r100640 r101035 98 98 /* COM includes: */ 99 99 #include "CAudioAdapter.h" 100 #include "CBIOSSettings.h"101 100 #include "CCloudMachine.h" 102 101 #include "CConsole.h" -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp
r100452 r101035 48 48 #include "CCloudMachine.h" 49 49 #include "CConsole.h" 50 #include "CFirmwareSettings.h" 50 51 #include "CForm.h" 51 52 #include "CFormValue.h" … … 56 57 #include "CNetworkAdapter.h" 57 58 #include "CNvramStore.h" 59 #include "CPlatform.h" 60 #include "CPlatformX86.h" 61 #include "CPlatformProperties.h" 58 62 #include "CProgress.h" 59 63 #include "CRangedIntegerFormValue.h" … … 64 68 #include "CStorageController.h" 65 69 #include "CStringFormValue.h" 66 #include "CSystemProperties.h"67 70 #include "CTrustedPlatformModule.h" 68 71 #include "CUefiVariableStore.h" … … 310 313 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_ChipsetType) 311 314 { 312 const KChipsetType enmChipsetType = comMachine.GetChipsetType(); 315 CPlatform comPlatform = comMachine.GetPlatform(); 316 const KChipsetType enmChipsetType = comPlatform.GetChipsetType(); 313 317 if (enmChipsetType == KChipsetType_ICH9) 314 318 table << UITextTableLine(QApplication::translate("UIDetails", "Chipset Type", "details (system)"), … … 329 333 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_Firmware) 330 334 { 331 switch (comMachine.GetFirmwareType()) 335 CFirmwareSettings comFirmwareSettings = comMachine.GetFirmwareSettings(); 336 switch (comFirmwareSettings.GetFirmwareType()) 332 337 { 333 338 case KFirmwareType_EFI: … … 370 375 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeSystem_Acceleration) 371 376 { 377 CPlatform comPlatform = comMachine.GetPlatform(); 378 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 372 379 QStringList acceleration; 373 380 if (uiCommon().virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx)) 374 381 { 375 382 /* Nested Paging: */ 376 if (com Machine.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging))383 if (comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging)) 377 384 acceleration << QApplication::translate("UIDetails", "Nested Paging", "details (system)"); 378 385 } 379 386 /* Nested VT-x/AMD-V: */ 380 if (com Machine.GetCPUProperty(KCPUPropertyType_HWVirt))387 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_HWVirt)) 381 388 acceleration << QApplication::translate("UIDetails", "Nested VT-x/AMD-V", "details (system)"); 382 389 /* PAE/NX: */ 383 if (com Machine.GetCPUProperty(KCPUPropertyType_PAE))390 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE)) 384 391 acceleration << QApplication::translate("UIDetails", "PAE/NX", "details (system)"); 385 392 /* Paravirtualization provider: */ … … 711 718 712 719 /* Iterate over all the adapters: */ 713 const ulong uCount = uiCommon().virtualBox().GetSystemProperties().GetMaxNetworkAdapters(comMachine.GetChipsetType()); 720 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 721 CPlatform comPlatform = comMachine.GetPlatform(); 722 const ulong uCount = comProperties.GetMaxNetworkAdapters(comPlatform.GetChipsetType()); 714 723 for (ulong uSlot = 0; uSlot < uCount; ++uSlot) 715 724 { … … 876 885 877 886 /* Iterate over all the ports: */ 878 const ulong uCount = uiCommon().virtualBox().GetSystemProperties().GetSerialPortCount(); 887 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 888 const ulong uCount = comProperties.GetSerialPortCount(); 879 889 for (ulong uSlot = 0; uSlot < uCount; ++uSlot) 880 890 { … … 887 897 /* Gather port information: */ 888 898 const KPortMode enmMode = comPort.GetHostMode(); 889 const QString strModeTemplate = UITranslator::toCOMPortName(comPort.GetIRQ(), comPort.GetIO Base()) + ", ";899 const QString strModeTemplate = UITranslator::toCOMPortName(comPort.GetIRQ(), comPort.GetIOAddress()) + ", "; 890 900 QString strModeType; 891 901 switch (enmMode) … … 1287 1297 { 1288 1298 /* Determine max amount of network adapters: */ 1289 const CVirtualBox comVBox = uiCommon().virtualBox(); 1290 const KChipsetType enmChipsetType = comMachine.GetChipsetType(); 1291 CSystemProperties comSystemProperties = comVBox.GetSystemProperties(); 1292 const ulong cMaxNetworkAdapters = comSystemProperties.GetMaxNetworkAdapters(enmChipsetType); 1299 CVirtualBox comVBox = uiCommon().virtualBox(); 1300 CPlatform comPlatform = comMachine.GetPlatform(); 1301 const KChipsetType enmChipsetType = comPlatform.GetChipsetType(); 1302 CPlatformProperties comPlatformProperties = comVBox.GetPlatformProperties(KPlatformArchitecture_x86); 1303 const ulong cMaxNetworkAdapters = comPlatformProperties.GetMaxNetworkAdapters(enmChipsetType); 1293 1304 1294 1305 /* Gather adapter properties: */ -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r100861 r101035 69 69 #include "CNATNetwork.h" 70 70 #include "CNetworkAdapter.h" 71 #include "CPlatformProperties.h" 71 72 #include "CRangedIntegerFormValue.h" 72 73 #include "CRangedInteger64FormValue.h" … … 627 628 UIErrorString::formatErrorInfo(comAppliance), 628 629 QString(), QString(), pParent); 630 } 631 632 /* static */ 633 void UINotificationMessage::cannotAcquirePlatformPropertiesParameter(const CPlatformProperties &comProperties) 634 { 635 createMessage( 636 QApplication::translate("UIMessageCenter", "Platform properties failure ..."), 637 QApplication::translate("UIMessageCenter", "Failed to acquire platform properties parameter.") + 638 UIErrorString::formatErrorInfo(comProperties)); 629 639 } 630 640 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r100861 r101035 78 78 class CMouse; 79 79 class CNetworkAdapter; 80 class CPlatformProperties; 80 81 class CStorageController; 81 82 class CSystemProperties; … … 285 286 static void cannotAcquireApplianceParameter(const CAppliance &comAppliance, 286 287 UINotificationCenter *pParent = 0); 288 /** Notifies about inability to acquire IPlatformProperties parameter. 289 * @param comProperties Brings the object parameter get acquired from. */ 290 static void cannotAcquirePlatformPropertiesParameter(const CPlatformProperties &comProperties); 287 291 /** Notifies about inability to acquire ISystemProperties parameter. 288 292 * @param comProperties Brings the object parameter get acquired from. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r100900 r101035 96 96 #include "CMediumAttachment.h" 97 97 #include "CNetworkAdapter.h" 98 #include "CPlatformProperties.h" 98 99 #include "CRecordingSettings.h" 99 100 #include "CSnapshot.h" … … 2697 2698 KChipsetType enmChipsetType = KChipsetType_Null; 2698 2699 uimachine()->acquireChipsetType(enmChipsetType); 2699 const ulong uCount = qMin((ulong)4, (ulong)uiCommon().virtualBox().GetSystemProperties().GetMaxNetworkAdapters(enmChipsetType)); 2700 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 2701 const ulong uCount = qMin((ulong)4, (ulong)comProperties.GetMaxNetworkAdapters(enmChipsetType)); 2700 2702 2701 2703 /* Enumerate existing network adapters: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r100606 r101035 67 67 #include "CMedium.h" 68 68 #include "CMediumAttachment.h" 69 #include "CPlatform.h" 70 #include "CPlatformProperties.h" 69 71 #include "CRecordingSettings.h" 70 72 #include "CSnapshot.h" … … 301 303 if (comMachine.isNull()) 302 304 return false; 303 const KChipsetType enmChipsetType = comMachine.GetChipsetType(); 305 CPlatform comPlatform = comMachine.GetPlatform(); 306 const KChipsetType enmChipsetType = comPlatform.GetChipsetType(); 304 307 const bool fSuccess = comMachine.isOk(); 305 308 if (!fSuccess) … … 1229 1232 CVirtualBox comVBox = uiCommon().virtualBox(); 1230 1233 AssertReturn(comVBox.isNotNull(), false); 1231 C SystemProperties comProperties = comVBox.GetSystemProperties();1234 CPlatformProperties comProperties = comVBox.GetPlatformProperties(KPlatformArchitecture_x86); 1232 1235 if (!comVBox.isOk()) 1233 1236 { … … 1245 1248 fSuccess = comProperties.isOk(); 1246 1249 if (!fSuccess) 1247 UINotificationMessage::cannotAcquire SystemPropertiesParameter(comProperties);1250 UINotificationMessage::cannotAcquirePlatformPropertiesParameter(comProperties); 1248 1251 else 1249 1252 { … … 2693 2696 2694 2697 /* Enumerate all the virtual network adapters: */ 2695 const ulong cCount = uiCommon().virtualBox().GetSystemProperties().GetMaxNetworkAdapters(machine().GetChipsetType()); 2698 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 2699 CPlatform comPlatform = machine().GetPlatform(); 2700 const ulong cCount = comProperties.GetMaxNetworkAdapters(comPlatform.GetChipsetType()); 2696 2701 for (ulong uAdapterIndex = 0; uAdapterIndex < cCount; ++uAdapterIndex) 2697 2702 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioControllerEditor.cpp
r101011 r101035 38 38 39 39 /* COM includes: */ 40 #include "C SystemProperties.h"40 #include "CPlatformProperties.h" 41 41 42 42 … … 147 147 148 148 /* Load currently supported audio driver types: */ 149 C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();149 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 150 150 m_supportedValues = comProperties.GetSupportedAudioControllerTypes(); 151 151 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBootOrderEditor.cpp
r101011 r101035 44 44 #include "COMEnums.h" 45 45 #include "CMachine.h" 46 #include "C SystemProperties.h"46 #include "CPlatformProperties.h" 47 47 48 48 … … 333 333 << KDeviceType_HardDisk 334 334 << KDeviceType_Network; 335 const C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();335 const CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 336 336 const int iPossibleBootListSize = qMin((ULONG)4, comProperties.GetMaxBootPosition()); 337 337 possibleBootItems.resize(iPossibleBootListSize); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIChipsetEditor.cpp
r101011 r101035 38 38 39 39 /* COM includes: */ 40 #include "C SystemProperties.h"40 #include "CPlatformProperties.h" 41 41 42 42 … … 150 150 151 151 /* Load currently supported values: */ 152 C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();152 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 153 153 m_supportedValues = comProperties.GetSupportedChipsetTypes(); 154 154 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGraphicsControllerEditor.cpp
r101011 r101035 38 38 39 39 /* COM includes: */ 40 #include "C SystemProperties.h"40 #include "CPlatformProperties.h" 41 41 42 42 … … 156 156 157 157 /* Load currently supported graphics controller types: */ 158 C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();158 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 159 159 m_supportedValues = comProperties.GetSupportedGraphicsControllerTypes(); 160 160 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkFeaturesEditor.cpp
r101011 r101035 45 45 46 46 /* COM includes: */ 47 #include "C SystemProperties.h"47 #include "CPlatformProperties.h" 48 48 49 49 … … 465 465 466 466 /* Load currently supported types: */ 467 C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();467 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 468 468 QVector<KNetworkAdapterType> supportedTypes = comProperties.GetSupportedNetworkAdapterTypes(); 469 469 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIParavirtProviderEditor.cpp
r101011 r101035 38 38 39 39 /* COM includes: */ 40 #include "C SystemProperties.h"40 #include "CPlatformProperties.h" 41 41 42 42 … … 147 147 148 148 /* Load currently supported paravirt provider types: */ 149 C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();149 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 150 150 m_supportedValues = comProperties.GetSupportedParavirtProviders(); 151 151 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStorageSettingsEditor.cpp
r101011 r101035 63 63 64 64 /* COM includes: */ 65 #include "CPlatformProperties.h" 65 66 #include "CSystemProperties.h" 66 67 … … 1214 1215 { 1215 1216 /* Limit maximum port count: */ 1216 m_uPortCount = qMin(uPortCount, (uint)uiCommon().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(bus())); 1217 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1218 m_uPortCount = qMin(uPortCount, (uint)comProperties.GetMaxPortCountForStorageBus(bus())); 1217 1219 } 1218 1220 … … 1231 1233 uint ControllerItem::maxPortCount() 1232 1234 { 1233 return (uint)uiCommon().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(bus()); 1235 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1236 return (uint)comProperties.GetMaxPortCountForStorageBus(bus()); 1234 1237 } 1235 1238 … … 1247 1250 { 1248 1251 SlotsList allSlots; 1249 C SystemProperties comProps = uiCommon().virtualBox().GetSystemProperties();1252 CPlatformProperties comProps = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1250 1253 for (ULONG i = 0; i < comProps.GetMaxPortCountForStorageBus(bus()); ++ i) 1251 1254 for (ULONG j = 0; j < comProps.GetMaxDevicesPerPortForStorageBus(bus()); ++ j) … … 1264 1267 DeviceTypeList ControllerItem::deviceTypeList() const 1265 1268 { 1266 return uiCommon().virtualBox().GetSystemProperties().GetDeviceTypesForStorageBus(m_enmBus).toList(); 1269 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1270 return comProperties.GetDeviceTypesForStorageBus(m_enmBus).toList(); 1267 1271 } 1268 1272 … … 1344 1348 1345 1349 /* Load currently supported storage buses: */ 1346 C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();1350 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1347 1351 const QVector<KStorageBus> supportedBuses = comProperties.GetSupportedStorageBuses(); 1348 1352 … … 1366 1370 1367 1371 /* Load currently supported storage buses & types: */ 1368 C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();1372 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1369 1373 const QVector<KStorageBus> supportedBuses = comProperties.GetSupportedStorageBuses(); 1370 1374 const QVector<KStorageControllerType> supportedTypes = comProperties.GetSupportedStorageControllerTypes(); … … 1859 1863 case R_IsMoreIDEControllersPossible: 1860 1864 { 1865 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1861 1866 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1862 1867 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_IDE) < 1863 uiCommon().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_IDE));1868 comProperties.GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_IDE)); 1864 1869 } 1865 1870 case R_IsMoreSATAControllersPossible: 1866 1871 { 1872 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1867 1873 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1868 1874 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_SATA) < 1869 uiCommon().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_SATA));1875 comProperties.GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_SATA)); 1870 1876 } 1871 1877 case R_IsMoreSCSIControllersPossible: 1872 1878 { 1879 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1873 1880 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1874 1881 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_SCSI) < 1875 uiCommon().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_SCSI));1882 comProperties.GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_SCSI)); 1876 1883 } 1877 1884 case R_IsMoreFloppyControllersPossible: 1878 1885 { 1886 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1879 1887 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1880 1888 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_Floppy) < 1881 uiCommon().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_Floppy));1889 comProperties.GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_Floppy)); 1882 1890 } 1883 1891 case R_IsMoreSASControllersPossible: 1884 1892 { 1893 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1885 1894 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1886 1895 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_SAS) < 1887 uiCommon().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_SAS));1896 comProperties.GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_SAS)); 1888 1897 } 1889 1898 case R_IsMoreUSBControllersPossible: 1890 1899 { 1900 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1891 1901 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1892 1902 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_USB) < 1893 uiCommon().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_USB));1903 comProperties.GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_USB)); 1894 1904 } 1895 1905 case R_IsMoreNVMeControllersPossible: 1896 1906 { 1907 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1897 1908 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1898 1909 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_PCIe) < 1899 uiCommon().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_PCIe));1910 comProperties.GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_PCIe)); 1900 1911 } 1901 1912 case R_IsMoreVirtioSCSIControllersPossible: 1902 1913 { 1914 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1903 1915 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1904 1916 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_VirtioSCSI) < 1905 uiCommon().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_VirtioSCSI));1917 comProperties.GetMaxInstancesOfStorageBus(chipsetType(), KStorageBus_VirtioSCSI)); 1906 1918 } 1907 1919 case R_IsMoreAttachmentsPossible: … … 1912 1924 { 1913 1925 ControllerItem *pItemController = qobject_cast<ControllerItem*>(pItem); 1914 C SystemProperties comProps = uiCommon().virtualBox().GetSystemProperties();1926 CPlatformProperties comProps = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1915 1927 const bool fIsMoreAttachmentsPossible = (ULONG)rowCount(specifiedIndex) < 1916 1928 (comProps.GetMaxPortCountForStorageBus(pItemController->bus()) * … … 2258 2270 2259 2271 /* Lets make sure there is enough of place for all the remaining attachments: */ 2272 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 2260 2273 const uint uMaxPortCount = 2261 (uint) uiCommon().virtualBox().GetSystemProperties().GetMaxPortCountForStorageBus(enmNewCtrBusType);2274 (uint)comProperties.GetMaxPortCountForStorageBus(enmNewCtrBusType); 2262 2275 const uint uMaxDevicePerPortCount = 2263 (uint) uiCommon().virtualBox().GetSystemProperties().GetMaxDevicesPerPortForStorageBus(enmNewCtrBusType);2276 (uint)comProperties.GetMaxDevicesPerPortForStorageBus(enmNewCtrBusType); 2264 2277 const QList<QUuid> ids = pItemController->attachmentIDs(); 2265 2278 if (uMaxPortCount * uMaxDevicePerPortCount < (uint)ids.size()) … … 2656 2669 { 2657 2670 QMap<KStorageBus, int> maximumMap; 2671 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 2658 2672 for (int iStorageBusType = KStorageBus_IDE; iStorageBusType < KStorageBus_Max; ++iStorageBusType) 2659 {2660 2673 maximumMap.insert((KStorageBus)iStorageBusType, 2661 uiCommon().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus(chipsetType(), (KStorageBus)iStorageBusType)); 2662 } 2674 comProperties.GetMaxInstancesOfStorageBus(chipsetType(), (KStorageBus)iStorageBusType)); 2663 2675 return maximumMap; 2664 2676 } … … 3264 3276 { 3265 3277 /* Load currently supported storage buses and types: */ 3266 C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();3278 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 3267 3279 const QVector<KStorageBus> supportedBuses = comProperties.GetSupportedStorageBuses(); 3268 3280 const QVector<KStorageControllerType> supportedTypes = comProperties.GetSupportedStorageControllerTypes(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UITpmEditor.cpp
r101011 r101035 38 38 39 39 /* COM includes: */ 40 #include "C SystemProperties.h"40 #include "CPlatformProperties.h" 41 41 42 42 … … 148 148 149 149 /* Load currently supported values: */ 150 C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();150 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 151 151 m_supportedValues = comProperties.GetSupportedTpmTypes(); 152 152 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUSBControllerEditor.cpp
r101011 r101035 36 36 37 37 /* COM includes: */ 38 #include "C SystemProperties.h"38 #include "CPlatformProperties.h" 39 39 40 40 … … 145 145 { 146 146 /* Load currently supported types: */ 147 C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();147 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 148 148 m_supportedValues = comProperties.GetSupportedUSBControllerTypes(); 149 149 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r98103 r101035 52 52 #include "CMedium.h" 53 53 #include "CMediumAttachment.h" 54 #include "CPlatform.h" 55 #include "CPlatformX86.h" 54 56 #include "CProgress.h" 55 57 … … 729 731 // Should we check global object getters? 730 732 const CGuestOSType &comNewType = vbox.GetGuestOSType(newGeneralData.m_strGuestOsTypeId); 731 m_machine.SetCPUProperty(KCPUPropertyType_LongMode, comNewType.GetIs64Bit()); 732 fSuccess = m_machine.isOk(); 733 CPlatform comPlatform = m_machine.GetPlatform(); 734 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 735 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_LongMode, comNewType.GetIs64Bit()); 736 fSuccess = comPlatformX86.isOk(); 737 /// @todo convey error info .. 733 738 } 734 739 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r98103 r101035 42 42 #include "CNATEngine.h" 43 43 #include "CNetworkAdapter.h" 44 #include "CPlatformProperties.h" 44 45 45 46 … … 907 908 * is that the limitation to 4 isn't necessary any more, but this needs to be checked 908 909 * on all platforms to be certain that it's usable everywhere. */ 909 const ulong uCount = qMin((ULONG)4, uiCommon().virtualBox().Get SystemProperties().GetMaxNetworkAdapters(KChipsetType_PIIX3));910 const ulong uCount = qMin((ULONG)4, uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxNetworkAdapters(KChipsetType_PIIX3)); 910 911 911 912 /* Create corresponding adapter tabs: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
r100154 r101035 45 45 46 46 /* COM includes: */ 47 #include "CPlatformProperties.h" 47 48 #include "CSerialPort.h" 48 49 … … 800 801 oldPortData.m_fPortEnabled = comPort.GetEnabled(); 801 802 oldPortData.m_uIRQ = comPort.GetIRQ(); 802 oldPortData.m_uIOBase = comPort.GetIO Base();803 oldPortData.m_uIOBase = comPort.GetIOAddress(); 803 804 oldPortData.m_hostMode = comPort.GetHostMode(); 804 805 oldPortData.m_fServer = comPort.GetServer(); … … 973 974 { 974 975 /* How many ports to display: */ 975 const ulong uCount = uiCommon().virtualBox().Get SystemProperties().GetSerialPortCount();976 const ulong uCount = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetSerialPortCount(); 976 977 977 978 /* Create corresponding port tabs: */ … … 1115 1116 if (fSuccess && isMachineOffline() && newPortData.m_uIOBase != oldPortData.m_uIOBase) 1116 1117 { 1117 comPort.SetIO Base(newPortData.m_uIOBase);1118 comPort.SetIOAddress(newPortData.m_uIOBase); 1118 1119 fSuccess = comPort.isOk(); 1119 1120 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r98103 r101035 48 48 49 49 /* COM includes: */ 50 #include "CBIOSSettings.h" 50 #include "CFirmwareSettings.h" 51 #include "CPlatform.h" 52 #include "CPlatformX86.h" 51 53 #include "CNvramStore.h" 52 54 #include "CTrustedPlatformModule.h" … … 269 271 UIDataSettingsMachineSystem oldSystemData; 270 272 273 CPlatform comPlatform = m_machine.GetPlatform(); 274 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 275 CFirmwareSettings comFirmwareSettings = m_machine.GetFirmwareSettings(); 276 CNvramStore comStoreLvl1 = m_machine.GetNonVolatileStore(); 277 CUefiVariableStore comStoreLvl2 = comStoreLvl1.GetUefiVariableStore(); 278 271 279 /* Gather support flags: */ 272 280 oldSystemData.m_fSupportedPAE = uiCommon().host().GetProcessorFeature(KProcessorFeature_PAE); … … 278 286 oldSystemData.m_iMemorySize = m_machine.GetMemorySize(); 279 287 oldSystemData.m_bootItems = loadBootItems(m_machine); 280 oldSystemData.m_chipsetType = m_machine.GetChipsetType();288 oldSystemData.m_chipsetType = comPlatform.GetChipsetType(); 281 289 oldSystemData.m_tpmType = m_machine.GetTrustedPlatformModule().GetType(); 282 290 oldSystemData.m_pointingHIDType = m_machine.GetPointingHIDType(); 283 oldSystemData.m_fEnabledIoApic = m_machine.GetBIOSSettings().GetIOAPICEnabled(); 284 oldSystemData.m_fEnabledEFI = m_machine.GetFirmwareType() >= KFirmwareType_EFI && m_machine.GetFirmwareType() <= KFirmwareType_EFIDUAL; 285 oldSystemData.m_fEnabledUTC = m_machine.GetRTCUseUTC(); 286 CNvramStore comStoreLvl1 = m_machine.GetNonVolatileStore(); 287 CUefiVariableStore comStoreLvl2 = comStoreLvl1.GetUefiVariableStore(); 291 oldSystemData.m_fEnabledIoApic = comFirmwareSettings.GetIOAPICEnabled(); 292 oldSystemData.m_fEnabledEFI = comFirmwareSettings.GetFirmwareType() >= KFirmwareType_EFI && comFirmwareSettings.GetFirmwareType() <= KFirmwareType_EFIDUAL; 293 oldSystemData.m_fEnabledUTC = comPlatform.GetRTCUseUTC(); 288 294 oldSystemData.m_fAvailableSecureBoot = comStoreLvl2.isNotNull(); 289 295 oldSystemData.m_fEnabledSecureBoot = oldSystemData.m_fAvailableSecureBoot … … 295 301 oldSystemData.m_cCPUCount = oldSystemData.m_fSupportedHwVirtEx ? m_machine.GetCPUCount() : 1; 296 302 oldSystemData.m_iCPUExecCap = m_machine.GetCPUExecutionCap(); 297 oldSystemData.m_fEnabledPAE = m_machine.GetCPUProperty(KCPUPropertyType_PAE);298 oldSystemData.m_fEnabledNestedHwVirtEx = m_machine.GetCPUProperty(KCPUPropertyType_HWVirt);303 oldSystemData.m_fEnabledPAE = comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE); 304 oldSystemData.m_fEnabledNestedHwVirtEx = comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_HWVirt); 299 305 300 306 /* Gather old 'Acceleration' data: */ 301 307 oldSystemData.m_paravirtProvider = m_machine.GetParavirtProvider(); 302 oldSystemData.m_fEnabledNestedPaging = m_machine.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging);308 oldSystemData.m_fEnabledNestedPaging = comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging); 303 309 304 310 /* Cache old data: */ … … 883 889 if (fSuccess && isMachineOffline() && newSystemData.m_chipsetType != oldSystemData.m_chipsetType) 884 890 { 885 m_machine.SetChipsetType(newSystemData.m_chipsetType); 886 fSuccess = m_machine.isOk(); 891 CPlatform comPlatform = m_machine.GetPlatform(); 892 comPlatform.SetChipsetType(newSystemData.m_chipsetType); 893 fSuccess = comPlatform.isOk(); 894 /// @todo convey error info .. 887 895 } 888 896 /* Save TPM type: */ … … 903 911 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledIoApic != oldSystemData.m_fEnabledIoApic) 904 912 { 905 m_machine.GetBIOSSettings().SetIOAPICEnabled(newSystemData.m_fEnabledIoApic); 906 fSuccess = m_machine.isOk(); 913 CFirmwareSettings comFirmwareSettings = m_machine.GetFirmwareSettings(); 914 comFirmwareSettings.SetIOAPICEnabled(newSystemData.m_fEnabledIoApic); 915 fSuccess = comFirmwareSettings.isOk(); 916 /// @todo convey error info .. 907 917 } 908 918 /* Save firware type (whether EFI is enabled): */ 909 919 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledEFI != oldSystemData.m_fEnabledEFI) 910 920 { 911 m_machine.SetFirmwareType(newSystemData.m_fEnabledEFI ? KFirmwareType_EFI : KFirmwareType_BIOS); 912 fSuccess = m_machine.isOk(); 921 CFirmwareSettings comFirmwareSettings = m_machine.GetFirmwareSettings(); 922 comFirmwareSettings.SetFirmwareType(newSystemData.m_fEnabledEFI ? KFirmwareType_EFI : KFirmwareType_BIOS); 923 fSuccess = comFirmwareSettings.isOk(); 924 /// @todo convey error info .. 913 925 } 914 926 /* Save whether UTC is enabled: */ 915 927 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledUTC != oldSystemData.m_fEnabledUTC) 916 928 { 917 m_machine.SetRTCUseUTC(newSystemData.m_fEnabledUTC); 918 fSuccess = m_machine.isOk(); 929 CPlatform comPlatform = m_machine.GetPlatform(); 930 comPlatform.SetRTCUseUTC(newSystemData.m_fEnabledUTC); 931 fSuccess = comPlatform.isOk(); 932 /// @todo convey error info .. 919 933 } 920 934 /* Save whether secure boot is enabled: */ … … 989 1003 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledPAE != oldSystemData.m_fEnabledPAE) 990 1004 { 991 m_machine.SetCPUProperty(KCPUPropertyType_PAE, newSystemData.m_fEnabledPAE); 992 fSuccess = m_machine.isOk(); 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 .. 993 1010 } 994 1011 /* Save whether Nested HW Virt Ex is enabled: */ 995 1012 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledNestedHwVirtEx != oldSystemData.m_fEnabledNestedHwVirtEx) 996 1013 { 997 m_machine.SetCPUProperty(KCPUPropertyType_HWVirt, newSystemData.m_fEnabledNestedHwVirtEx); 998 fSuccess = m_machine.isOk(); 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 .. 999 1019 } 1000 1020 /* Save CPU execution cap: */ … … 1038 1058 if (fSuccess && isMachineOffline() && newSystemData.m_fEnabledNestedPaging != oldSystemData.m_fEnabledNestedPaging) 1039 1059 { 1040 m_machine.SetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging, newSystemData.m_fEnabledNestedPaging); 1041 fSuccess = m_machine.isOk(); 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 .. 1042 1065 } 1043 1066 -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp
r100075 r101035 62 62 #include "CAudioAdapter.h" 63 63 #include "CAudioSettings.h" 64 #include "CFirmwareSettings.h" 64 65 #include "CRecordingSettings.h" 65 66 #include "CRecordingScreenSettings.h" … … 68 69 #include "CMediumAttachment.h" 69 70 #include "CNetworkAdapter.h" 71 #include "CPlatform.h" 72 #include "CPlatformX86.h" 73 #include "CPlatformProperties.h" 70 74 #include "CSerialPort.h" 71 75 #include "CSharedFolder.h" 72 76 #include "CStorageController.h" 73 #include "CSystemProperties.h"74 77 #include "CUSBController.h" 75 78 #include "CUSBDeviceFilter.h" … … 1359 1362 1360 1363 /* Chipset Type? */ 1361 const KChipsetType enmChipsetType = comMachine.GetChipsetType(); 1362 const KChipsetType enmChipsetTypeOld = comMachineOld.GetChipsetType(); 1364 CPlatform comPlatform = comMachine.GetPlatform(); 1365 const KChipsetType enmChipsetType = comPlatform.GetChipsetType(); 1366 CPlatform comPlatformOld = comMachineOld.GetPlatform(); 1367 const KChipsetType enmChipsetTypeOld = comPlatformOld.GetChipsetType(); 1363 1368 if (enmChipsetType == KChipsetType_ICH9) 1364 1369 { … … 1715 1720 QStringList aReport; 1716 1721 /* Iterate through boot device types: */ 1717 for (ulong i = 1; i <= uiCommon().virtualBox().GetSystemProperties().GetMaxBootPosition(); ++i) 1722 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1723 for (ulong i = 1; i <= comProperties.GetMaxBootPosition(); ++i) 1718 1724 { 1719 1725 const KDeviceType enmDevice = comMachine.GetBootOrder(i); … … 1733 1739 /* Prepare report: */ 1734 1740 QString strReport; 1735 switch (comMachine.GetFirmwareType()) 1741 CFirmwareSettings comFirmwareSettings = comMachine.GetFirmwareSettings(); 1742 switch (comFirmwareSettings.GetFirmwareType()) 1736 1743 { 1737 1744 case KFirmwareType_EFI: … … 1756 1763 QString UISnapshotDetailsWidget::accelerationReport(const CMachine &comMachine) 1757 1764 { 1765 /* Acquire platform stuff: */ 1766 CPlatform comPlatform = comMachine.GetPlatform(); 1767 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 1768 1758 1769 /* Prepare report: */ 1759 1770 QStringList aReport; … … 1762 1773 { 1763 1774 /* VT-x/AMD-V? */ 1764 if (com Machine.GetHWVirtExProperty(KHWVirtExPropertyType_Enabled))1775 if (comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_Enabled)) 1765 1776 { 1766 1777 aReport << QApplication::translate("UIDetails", "VT-x/AMD-V", "details (system)"); 1767 1778 /* Nested Paging? */ 1768 if (com Machine.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging))1779 if (comPlatformX86.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging)) 1769 1780 aReport << QApplication::translate("UIDetails", "Nested Paging", "details (system)"); 1770 1781 } 1771 1782 } 1772 1783 /* PAE/NX? */ 1773 if (com Machine.GetCPUProperty(KCPUPropertyType_PAE))1784 if (comPlatformX86.GetCPUProperty(KCPUPropertyTypeX86_PAE)) 1774 1785 aReport << QApplication::translate("UIDetails", "PAE/NX", "details (system)"); 1775 1786 /* Paravirtualization Interface? */ … … 1935 1946 QStringList aReport; 1936 1947 /* Iterate through machine network adapters: */ 1937 const ulong iCount = uiCommon().virtualBox().GetSystemProperties().GetMaxNetworkAdapters(comMachine.GetChipsetType()); 1948 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 1949 CPlatform comPlatform = comMachine.GetPlatform(); 1950 const ulong iCount = comProperties.GetMaxNetworkAdapters(comPlatform.GetChipsetType()); 1938 1951 for (ulong iSlot = 0; iSlot < iCount; ++iSlot) 1939 1952 { … … 1993 2006 QStringList aReport; 1994 2007 /* Iterate through machine serial ports: */ 1995 const ulong iCount = uiCommon().virtualBox().GetSystemProperties().GetSerialPortCount(); 2008 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 2009 const ulong iCount = comProperties.GetSerialPortCount(); 1996 2010 for (ulong iSlot = 0; iSlot < iCount; ++iSlot) 1997 2011 { … … 2004 2018 /* Compose the data: */ 2005 2019 QStringList aInfo; 2006 aInfo << UITranslator::toCOMPortName(comPort.GetIRQ(), comPort.GetIO Base());2020 aInfo << UITranslator::toCOMPortName(comPort.GetIRQ(), comPort.GetIOAddress()); 2007 2021 if ( enmMode == KPortMode_HostPipe 2008 2022 || enmMode == KPortMode_HostDevice -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
r100638 r101035 51 51 52 52 /* COM includes: */ 53 #include "CPlatformProperties.h" 53 54 #include "CSystemProperties.h" 54 55 … … 840 841 QComboBox *pComboBox = new QComboBox(pParent); 841 842 /* Load currently supported network adapter types: */ 842 C SystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();843 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 843 844 QVector<KNetworkAdapterType> supportedTypes = comProperties.GetSupportedNetworkAdapterTypes(); 844 845 /* Take currently requested type into account if it's sane: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp
r98103 r101035 190 190 CVirtualBox comVBox = uiCommon().virtualBox(); 191 191 /* Create a new machine object: */ 192 CMachine cloneMachine = comVBox.CreateMachine(m_strCloneFilePath, m_strCloneName, QVector<QString>(), QString(), QString(), 192 CMachine cloneMachine = comVBox.CreateMachine(m_strCloneFilePath, m_strCloneName, KPlatformArchitecture_x86, 193 QVector<QString>(), QString(), QString(), 193 194 QString(), QString(), QString()); 194 195 if (!comVBox.isOk()) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r99207 r101035 45 45 #include "CAudioAdapter.h" 46 46 #include "CAudioSettings.h" 47 #include "C BIOSSettings.h"47 #include "CFirmwareSettings.h" 48 48 #include "CGraphicsAdapter.h" 49 49 #include "CExtPackManager.h" 50 50 #include "CMediumFormat.h" 51 #include "CPlatform.h" 52 #include "CPlatformX86.h" 51 53 #include "CStorageController.h" 52 54 #include "CUSBController.h" … … 157 159 m_machine = vbox.CreateMachine(m_strMachineFilePath, 158 160 m_strMachineBaseName, 161 KPlatformArchitecture_x86, 159 162 groups, strTypeId, QString(), 160 163 QString(), QString(), QString()); … … 166 169 } 167 170 } 171 172 CFirmwareSettings comFirmwareSettings = m_machine.GetFirmwareSettings(); 168 173 169 174 #if 0 … … 182 187 /* Enabled I/O APIC explicitly in we have more than 1 VCPU: */ 183 188 if (iVPUCount > 1) 184 m_machine.GetBIOSSettings().SetIOAPICEnabled(true);189 comFirmwareSettings.SetIOAPICEnabled(true); 185 190 186 191 /* Set recommended firmware type: */ 187 m_machine.SetFirmwareType(m_fEFIEnabled ? KFirmwareType_EFI : KFirmwareType_BIOS);192 comFirmwareSettings.SetFirmwareType(m_fEFIEnabled ? KFirmwareType_EFI : KFirmwareType_BIOS); 188 193 #endif 189 194 … … 276 281 void UIWizardNewVM::configureVM(const QString &strGuestTypeId, const CGuestOSType &comGuestType) 277 282 { 283 /* Acquire platform stuff: */ 284 CPlatform comPlatform = m_machine.GetPlatform(); 285 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 286 CFirmwareSettings comFirmwareSettings = m_machine.GetFirmwareSettings(); 287 278 288 /* Get graphics adapter: */ 279 289 CGraphicsAdapter comGraphics = m_machine.GetGraphicsAdapter(); … … 288 298 /* Enabled I/O APIC explicitly in we have more than 1 VCPU: */ 289 299 if (iVPUCount > 1) 290 m_machine.GetBIOSSettings().SetIOAPICEnabled(true);300 comFirmwareSettings.SetIOAPICEnabled(true); 291 301 292 302 /* Graphics Controller type: */ … … 297 307 298 308 /* Selecting recommended chipset type: */ 299 m_machine.SetChipsetType(comGuestType.GetRecommendedChipset());309 comPlatform.SetChipsetType(comGuestType.GetRecommendedChipset()); 300 310 301 311 /* Selecting recommended Audio Controller: */ … … 373 383 374 384 /* Turn on PAE, if recommended: */ 375 m_machine.SetCPUProperty(KCPUPropertyType_PAE, comGuestType.GetRecommendedPAE());385 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_PAE, comGuestType.GetRecommendedPAE()); 376 386 377 387 /* Set the recommended triple fault behavior: */ 378 m_machine.SetCPUProperty(KCPUPropertyType_TripleFaultReset, comGuestType.GetRecommendedTFReset());388 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_TripleFaultReset, comGuestType.GetRecommendedTFReset()); 379 389 380 390 /* Set recommended firmware type: */ 381 m_machine.SetFirmwareType(m_fEFIEnabled ? KFirmwareType_EFI : KFirmwareType_BIOS);391 comFirmwareSettings.SetFirmwareType(m_fEFIEnabled ? KFirmwareType_EFI : KFirmwareType_BIOS); 382 392 383 393 /* Set recommended human interface device types: */ … … 398 408 399 409 /* Set HPET flag: */ 400 m_machine.SetHPETEnabled(comGuestType.GetRecommendedHPET());410 comPlatformX86.SetHPETEnabled(comGuestType.GetRecommendedHPET()); 401 411 402 412 /* Set UTC flags: */ 403 m_machine.SetRTCUseUTC(comGuestType.GetRecommendedRTCUseUTC());413 comPlatform.SetRTCUseUTC(comGuestType.GetRecommendedRTCUseUTC()); 404 414 405 415 /* Set graphic bits: */
Note:
See TracChangeset
for help on using the changeset viewer.