Changeset 78509 in vbox
- Timestamp:
- May 14, 2019 3:16:21 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 130549
- Location:
- trunk/src/VBox/Main
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r78485 r78509 598 598 <const name="v1_17" value="19"> 599 599 <desc>Settings version "1.17", written by VirtualBox 6.0.x.</desc> 600 <!-- 601 Machine changes: nested hardware virtualization, UART type selection. 602 --> 603 </const> 604 <const name="v1_18" value="20"> 605 <desc>Settings version "1.18", written by VirtualBox 6.1.x.</desc> 600 606 <!-- 601 607 Machine changes: nested hardware virtualization, UART type selection. … … 21714 21720 <enum 21715 21721 name="StorageBus" 21716 uuid=" 21371490-8542-4b5a-a74d-ee9ac2d45a90"21722 uuid="f9510869-7d07-46ba-96a6-6728fbf4adee" 21717 21723 > 21718 21724 <desc> … … 21730 21736 <const name="USB" value="6"/> 21731 21737 <const name="PCIe" value="7"/> 21738 <const name="VirtioSCSI" value="8"/> 21732 21739 </enum> 21733 21740 21734 21741 <enum 21735 21742 name="StorageControllerType" 21736 uuid=" 9427f309-82e7-468f-9964-abfefc4d3058"21743 uuid="a77d457d-66a3-4368-b24c-293d0f562a9f" 21737 21744 > 21738 21745 <desc> … … 21773 21780 <const name="NVMe" value="10"> 21774 21781 <desc>An NVMe storage controller.</desc> 21782 </const> 21783 <const name="VirtioSCSI" value="11"> 21784 <desc>Virtio SCSI storage controller.</desc> 21775 21785 </const> 21776 21786 </enum> -
trunk/src/VBox/Main/include/ConsoleImpl.h
r78261 r78509 984 984 iLedNvme = iLedUsb + cLedUsb, 985 985 cLedNvme = 30, 986 cLedStorage = cLedFloppy + cLedIde + cLedSata + cLedScsi + cLedSas + cLedUsb + cLedNvme 986 iLedVirtio = iLedNvme + cLedNvme, 987 cLedVirtio = 16, 988 cLedStorage = cLedFloppy + cLedIde + cLedSata + cLedScsi + cLedSas + cLedUsb + cLedNvme + cLedVirtio 987 989 }; 988 990 DeviceType_T maStorageDevType[cLedStorage]; -
trunk/src/VBox/Main/src-client/BusAssignmentManager.cpp
r76553 r78509 72 72 {"lsilogicsas", 0, 22, 0, 1}, 73 73 {"nvme", 0, 14, 0, 1}, 74 {"virtio-scsi", 0, 15, 0, 1}, 74 75 75 76 /* USB controllers */ … … 204 205 {"nic", 2, 31, 0, 0}, 205 206 206 /* Storage controller #2 (NVMe ) */207 /* Storage controller #2 (NVMe, virtio-scsi) */ 207 208 {"nvme", 3, 0, 0, 0}, 208 209 {"nvme", 3, 1, 0, 0}, … … 212 213 {"nvme", 3, 5, 0, 0}, 213 214 {"nvme", 3, 6, 0, 0}, 215 {"virtio-scsi", 3, 7, 0, 0}, 216 {"virtio-scsi", 3, 8, 0, 0}, 217 {"virtio-scsi", 3, 9, 0, 0}, 218 {"virtio-scsi", 3, 10, 0, 0}, 219 {"virtio-scsi", 3, 11, 0, 0}, 220 {"virtio-scsi", 3, 12, 0, 0}, 221 {"virtio-scsi", 3, 13, 0, 0}, 214 222 215 223 { NULL, -1, -1, -1, 0} … … 226 234 {"buslogic", "storage"}, 227 235 {"lsilogicsas", "storage"}, 228 {"nvme", "storage"} 236 {"nvme", "storage"}, 237 {"virtio-scsi", "storage"} 229 238 }; 230 239 -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r78261 r78509 3310 3310 case StorageControllerType_NVMe: 3311 3311 return "nvme"; 3312 case StorageControllerType_VirtioSCSI: 3313 return "virtio-scsi"; 3312 3314 default: 3313 3315 return NULL; … … 3331 3333 case StorageBus_SAS: 3332 3334 case StorageBus_PCIe: 3335 case StorageBus_VirtioSCSI: 3333 3336 { 3334 3337 uLun = port; -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r78093 r78509 2135 2135 */ 2136 2136 com::SafeIfaceArray<IStorageController> ctrls; 2137 PCFGMNODE aCtrlNodes[StorageControllerType_ NVMe+ 1] = {};2137 PCFGMNODE aCtrlNodes[StorageControllerType_VirtioSCSI + 1] = {}; 2138 2138 hrc = pMachine->COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(ctrls)); H(); 2139 2139 … … 2392 2392 &mapMediumAttachments, pszCtrlDev, ulInstance); 2393 2393 paLedDevType = &maStorageDevType[iLedNvme]; 2394 break; 2395 } 2396 2397 case StorageControllerType_VirtioSCSI: 2398 { 2399 hrc = pBusMgr->assignPCIDevice("virtio-scsi", pCtlInst); H(); 2400 2401 ULONG cPorts = 0; 2402 hrc = ctrls[i]->COMGETTER(PortCount)(&cPorts); H(); 2403 InsertConfigInteger(pCfg, "NumTargets", cPorts); 2404 2405 /* Attach the status driver */ 2406 AssertRelease(cPorts <= cLedSata); 2407 i_attachStatusDriver(pCtlInst, &mapStorageLeds[iLedVirtio], 0, cPorts - 1, 2408 &mapMediumAttachments, pszCtrlDev, ulInstance); 2409 paLedDevType = &maStorageDevType[iLedVirtio]; 2394 2410 break; 2395 2411 } -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r78427 r78509 6000 6000 { 6001 6001 if ( (aConnectionType <= StorageBus_Null) 6002 || (aConnectionType > StorageBus_ PCIe))6002 || (aConnectionType > StorageBus_VirtioSCSI)) 6003 6003 return setError(E_INVALIDARG, 6004 6004 tr("Invalid connection type: %d"), -
trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp
r78261 r78509 96 96 ComAssertRet(aParent && !aName.isEmpty(), E_INVALIDARG); 97 97 if ( (aStorageBus <= StorageBus_Null) 98 || (aStorageBus > StorageBus_ PCIe))98 || (aStorageBus > StorageBus_VirtioSCSI)) 99 99 return setError(E_INVALIDARG, 100 100 tr("Invalid storage connection type")); … … 162 162 m->bd->ulPortCount = 1; 163 163 m->bd->controllerType = StorageControllerType_NVMe; 164 break; 165 case StorageBus_VirtioSCSI: 166 m->bd->ulPortCount = 1; 167 m->bd->controllerType = StorageControllerType_VirtioSCSI; 164 168 break; 165 169 case StorageBus_Null: break; /* Shut up MSC. */ … … 415 419 break; 416 420 } 421 case StorageBus_VirtioSCSI: 422 { 423 if (aControllerType != StorageControllerType_VirtioSCSI) 424 rc = E_INVALIDARG; 425 break; 426 } 417 427 default: 418 428 AssertMsgFailed(("Invalid controller type %d\n", m->bd->storageBus)); … … 560 570 tr("Invalid port count: %lu (must be in range [%lu, %lu])"), 561 571 aPortCount, 1, 255); 572 break; 573 } 574 case StorageBus_VirtioSCSI: 575 { 576 /* 577 * virtio-scsi supports 256 targets (with 16384 LUNs each). 578 */ 579 if (aPortCount < 1 || aPortCount > 256) 580 return setError(E_INVALIDARG, 581 tr("Invalid port count: %lu (must be in range [%lu, %lu])"), 582 aPortCount, 1, 256); 562 583 break; 563 584 } -
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r76592 r78509 363 363 case StorageBus_USB: 364 364 case StorageBus_PCIe: 365 case StorageBus_VirtioSCSI: 365 366 { 366 367 /* SATA and both SCSI controllers only support one device per port. */ … … 392 393 case StorageBus_SAS: 393 394 case StorageBus_PCIe: 395 case StorageBus_VirtioSCSI: 394 396 { 395 397 *aMinPortCount = 1; … … 458 460 { 459 461 *aMaxPortCount = 8; 462 break; 463 } 464 case StorageBus_VirtioSCSI: 465 { 466 *aMaxPortCount = 256; 460 467 break; 461 468 } … … 480 487 case StorageBus_SAS: 481 488 case StorageBus_PCIe: 489 case StorageBus_VirtioSCSI: 482 490 cCtrs = aChipset == ChipsetType_ICH9 ? 8 : 1; 483 491 break; … … 511 519 case StorageBus_SAS: 512 520 case StorageBus_USB: 521 case StorageBus_VirtioSCSI: 513 522 { 514 523 aDeviceTypes.resize(2); … … 548 557 case StorageControllerType_USB: 549 558 case StorageControllerType_NVMe: 559 case StorageControllerType_VirtioSCSI: 550 560 *aEnabled = false; 551 561 break; … … 575 585 case StorageControllerType_BusLogic: 576 586 case StorageControllerType_NVMe: 587 case StorageControllerType_VirtioSCSI: 577 588 case StorageControllerType_PIIX3: 578 589 case StorageControllerType_PIIX4: -
trunk/src/VBox/Main/xml/Settings.cpp
r77910 r78509 411 411 else if (ulMinor == 17) 412 412 sv = SettingsVersion_v1_17; 413 else if (ulMinor > 17) 413 else if (ulMinor == 18) 414 sv = SettingsVersion_v1_18; 415 else if (ulMinor > 18) 414 416 sv = SettingsVersion_Future; 415 417 } … … 1040 1042 break; 1041 1043 1044 case SettingsVersion_v1_18: 1045 pcszVersion = "1.18"; 1046 break; 1047 1042 1048 default: 1043 1049 // catch human error: the assertion below will trigger in debug … … 1062 1068 // but as it's an omission of someone who changed this file 1063 1069 // it's the only generic possibility. 1064 pcszVersion = "1.1 7";1065 m->sv = SettingsVersion_v1_1 7;1070 pcszVersion = "1.18"; 1071 m->sv = SettingsVersion_v1_18; 1066 1072 } 1067 1073 break; … … 5035 5041 sctl.controllerType = StorageControllerType_NVMe; 5036 5042 } 5043 else if (strType == "VirtioSCSI") 5044 { 5045 sctl.storageBus = StorageBus_VirtioSCSI; 5046 sctl.controllerType = StorageControllerType_VirtioSCSI; 5047 } 5037 5048 else 5038 5049 throw ConfigFileError(this, pelmController, N_("Invalid value '%s' for StorageController/@type attribute"), strType.c_str()); … … 6868 6879 case StorageControllerType_USB: pcszType = "USB"; break; 6869 6880 case StorageControllerType_NVMe: pcszType = "NVMe"; break; 6881 case StorageControllerType_VirtioSCSI: pcszType = "VirtioSCSI"; break; 6870 6882 default: /*case StorageControllerType_PIIX3:*/ pcszType = "PIIX3"; break; 6871 6883 } … … 7360 7372 void MachineConfigFile::bumpSettingsVersionIfNeeded() 7361 7373 { 7374 if (m->sv < SettingsVersion_v1_18) 7375 { 7376 // VirtualBox 6.1 adds a virtio-scsi storage controller. 7377 for (StorageControllersList::const_iterator it = hardwareMachine.storage.llStorageControllers.begin(); 7378 it != hardwareMachine.storage.llStorageControllers.end(); 7379 ++it) 7380 { 7381 const StorageController &sctl = *it; 7382 7383 if (sctl.controllerType == StorageControllerType_VirtioSCSI) 7384 { 7385 m->sv = SettingsVersion_v1_18; 7386 return; 7387 } 7388 } 7389 } 7390 7362 7391 if (m->sv < SettingsVersion_v1_17) 7363 7392 {
Note:
See TracChangeset
for help on using the changeset viewer.