Solved PCI passthru of PCIe USB controller

I am trying to passthru an 3.0 USB contoller card (this guy here: https://www.amazon.de/Logilink-PC0057-Express-Schnittstellenkarte-Karte/dp/B005GUQV1Q) into one of my bhyve virtual machines.

I am basically following this guide.

My USB controller card works on the host and is listed as follows via pciconv -lv
Code:
xhci1@pci0:2:0:0:       class=0x0c0330 rev=0x01 hdr=0x00 vendor=0x1106 device=0x3483 subvendor=0x1106 subdevice=0x3483
    vendor     = 'VIA Technologies, Inc.'
    device     = 'VL805/806 xHCI USB 3.0 Controller'
    class      = serial bus
    subclass   = USB

Hence, I added the following entry in loader.conf:
Code:
pptdevs="2/0/0"

After a reboot, nothing changed in the output of pciconv -lv.

Nonetheless, I tried adding the device in my VM's configuration (I am using sysutils/vm-bhyve):
Code:
...
passthruX="2/0/0"

I did not work, however. —

One thing I observed: In the diff of pciconv -lv before and after installing the USB controller card, there was one additional change. The full diff looks as follows:
Code:
$ diff -u pciconv-lv.before_new_usb pciconv-lv.after_new_usb_ppt
--- pciconv-lv.before_new_usb   2025-06-02 22:39:27.150709000 +0200
+++ pciconv-lv.after_new_usb_ppt        2025-06-05 19:29:32.541724000 +0200
@@ -53,6 +53,11 @@
     device     = 'Cannon Lake PCH PCI Express Root Port'
     class      = bridge
     subclass   = PCI-PCI
+pcib2@pci0:0:28:0:     class=0x060400 rev=0xf0 hdr=0x01 vendor=0x8086 device=0xa33f subvendor=0x17aa subdevice=0x314f
+    vendor     = 'Intel Corporation'
+    device     = 'Cannon Lake PCH PCI Express Root Port'
+    class      = bridge
+    subclass   = PCI-PCI
 none4@pci0:0:30:0:     class=0x078000 rev=0x10 hdr=0x00 vendor=0x8086 device=0xa328 subvendor=0x17aa subdevice=0x314f
     vendor     = 'Intel Corporation'
     device     = 'Cannon Lake PCH Serial IO UART Host Controller'
@@ -86,3 +91,8 @@
     device     = 'SanDisk Ultra 3D / WD Blue SN570 NVMe SSD (DRAM-less)'
     class      = mass storage
     subclass   = NVM
+xhci1@pci0:2:0:0:      class=0x0c0330 rev=0x01 hdr=0x00 vendor=0x1106 device=0x3483 subvendor=0x1106 subdevice=0x3483
+    vendor     = 'VIA Technologies, Inc.'
+    device     = 'VL805/806 xHCI USB 3.0 Controller'
+    class      = serial bus
+    subclass   = USB

Do I need to forward the 'Cannon Lake PCH PCI Express Root Port' instead of the USB controller itself?
 
Is vmm.ko loaded from loader.conf as well? Is VT-d enabled, i.e. do you have any other passthrough devices on this host? Anything related in the log?
Do I need to forward the 'Cannon Lake PCH PCI Express Root Port' instead of the USB controller itself?
No.
 
Is the vmm_load="YES" variable set in /boot/loader.conf?
This was indeed missing! Now the USB controller shows up as a ppt device!

Furthermore, I found a mistake in my VM configuration file. Instead of passthruX=…, it must be as follows:
Code:
passthru0="2/0/0"

I overread that I had to replace X by a number!

It now works perfectly. Thank you all!
 
Out of curiosity... Does this work for you with a Windows 11 guest?

 
Out of curiosity... Does this work for you with a Windows 11 guest?

I do not have a Windows 11 guest here.

But it does work with my Windows 10 guest.
 

Attachments

  • Screenshot_2025-06-05_23-20-08.png
    Screenshot_2025-06-05_23-20-08.png
    131.5 KB · Views: 181
Back
Top