Changeset 50721 in vbox
- Timestamp:
- Mar 6, 2014 9:40:39 PM (11 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 8 edited
-
Frontends/VBoxManage/VBoxManageInfo.cpp (modified) (3 diffs)
-
Frontends/VBoxManage/VBoxManageModifyVM.cpp (modified) (3 diffs)
-
Main/idl/VirtualBox.xidl (modified) (1 diff)
-
Main/src-client/BusAssignmentManager.cpp (modified) (1 diff)
-
Main/src-client/ConsoleImpl2.cpp (modified) (3 diffs)
-
Main/src-server/SystemPropertiesImpl.cpp (modified) (1 diff)
-
Main/src-server/USBControllerImpl.cpp (modified) (2 diffs)
-
Main/xml/Settings.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r49621 r50721 1777 1777 bool fOhciEnabled = false; 1778 1778 bool fEhciEnabled = false; 1779 bool fXhciEnabled = false; 1779 1780 1780 1781 for (unsigned i = 0; i < USBCtlColl.size(); i++) … … 1793 1794 fEhciEnabled = true; 1794 1795 break; 1796 case USBControllerType_XHCI: 1797 fXhciEnabled = true; 1798 break; 1795 1799 default: 1796 1800 break; … … 1808 1812 else 1809 1813 RTPrintf("EHCI: %s\n", fEhciEnabled ? "enabled" : "disabled"); 1814 1815 if (details == VMINFO_MACHINEREADABLE) 1816 RTPrintf("xhci=\"%s\"\n", fXhciEnabled ? "on" : "off"); 1817 else 1818 RTPrintf("XHCI: %s\n", fXhciEnabled ? "enabled" : "disabled"); 1810 1819 } 1811 1820 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r49983 r50721 161 161 MODIFYVM_VRDE, 162 162 MODIFYVM_RTCUSEUTC, 163 MODIFYVM_USBXHCI, 163 164 MODIFYVM_USBEHCI, 164 165 MODIFYVM_USB, … … 323 324 { "--vrdeextpack", MODIFYVM_VRDE_EXTPACK, RTGETOPT_REQ_STRING }, 324 325 { "--vrde", MODIFYVM_VRDE, RTGETOPT_REQ_BOOL_ONOFF }, 326 { "--usbxhci", MODIFYVM_USBXHCI, RTGETOPT_REQ_BOOL_ONOFF }, 325 327 { "--usbehci", MODIFYVM_USBEHCI, RTGETOPT_REQ_BOOL_ONOFF }, 326 328 { "--usb", MODIFYVM_USB, RTGETOPT_REQ_BOOL_ONOFF }, … … 2363 2365 } 2364 2366 2367 case MODIFYVM_USBXHCI: 2368 { 2369 ULONG cXhciCtrls = 0; 2370 rc = machine->GetUSBControllerCountByType(USBControllerType_XHCI, &cXhciCtrls); 2371 if (SUCCEEDED(rc)) 2372 { 2373 if (!cXhciCtrls && ValueUnion.f) 2374 { 2375 ComPtr<IUSBController> UsbCtl; 2376 CHECK_ERROR(machine, AddUSBController(Bstr("XHCI").raw(), USBControllerType_XHCI, 2377 UsbCtl.asOutParam())); 2378 } 2379 else if (cXhciCtrls && !ValueUnion.f) 2380 CHECK_ERROR(machine, RemoveUSBController(Bstr("XHCI").raw())); 2381 } 2382 break; 2383 } 2384 2365 2385 case MODIFYVM_USBEHCI: 2366 2386 { -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r50447 r50721 16899 16899 <const name="OHCI" value="1"/> 16900 16900 <const name="EHCI" value="2"/> 16901 <const name="Last" value="3"> 16901 <const name="XHCI" value="3"/> 16902 <const name="Last" value="4"> 16902 16903 <desc>Last element (invalid). Used for parameter checks.</desc> 16903 16904 </const> -
trunk/src/VBox/Main/src-client/BusAssignmentManager.cpp
r47223 r50721 72 72 {"usb-ohci", 0, 6, 0, 0}, 73 73 {"usb-ehci", 0, 11, 0, 0}, 74 {"usb-xhci", 0, 12, 0, 0}, 74 75 75 76 /* ACPI controller */ -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r50686 r50721 1691 1691 hrc = pMachine->COMGETTER(USBControllers)(ComSafeArrayAsOutParam(usbCtrls)); H(); 1692 1692 bool fOhciPresent = false; /**< Flag whether at least one OHCI controller is present. */ 1693 bool fXhciPresent = false; /**< Flag whether at least one XHCI controller is present. */ 1693 1694 1694 1695 for (size_t i = 0; i < usbCtrls.size(); ++i) … … 1701 1702 break; 1702 1703 } 1704 else if (enmCtrlType == USBControllerType_XHCI) 1705 { 1706 fXhciPresent = true; 1707 break; 1708 } 1703 1709 } 1704 1710 1705 1711 /* 1706 * Currently EHCI is only enabled when a OHCI controller is present too. 1707 * This might change when XHCI is supported. 1712 * Currently EHCI is only enabled when an OHCI or XHCI controller is present as well. 1708 1713 */ 1709 if (fOhciPresent )1714 if (fOhciPresent || fXhciPresent) 1710 1715 mfVMHasUsbController = true; 1711 1716 … … 1781 1786 } 1782 1787 #endif 1788 else if (enmCtrlType == USBControllerType_XHCI) 1789 { 1790 /* 1791 * USB 3.0 is only available if the proper ExtPack is installed. 1792 * 1793 * Note. Configuring EHCI here and providing messages about 1794 * the missing extpack isn't exactly clean, but it is a 1795 * necessary evil to patch over legacy compatability issues 1796 * introduced by the new distribution model. 1797 */ 1798 static const char *s_pszUsbExtPackName = "Oracle VM VirtualBox Extension Pack"; 1799 # ifdef VBOX_WITH_EXTPACK 1800 if (mptrExtPackManager->isExtPackUsable(s_pszUsbExtPackName)) 1801 # endif 1802 { 1803 InsertConfigNode(pDevices, "usb-xhci", &pDev); 1804 InsertConfigNode(pDev, "0", &pInst); 1805 InsertConfigNode(pInst, "Config", &pCfg); 1806 InsertConfigInteger(pInst, "Trusted", 1); /* boolean */ 1807 hrc = pBusMgr->assignPCIDevice("usb-xhci", pInst); H(); 1808 1809 InsertConfigNode(pInst, "LUN#0", &pLunL0); 1810 InsertConfigString(pLunL0, "Driver", "VUSBRootHub"); 1811 InsertConfigNode(pLunL0, "Config", &pCfg); 1812 1813 /* 1814 * Attach the status driver. 1815 */ 1816 attachStatusDriver(pInst, &mapUSBLed[1], 0, 0, NULL, NULL, 0); 1817 } 1818 # ifdef VBOX_WITH_EXTPACK 1819 else 1820 { 1821 /* Always fatal. */ 1822 return VMR3SetError(pUVM, VERR_NOT_FOUND, RT_SRC_POS, 1823 N_("Implementation of the USB 3.0 controller not found!\n" 1824 "Because the USB 3.0 controller state is part of the saved " 1825 "VM state, the VM cannot be started. To fix " 1826 "this problem, either install the '%s' or disable USB 3.0 " 1827 "support in the VM settings"), 1828 s_pszUsbExtPackName); 1829 } 1830 # endif 1831 } 1783 1832 } /* for every USB controller. */ 1784 1833 -
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r50455 r50721 575 575 case USBControllerType_OHCI: 576 576 case USBControllerType_EHCI: 577 case USBControllerType_XHCI: 577 578 { 578 579 cCtrs = 1; -
trunk/src/VBox/Main/src-server/USBControllerImpl.cpp
r49871 r50721 101 101 ComAssertRet(aParent && !aName.isEmpty(), E_INVALIDARG); 102 102 if ( (enmType <= USBControllerType_Null) 103 || (enmType > USBControllerType_ EHCI))103 || (enmType > USBControllerType_XHCI)) 104 104 return setError(E_INVALIDARG, 105 105 tr("Invalid USB controller type")); … … 263 263 break; 264 264 case USBControllerType_EHCI: 265 *aUSBStandard = 0x0200; 266 break; 267 case USBControllerType_XHCI: 265 268 *aUSBStandard = 0x0200; 266 269 break; -
trunk/src/VBox/Main/xml/Settings.cpp
r50196 r50721 3085 3085 else if (strCtrlType == "EHCI") 3086 3086 ctrl.enmType = USBControllerType_EHCI; 3087 else if (strCtrlType == "XHCI") 3088 ctrl.enmType = USBControllerType_XHCI; 3087 3089 else 3088 3090 throw ConfigFileError(this, pelmCtrl, N_("Invalid value '%s' for Controller/@type attribute"), strCtrlType.c_str()); … … 4391 4393 strType = "EHCI"; 4392 4394 break; 4395 case USBControllerType_XHCI: 4396 strType = "XHCI"; 4397 break; 4393 4398 default: 4394 4399 AssertMsgFailed(("Unknown USB controller type %d\n", ctrl.enmType));
Note:
See TracChangeset
for help on using the changeset viewer.

