bhyve passthru mystery

aragats

Daemon

Reaction score: 575
Messages: 1,424

My Dell Precision 7540 has 3 PCI xhci controllers. I pass-through one of them to my MS Windows guest.
The physical connectors are: 2 USB-C (Thunderbolt) and 2 USB-A. Of course, I'm not 100% sure which connector goes to which controller.

Devices plugged in the USB-A, appear in Windows, thus I can use USB-C connectors for FreeBSD. Today I discovered that a USB-to-Serial adapter plugged into USB-C connector was passed-through to Windows! Right away I unplugged it and plugged in a USB-to-Ethernet adapter and it appeared in FreeBSD!

What am I missing? I don't have any experience with Thunderbolt.
 

usdmatt

Daemon

Reaction score: 534
Messages: 1,440

If the same port has appeared both in Windows and FreeBSD, just by changing the connected device, my only guess would be that the serial adaptor uses an older standard (could easily be USBv1 considering the low bandwidth requirement of serial), and has been somehow handed off to another controller (the one passed to Windows).

Would be interesting to know for sure but I don't know for sure if this is even done, or even how to verify how your controllers/ports are wired.
 
OP
OP
aragats

aragats

Daemon

Reaction score: 575
Messages: 1,424

Would be interesting to know for sure but I don't know for sure if this is even done, or even how to verify how your controllers/ports are wired.
The funny thing is that after a few swappings of my USB devices the motherboard died! Today a Dell technician is supposed to come and replace it. Then I'll try get more detailed on this.
 

Phishfry

Son of Beastie

Reaction score: 1,641
Messages: 4,706

When I was messing with bhyve and passthru onboard USB controllers I could only passthru all USB ports or none.
That was even with two different USB PCI bus addresses 29/0/0 and 30/0/0.
If I passthru one it does not work right. I have to passthru both and then it works but I lose my host USB.
It seems to come back to the xhci/ehci mode of the controller. It controls both pci addresses.
Which mode was the USB passthru PCI address showing? xhciX or ehciX. X=number of port.
For example xhci0@135:0:0 or ehci0@35:0:0
 
OP
OP
aragats

aragats

Daemon

Reaction score: 575
Messages: 1,424

Which mode was the USB passthru PCI address showing? xhciX or ehciX. X=number of port.
For example xhci0@135:0:0 or ehci0@35:0:0
I have only xhciX PCI devices in this box. Three of them, unfortunately cannot post the output of pciconf -lv at the moment.
 
OP
OP
aragats

aragats

Daemon

Reaction score: 575
Messages: 1,424

I've found that this "mystery" is caused by another device called "USB connector manager", so I started another thread on this.
 

Alain De Vos

Well-Known Member

Reaction score: 55
Messages: 301

I have the experience things work when the device is plugged in when you boot a guest os but not more when you remove an plug in again afterwards like the resources are not given free.
 
OP
OP
aragats

aragats

Daemon

Reaction score: 575
Messages: 1,424

... like the resources are not given free
Yeah, I even submitted a bug report on this a while ago.
However, here it's different. That USB connector manager has its own logic which controller to pass the connected device to. It's well reproducible. The question is how to control/alter its logic?
 
Top