USB 3.0 PCI Controller Pass through

pr1ntf edited this page Dec 1, 2015 · 2 revisions
    1. Determine the bus/slot/function of the device that you want to pass through with pciconf -vl. My device is:
xhci1@pci0:8:0:0:	class=0x0c0330 card=0x34831106 chip=0x34831106 rev=0x01 hdr=0x00
        vendor     = 'VIA Technologies, Inc.'
        class      = serial bus
        subclass   = USB
    1. Disable the xhci driver in the FreeBSD kernel.
# Compile a custom kernel without xhci driver

# cd /usr/src/sys/amd64/conf
# cp GENERIC MYKERNEL
# ee MYKERNEL

# Find and change lines as below:
# Note the commented out portion disabling the device in the kernel.

ident MYKERNEL
#device		xhci			# XHCI PCI->USB interface (USB 3.0)

# Save and exit

# cd /usr/src
# make buildkernel KERNCONF=MYKERNEL
# make installkernel KERNCONF=MYKERNEL
# reboot

# After reboot 'pciconf -vl' must return:

none0@pci0:8:0:0:	class=0x0c0330 card=0x34831106 chip=0x34831106 rev=0x01 hdr=0x00
        vendor     = 'VIA Technologies, Inc.'
        class      = serial bus
        subclass   = USB
    1. The device is ready for the pass through
# ee /boot/loader.conf

# add this line:

pptdevs="8/0/0"

# save, exit, reboot 
# and again:

# pciconf -vl

# Now the output is like:

ppt0@pci0:8:0:0:	class=0x0c0330 card=0x34831106 chip=0x34831106 rev=0x01 hdr=0x00
        vendor     = 'VIA Technologies, Inc.'
        class      = serial bus
        subclass   = USB
    1. Pass the device with iohyve:
# iohyve set bsd(linux)guest pcidev:1=passthru,8/0/0

That's all!

By: @Eresia999

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.