Changeset 33915 in vbox
- Timestamp:
- Nov 9, 2010 4:44:39 PM (14 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r33766 r33915 847 847 systemProperties->COMGETTER(MaxBootPosition)(&ulValue); 848 848 RTPrintf("Maximum Boot Position: %u\n", ulValue); 849 systemProperties->GetMaxInstancesOfStorageBus(StorageBus_IDE, &ulValue); 850 RTPrintf("Maximum IDE Controllers: %u\n", ulValue); 849 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_IDE, &ulValue); 850 RTPrintf("Maximum PIIX3 IDE Controllers: %u\n", ulValue); 851 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_IDE, &ulValue); 852 RTPrintf("Maximum ICH9 IDE Controllers: %u\n", ulValue); 851 853 systemProperties->GetMaxPortCountForStorageBus(StorageBus_IDE, &ulValue); 852 854 RTPrintf("Maximum IDE Port count: %u\n", ulValue); 853 855 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_IDE, &ulValue); 854 856 RTPrintf("Maximum Devices per IDE Port: %u\n", ulValue); 855 systemProperties->GetMaxInstancesOfStorageBus(StorageBus_SATA, &ulValue); 856 RTPrintf("Maximum SATA Controllers: %u\n", ulValue); 857 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SATA, &ulValue); 858 RTPrintf("Maximum PIIX3 SATA Controllers: %u\n", ulValue); 859 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SATA, &ulValue); 860 RTPrintf("Maximum ICH9 SATA Controllers: %u\n", ulValue); 857 861 systemProperties->GetMaxPortCountForStorageBus(StorageBus_SATA, &ulValue); 858 862 RTPrintf("Maximum SATA Port count: %u\n", ulValue); 859 863 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SATA, &ulValue); 860 864 RTPrintf("Maximum Devices per SATA Port: %u\n", ulValue); 861 systemProperties->GetMaxInstancesOfStorageBus(StorageBus_SCSI, &ulValue); 862 RTPrintf("Maximum SCSI Controllers: %u\n", ulValue); 865 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SCSI, &ulValue); 866 RTPrintf("Maximum PIIX3 SCSI Controllers: %u\n", ulValue); 867 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SCSI, &ulValue); 868 RTPrintf("Maximum ICH9 SCSI Controllers: %u\n", ulValue); 863 869 systemProperties->GetMaxPortCountForStorageBus(StorageBus_SCSI, &ulValue); 864 870 RTPrintf("Maximum SCSI Port count: %u\n", ulValue); 865 871 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SCSI, &ulValue); 866 872 RTPrintf("Maximum Devices per SCSI Port: %u\n", ulValue); 867 systemProperties->GetMaxInstancesOfStorageBus(StorageBus_SAS, &ulValue); 868 RTPrintf("Maximum SAS Controllers: %u\n", ulValue); 873 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_SAS, &ulValue); 874 RTPrintf("Maximum SAS PIIX3 Controllers: %u\n", ulValue); 875 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_SAS, &ulValue); 876 RTPrintf("Maximum SAS ICH9 Controllers: %u\n", ulValue); 869 877 systemProperties->GetMaxPortCountForStorageBus(StorageBus_SAS, &ulValue); 870 878 RTPrintf("Maximum SAS Port count: %u\n", ulValue); 871 879 systemProperties->GetMaxDevicesPerPortForStorageBus(StorageBus_SAS, &ulValue); 872 880 RTPrintf("Maximum Devices per SAS Port: %u\n", ulValue); 873 systemProperties->GetMaxInstancesOfStorageBus(StorageBus_Floppy, &ulValue); 874 RTPrintf("Maximum Floppy Controllers: %u\n", ulValue); 881 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_PIIX3, StorageBus_Floppy, &ulValue); 882 RTPrintf("Maximum PIIX3 Floppy Controllers:%u\n", ulValue); 883 systemProperties->GetMaxInstancesOfStorageBus(ChipsetType_ICH9, StorageBus_Floppy, &ulValue); 884 RTPrintf("Maximum ICH9 Floppy Controllers: %u\n", ulValue); 875 885 systemProperties->GetMaxPortCountForStorageBus(StorageBus_Floppy, &ulValue); 876 886 RTPrintf("Maximum Floppy Port count: %u\n", ulValue); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r33882 r33915 902 902 else 903 903 return QModelIndex(); 904 } 905 906 KChipsetType StorageModel::getChipsetType() const 907 { 908 #if 0 909 CMachine mach = vboxGlobal().virtualBox().FindMachine(mRootItem->machineId()); 910 Assert(!mach.isNull()); 911 return mach.GetChipsetType(); 912 #else 913 return KChipsetType_PIIX3; 914 #endif 904 915 } 905 916 … … 1023 1034 { 1024 1035 return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_IDE) < 1025 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (KStorageBus_IDE);1036 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (getChipsetType(), KStorageBus_IDE); 1026 1037 } 1027 1038 case R_IsMoreSATAControllersPossible: 1028 1039 { 1029 1040 return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_SATA) < 1030 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus ( KStorageBus_SATA);1041 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (getChipsetType(), KStorageBus_SATA); 1031 1042 } 1032 1043 case R_IsMoreSCSIControllersPossible: 1033 1044 { 1034 1045 return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_SCSI) < 1035 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus ( KStorageBus_SCSI);1046 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (getChipsetType(), KStorageBus_SCSI); 1036 1047 } 1037 1048 case R_IsMoreFloppyControllersPossible: 1038 1049 { 1039 1050 return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_Floppy) < 1040 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus ( KStorageBus_Floppy);1051 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (getChipsetType(), KStorageBus_Floppy); 1041 1052 } 1042 1053 case R_IsMoreSASControllersPossible: 1043 1054 { 1044 1055 return static_cast <RootItem*> (mRootItem)->childCount (KStorageBus_SAS) < 1045 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus ( KStorageBus_SAS);1056 vboxGlobal().virtualBox().GetSystemProperties().GetMaxInstancesOfStorageBus (getChipsetType(), KStorageBus_SAS); 1046 1057 } 1047 1058 case R_IsMoreAttachmentsPossible: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
r33882 r33915 511 511 512 512 ToolTipType mToolTipType; 513 514 KChipsetType getChipsetType() const; 513 515 }; 514 516 Q_DECLARE_METATYPE (StorageModel::ToolTipType); -
trunk/src/VBox/Main/StorageControllerImpl.cpp
r33708 r33915 136 136 137 137 ULONG maxInstances; 138 HRESULT rc = aParent->getVirtualBox()->getSystemProperties()->GetMaxInstancesOfStorageBus(aStorageBus, &maxInstances); 138 ChipsetType_T chipsetType; 139 HRESULT rc = aParent->COMGETTER(ChipsetType)(&chipsetType); 140 if (FAILED(rc)) 141 return rc; 142 rc = aParent->getVirtualBox()->getSystemProperties()->GetMaxInstancesOfStorageBus(chipsetType, aStorageBus, &maxInstances); 139 143 if (FAILED(rc)) 140 144 return rc; -
trunk/src/VBox/Main/SystemPropertiesImpl.cpp
r33598 r33915 440 440 } 441 441 442 STDMETHODIMP SystemProperties::GetMaxInstancesOfStorageBus(StorageBus_T aBus, 442 STDMETHODIMP SystemProperties::GetMaxInstancesOfStorageBus(ChipsetType_T aChipset, 443 StorageBus_T aBus, 443 444 ULONG *aMaxInstances) 444 445 { … … 447 448 AutoCaller autoCaller(this); 448 449 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 450 451 ULONG cCtrs = 0; 449 452 450 453 /* no need to lock, this is const */ … … 453 456 case StorageBus_SATA: 454 457 case StorageBus_SCSI: 458 case StorageBus_SAS: 459 cCtrs = aChipset == ChipsetType_ICH9 ? 8 : 1; 460 break; 455 461 case StorageBus_IDE: 456 case StorageBus_SAS:457 462 case StorageBus_Floppy: 458 463 { 459 /** @todo raise the limits ASAP, per bus type */ 460 *aMaxInstances = 1; 464 cCtrs = 1; 461 465 break; 462 466 } … … 464 468 AssertMsgFailed(("Invalid bus type %d\n", aBus)); 465 469 } 470 471 *aMaxInstances = cCtrs; 466 472 467 473 return S_OK; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r33904 r33915 7166 7166 name="ISystemProperties" 7167 7167 extends="$unknown" 7168 uuid=" 2af0100b-fda2-4c6a-8e8f-31e4ba871886"7168 uuid="9a949843-b237-46d4-8fcf-c83dcd9121ef" 7169 7169 wsmap="managed" 7170 7170 > … … 7464 7464 <desc>Returns the maximum number of storage bus instances which 7465 7465 can be configured for each VM. This corresponds to the number of 7466 storage controllers one can have.</desc> 7466 storage controllers one can have. Value may depend on chipset type 7467 used.</desc> 7468 7469 <param name="chipset" type="ChipsetType" dir="in"> 7470 <desc>The chipset type to get the value for.</desc> 7471 </param> 7467 7472 7468 7473 <param name="bus" type="StorageBus" dir="in"> -
trunk/src/VBox/Main/include/SystemPropertiesImpl.h
r33598 r33915 99 99 STDMETHOD(GetMinPortCountForStorageBus)(StorageBus_T aBus, ULONG *aMinPortCount); 100 100 STDMETHOD(GetMaxPortCountForStorageBus)(StorageBus_T aBus, ULONG *aMaxPortCount); 101 STDMETHOD(GetMaxInstancesOfStorageBus)( StorageBus_T aBus, ULONG *aMaxInstances);101 STDMETHOD(GetMaxInstancesOfStorageBus)(ChipsetType_T aChipset, StorageBus_T aBus, ULONG *aMaxInstances); 102 102 STDMETHOD(GetDeviceTypesForStorageBus)(StorageBus_T aBus, ComSafeArrayOut(DeviceType_T, aDeviceTypes)); 103 103 STDMETHOD(GetDefaultIoCacheSettingForStorageController)(StorageControllerType_T aControllerType, BOOL *aEnabled);
Note:
See TracChangeset
for help on using the changeset viewer.