USB device passthrough implementation

Daniel Nicolescu daniel.nicolescu10 at gmail.com
Tue Mar 17 12:42:12 UTC 2020


Hi,

We want to implement the USB pass through feature for bhyve so that users
will be able to pass through individual USB devices like in QEMU. We are
trying to emulate the USB controller and pass to the virtual machine only
one port.

* We need to disconnect the USB device from host: we are currently not very
familiar with the kernel API to perform this
* We need to emulate a USB device controller: we are currently looking into
pci_xhci.c and usb_mouse.c to reuse some of the code from there and we
would like to know if there is some sort of in depth documentation
regarding these.
* We need to pass the USB device to the guest through an emulated port of
the device controller: we know that project ACRN implements USB device
passthrough and we are trying to figure out how they do it.

Could you give us a few suggestions on how to tackle these?

Thanks!


More information about the freebsd-virtualization mailing list