[vfio-users] USB >>port<< passthrough

Samuel Holland samuel at sholland.org
Wed Aug 24 00:31:44 UTC 2016


Hello,

On 08/23/2016 02:07 AM, Rokas Kupstys wrote:
> Is it possible to pass-through USB port? I know we can pass-through
> specific usb devices or entire usb controllers however it is not
> ideal in all cases.

Sorry for all of the not-quite-accurate answers you've gotten. You
_can_, in fact, pass through a USB port by its location:

$ qemu-system-x86_64 -device usb-host,? 2>&1 | sort
usb-host.bootindex=int32
usb-host.full-path=bool (on/off)
usb-host.hostaddr=uint32
usb-host.hostbus=uint32
usb-host.hostport=str
usb-host.isobsize=uint32
usb-host.isobufs=uint32
usb-host.loglevel=uint32
usb-host.msos-desc=bool (on/off)
usb-host.pipeline=bool (on/off)
usb-host.port=str
usb-host.productid=uint32
usb-host.serial=str
usb-host.vendorid=uint32

See the hostbus and hostport options. I don't know if this is exposed by
libvirt, since I don't use that, but at least qemu has support for it.

> Is there any solution to this?

Passing through a port using `-device usb-host,hostbus=foo,hostport=bar`
is one solution. Another solution can be to use your several integrated
USB controllers (if you have an Intel chipset). Even though all of your
devices may show up on one controller, you can change which controller
the ports are attached to in the PCI configuration space. See [1] and 
the thread at [2].

Hope that helps,
Samuel

[1] http://sholland.org/thoughts.html#2016-02-29
[2] https://www.redhat.com/archives/vfio-users/2016-February/msg00110.html




More information about the vfio-users mailing list