Index: /trunk/include/VBox/vmm/pdmusb.h
===================================================================
--- /trunk/include/VBox/vmm/pdmusb.h	(revision 43813)
+++ /trunk/include/VBox/vmm/pdmusb.h	(revision 43814)
@@ -114,4 +114,9 @@
 
 
+/** PDM Device Flags.
+ * @{ */
+/** A high-speed capable USB 2.0 device (also required to support full-speed). */
+#define PDM_USBREG_HIGHSPEED_CAPABLE        RT_BIT(0)
+/** @} */
 
 /** PDM USB Device Registration Structure,
@@ -733,7 +738,10 @@
     /** The tracing ID of this device.  */
     uint32_t                    idTracing;
+    /** The USB version of the hub this device is attached to. Used to
+     * determine whether the device communicates at high-speed or full-/low-speed. */
+    uint32_t                    iUsbHubVersion;
 
     /** Padding to make achInstanceData aligned at 32 byte boundary. */
-    uint32_t                    au32Padding[HC_ARCH_BITS == 32 ? 3 : 4];
+    uint32_t                    au32Padding[HC_ARCH_BITS == 32 ? 2 : 3];
 
     /** Device instance data. The size of this area is defined
Index: /trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp	(revision 43813)
+++ /trunk/src/VBox/VMM/VMMR3/PDMUsb.cpp	(revision 43814)
@@ -226,5 +226,6 @@
                     ("Invalid name '%.s'\n", sizeof(pReg->szName), pReg->szName),
                     VERR_PDM_INVALID_USB_REGISTRATION);
-    AssertMsgReturn(pReg->fFlags == 0, ("fFlags=%#x\n", pReg->fFlags), VERR_PDM_INVALID_USB_REGISTRATION);
+    AssertMsgReturn((pReg->fFlags & ~(PDM_USBREG_HIGHSPEED_CAPABLE)) == 0,
+                    ("fFlags=%#x\n", pReg->fFlags), VERR_PDM_INVALID_USB_REGISTRATION);
     AssertMsgReturn(pReg->cMaxInstances > 0,
                     ("Max instances %u! (USB Device %s)\n", pReg->cMaxInstances, pReg->szName),
@@ -579,4 +580,5 @@
     //pUsbIns->fTracing                       = 0;
     pUsbIns->idTracing                      = ++pVM->pdm.s.idTracingOther;
+    pUsbIns->iUsbHubVersion                 = iUsbVersion;
 
     /*
@@ -800,9 +802,13 @@
         CFGMR3SetRestrictedRoot(pConfigNode);
 
-        /** @todo
-         * Figure out the USB version from the USB device registration and the configuration.
+        /*
+         * Every device must support USB 1.x hubs; optionally, high-speed USB 2.0 hubs
+         * might be also supported. This determines where to attach the device.
          */
         uint32_t iUsbVersion = VUSB_STDVER_11;
 
+        if (paUsbDevs[i].pUsbDev->pReg->fFlags & PDM_USBREG_HIGHSPEED_CAPABLE)
+            iUsbVersion |= VUSB_STDVER_20;
+        
         /*
          * Find a suitable hub with free ports.
@@ -815,4 +821,10 @@
             return rc;
         }
+
+        /*
+         * This is how we inform the device what speed it's communicating at, and hence
+         * which descriptors it should present to the guest.
+         */
+        iUsbVersion &= pHub->fVersions;
 
         /*
@@ -904,5 +916,5 @@
 
     /*
-     * Finally, try create it.
+     * Finally, try to create it.
      */
     rc = pdmR3UsbCreateDevice(pVM, pHub, pUsbDev, -1, pUuid, NULL, &pConfig, iUsbVersion);
