Changeset 78509 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- May 14, 2019 3:16:21 PM (6 years ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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:
Note:
See TracChangeset
for help on using the changeset viewer.