Changeset 57524 in vbox for trunk/src/VBox
- Timestamp:
- Aug 25, 2015 10:20:15 AM (9 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r56830 r57524 447 447 <enum 448 448 name="SettingsVersion" 449 uuid=" d5b15ca7-3de7-46b2-a63a-ddcce42bfa3f"449 uuid="b4cc23c2-96f2-419d-830b-bd13c1135dfb" 450 450 > 451 451 <desc> … … 565 565 <!-- 566 566 Machine changes: hot-plug flag for storage devices. 567 --> 568 </const> 569 <const name="v1_16" value="18"> 570 <desc>Settings version "1.16", written by VirtualBox 5.1.x.</desc> 571 <!-- 572 Machine changes: NVMe storage controller. 567 573 --> 568 574 </const> … … 19586 19592 <enum 19587 19593 name="StorageBus" 19588 uuid="2 dab9df1-9683-48fd-8c11-caada236fcb0"19594 uuid="21371490-8542-4b5a-a74d-ee9ac2d45a90" 19589 19595 > 19590 19596 <desc> … … 19601 19607 <const name="SAS" value="5"/> 19602 19608 <const name="USB" value="6"/> 19609 <const name="PCIe" value="7"/> 19603 19610 </enum> 19604 19611 19605 19612 <enum 19606 19613 name="StorageControllerType" 19607 uuid=" 02e190af-b546-4109-b036-6deaa4ef6e69"19614 uuid="9427f309-82e7-468f-9964-abfefc4d3058" 19608 19615 > 19609 19616 <desc> … … 19639 19646 <desc>A variant of the LsiLogic controller using SAS.</desc> 19640 19647 </const> 19641 <const name="USB" value="9"> 19648 <const name="NVMe" value="9"> 19649 <desc>An NVMe storage controller.</desc> 19650 </const> 19651 <const name="USB" value="10"> 19642 19652 <desc>Special USB based storage controller.</desc> 19643 19653 </const> -
trunk/src/VBox/Main/include/ConsoleImpl.h
r56268 r57524 915 915 iLedUsb = iLedSas + cLedSas, 916 916 cLedUsb = 8, 917 cLedStorage = cLedFloppy + cLedIde + cLedSata + cLedScsi + cLedSas + cLedUsb 917 iLedNvme = iLedUsb + cLedUsb, 918 cLedNvme = 30, 919 cLedStorage = cLedFloppy + cLedIde + cLedSata + cLedScsi + cLedSas + cLedUsb + cLedNvme 918 920 }; 919 921 DeviceType_T maStorageDevType[cLedStorage]; -
trunk/src/VBox/Main/src-client/BusAssignmentManager.cpp
r51612 r57524 68 68 {"buslogic", 0, 21, 0, 1}, 69 69 {"lsilogicsas", 0, 22, 0, 1}, 70 {"nvme", 0, 14, 0, 1}, 70 71 71 72 /* USB controllers */ … … 169 170 {"lsilogicsas", 1, 30, 0, 0}, 170 171 {"lsilogicsas", 1, 31, 0, 0}, 172 {"nvme", 1, 32, 0, 0}, 173 {"nvme", 1, 33, 0, 0}, 174 {"nvme", 1, 34, 0, 0}, 175 {"nvme", 1, 35, 0, 0}, 176 {"nvme", 1, 36, 0, 0}, 177 {"nvme", 1, 37, 0, 0}, 178 {"nvme", 1, 38, 0, 0}, 171 179 172 180 /* NICs */ … … 212 220 {"lsilogic", "storage"}, 213 221 {"buslogic", "storage"}, 214 {"lsilogicsas", "storage"} 222 {"lsilogicsas", "storage"}, 223 {"nvme", "storage"} 215 224 }; 216 225 -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r57358 r57524 2064 2064 */ 2065 2065 com::SafeIfaceArray<IStorageController> ctrls; 2066 PCFGMNODE aCtrlNodes[StorageControllerType_ LsiLogicSas+ 1] = {};2066 PCFGMNODE aCtrlNodes[StorageControllerType_NVMe + 1] = {}; 2067 2067 hrc = pMachine->COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(ctrls)); H(); 2068 2068 … … 2280 2280 "To fix this problem either enable the USB controller or remove\n" 2281 2281 "the storage device from the VM")); 2282 break; 2283 } 2284 2285 case StorageControllerType_NVMe: 2286 { 2287 hrc = pBusMgr->assignPCIDevice("nvme", pCtlInst); H(); 2288 2289 ULONG cPorts = 0; 2290 hrc = ctrls[i]->COMGETTER(PortCount)(&cPorts); H(); 2291 InsertConfigInteger(pCfg, "NamespacesMax", cPorts); 2292 2293 /* Attach the status driver */ 2294 AssertRelease(cPorts <= cLedSata); 2295 i_attachStatusDriver(pCtlInst, &mapStorageLeds[iLedNvme], 0, cPorts - 1, 2296 &mapMediumAttachments, pszCtrlDev, ulInstance); 2297 paLedDevType = &maStorageDevType[iLedNvme]; 2282 2298 break; 2283 2299 } -
trunk/src/VBox/Main/src-server/StorageControllerImpl.cpp
r56820 r57524 124 124 ComAssertRet(aParent && !aName.isEmpty(), E_INVALIDARG); 125 125 if ( (aStorageBus <= StorageBus_Null) 126 || (aStorageBus > StorageBus_ USB))126 || (aStorageBus > StorageBus_PCIe)) 127 127 return setError(E_INVALIDARG, 128 128 tr("Invalid storage connection type")); … … 185 185 m->bd->mPortCount = 8; 186 186 m->bd->mStorageControllerType = StorageControllerType_USB; 187 break; 188 case StorageBus_PCIe: 189 m->bd->mPortCount = 1; 190 m->bd->mStorageControllerType = StorageControllerType_NVMe; 187 191 break; 188 192 } … … 425 429 break; 426 430 } 431 case StorageBus_PCIe: 432 { 433 if (aControllerType != StorageControllerType_NVMe) 434 rc = E_INVALIDARG; 435 break; 436 } 427 437 default: 428 438 AssertMsgFailed(("Invalid controller type %d\n", m->bd->mStorageBus)); … … 560 570 break; 561 571 } 572 case StorageBus_PCIe: 573 { 574 /* 575 * PCIe (NVMe in particular) supports theoretically 2^32 - 1 576 * different namespaces, limit the amount artifically here. 577 */ 578 if (aPortCount < 1 || aPortCount > 255) 579 return setError(E_INVALIDARG, 580 tr("Invalid port count: %lu (must be in range [%lu, %lu])"), 581 aPortCount, 1, 255); 582 break; 583 } 562 584 default: 563 585 AssertMsgFailed(("Invalid controller type %d\n", m->bd->mStorageBus)); -
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r56372 r57524 360 360 case StorageBus_SAS: 361 361 case StorageBus_USB: 362 case StorageBus_PCIe: 362 363 { 363 364 /* SATA and both SCSI controllers only support one device per port. */ … … 388 389 case StorageBus_SATA: 389 390 case StorageBus_SAS: 391 case StorageBus_PCIe: 390 392 { 391 393 *aMinPortCount = 1; … … 446 448 } 447 449 case StorageBus_SAS: 450 case StorageBus_PCIe: 448 451 { 449 452 *aMaxPortCount = 255; … … 474 477 case StorageBus_SCSI: 475 478 case StorageBus_SAS: 479 case StorageBus_PCIe: 476 480 cCtrs = aChipset == ChipsetType_ICH9 ? 8 : 1; 477 481 break; … … 517 521 break; 518 522 } 523 case StorageBus_PCIe: 524 { 525 aDeviceTypes.resize(1); 526 aDeviceTypes[0] = DeviceType_HardDisk; 527 break; 528 } 519 529 default: 520 530 AssertMsgFailed(("Invalid bus type %d\n", aBus)); … … 535 545 case StorageControllerType_LsiLogicSas: 536 546 case StorageControllerType_USB: 547 case StorageControllerType_NVMe: 537 548 *aEnabled = false; 538 549 break; … … 561 572 case StorageControllerType_LsiLogicSas: 562 573 case StorageControllerType_BusLogic: 574 case StorageControllerType_NVMe: 563 575 case StorageControllerType_PIIX3: 564 576 case StorageControllerType_PIIX4: -
trunk/src/VBox/Main/xml/Settings.cpp
r57280 r57524 3589 3589 sctl.controllerType = StorageControllerType_USB; 3590 3590 } 3591 else if (strType == "NVMe") 3592 { 3593 sctl.storageBus = StorageBus_PCIe; 3594 sctl.controllerType = StorageControllerType_NVMe; 3595 } 3591 3596 else 3592 3597 throw ConfigFileError(this, pelmController, N_("Invalid value '%s' for StorageController/@type attribute"), strType.c_str()); … … 5097 5102 case StorageControllerType_LsiLogicSas: pcszType = "LsiLogicSas"; break; 5098 5103 case StorageControllerType_USB: pcszType = "USB"; break; 5104 case StorageControllerType_NVMe: pcszType = "NVMe"; break; 5099 5105 default: /*case StorageControllerType_PIIX3:*/ pcszType = "PIIX3"; break; 5100 5106 } … … 5580 5586 void MachineConfigFile::bumpSettingsVersionIfNeeded() 5581 5587 { 5588 if (m->sv < SettingsVersion_v1_16) 5589 { 5590 // VirtualBox 5.1 adds a NVMe storage controller. 5591 for (StorageControllersList::const_iterator it = storageMachine.llStorageControllers.begin(); 5592 it != storageMachine.llStorageControllers.end(); 5593 ++it) 5594 { 5595 const StorageController &sctl = *it; 5596 5597 if (sctl.controllerType == StorageControllerType_NVMe) 5598 { 5599 m->sv = SettingsVersion_v1_16; 5600 return; 5601 } 5602 } 5603 } 5604 5582 5605 if (m->sv < SettingsVersion_v1_15) 5583 5606 {
Note:
See TracChangeset
for help on using the changeset viewer.