XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. ScottyXCPNG
    3. Best
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 9
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: USB passthrough test reports in 7.5RC1

      Update: I haven't been able to figure out how to tell qemu to use a USB1.x interface instead of USB2.x (EHCI) which would let me pass the device through, but I've found a different work around. The device I'm trying to pass through appears as a USB serial device. After I stumbled upon a page mentioning that you could tie an emulated serial port to a TCP socket I dug further and found that you can do

      xe vm-param-add uuid=<uuid> param-name=platform hvm_serial=/dev/ttyACM0
      

      and hey presto your /dev/ttyS0 in the guest is now tied to the device on the hypervisor

      I may still poke around and try and find a better solution but for now my needs appear to be satisfied.

      posted in Development
      S
      ScottyXCPNG
    • RE: USB passthrough test reports in 7.5RC1

      A slightly less hacky work around for USB v1 passthrough based on the issue I created:

      --- /opt/xensource/libexec/usb_scan.py     2019-11-04 10:03:02.000000000 +0000
      +++ /tmp/usb_scan.py    2020-03-01 17:32:29.266317478 +0000
      @@ -152,10 +152,11 @@
           _CLASS = "bDeviceClass"
           _CONF_VALUE = "bConfigurationValue"
           _NUM_INTERFACES = "bNumInterfaces"
      +    _USB_SPEED = "speed"
       
           _PRODUCT_DESC = [_DESC_VENDOR, _DESC_PRODUCT]
           _PRODUCT_DETAILS = [_VERSION, _ID_VENDOR, _ID_PRODUCT, _BCD_DEVICE, _SERIAL,
      -                        _CLASS, _CONF_VALUE, _NUM_INTERFACES]
      +                        _CLASS, _CONF_VALUE, _NUM_INTERFACES, _USB_SPEED]
           _PROPS = _PRODUCT_DESC + _PRODUCT_DETAILS
           _PROPS_NONABLE = _PRODUCT_DESC + [_SERIAL]
       
      @@ -590,7 +591,10 @@
       
           pusb["path"] = device.get_node()
           # strip the leading space of "version"
      -    pusb["version"] = device[UsbDevice._VERSION].strip()
      +    if int(device[UsbDevice._USB_SPEED]) <= 12:
      +        pusb["version"] = "1.00"
      +    else:
      +        pusb["version"] = device[UsbDevice._VERSION].strip()
           pusb["vendor-id"] = device[UsbDevice._ID_VENDOR]
           pusb["product-id"] = device[UsbDevice._ID_PRODUCT]
           pusb["vendor-desc"] = device[UsbDevice._DESC_VENDOR]
      

      in theory any deice which is "low" or "full" speed (i.e. USB1) will have it's version number changed to 1.00 which forces xenopsd to use a USB1 bus. It may have side effects if the driver in the guest relies on the version number so caveat emptor.

      posted in Development
      S
      ScottyXCPNG
    • RE: USB passthrough test reports in 7.5RC1

      @olivierlambert created https://github.com/xcp-ng/xcp/issues/342 under xcp project. Thanks!

      ScottyGuy created this issue in xcp-ng/xcp

      closed Please create test packages to help with USB support (related to CA-328130 ) #342

      posted in Development
      S
      ScottyXCPNG