MSI/MSI-x support on USB card for PCIe passthrough

linusxu

Cadet
Joined
Aug 30, 2023
Messages
2
MB: SuperMicro X10SRi-F
CPU: Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
RAM: 2x Micron 36ASF2G72PZ-2G1A2 16GB EEC (== 32GB)

TL;DR

How do I (before purchasing) figure out if a USB PCIe card supports MSI(-x)?

Much text
I've recently purchased some hardware to build my second TrueNAS (core) system that I among other thing intend to use for some services that I want available on my LAN. One of theses services would be required to run in a VM and have access to some USB-ports.

I've come so far as to understand that bhyve does not support USB passthrough and that I am therefore required to do PCIe passthrough.

The motherboard I am using, SuperMicro X10SRi-F, does have three USB controllers, 2xEHCI and 1xXHCI. My first idea (since the devices I want do passthrough would be fine with USB 2.0) was to pass one of the EHCI controllers to the VM. However, no matter where (physical ports) I plugin a USB device, they show up as plugged in to the XHCI controller (using usbconfig on TrueNAS and lsusb on Ubuntu live USB). I am not hardware savvy enough to understand what is happening here.

Passing the internal controllers also does not really seem to be an option because:
1) Setting the required tunables kills mouse and keyboard on BMC/IPMI.
2) None of the controllers seems to have support for MSI/MSI-x interrupts as required according to https://wiki.freebsd.org/bhyve/pci_passthru.

Code:
xhci0@pci0:0:20:0:    class=0x0c0330 rev=0x05 hdr=0x00 vendor=0x8086 device=0x8d31 subvendor=0x15d9 subdevice=0x0834
    vendor     = 'Intel Corporation'
    device     = 'C610/X99 series chipset USB xHCI Host Controller'
    class      = serial bus
    subclass   = USB
    cap 01[70] = powerspec 2  supports D0 D3  current D0

ehci0@pci0:0:26:0:    class=0x0c0320 rev=0x05 hdr=0x00 vendor=0x8086 device=0x8d2d subvendor=0x15d9 subdevice=0x0834
    vendor     = 'Intel Corporation'
    device     = 'C610/X99 series chipset USB Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
    cap 01[50] = powerspec 2  supports D0 D3  current D0
    cap 0a[58] = EHCI Debug Port at offset 0xa0 in map 0x14
    cap 13[98] = PCI Advanced Features: FLR TP

ehci1@pci0:0:29:0:    class=0x0c0320 rev=0x05 hdr=0x00 vendor=0x8086 device=0x8d26 subvendor=0x15d9 subdevice=0x0834
    vendor     = 'Intel Corporation'
    device     = 'C610/X99 series chipset USB Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
    cap 01[50] = powerspec 2  supports D0 D3  current D0
    cap 0a[58] = EHCI Debug Port at offset 0xa0 in map 0x14
    cap 13[98] = PCI Advanced Features: FLR TP


So my plan right now is to purchase a USB PCIe card and plug it into one of the free PCIe slots on the motherboard, to pass that through. Before purchasing I would like to at least do some sort of research into if the card supports MSI/MSI-x interrupts. Is that somehow possible? Or is my understanding of this all wrong and it is the PCIe slot that will full fill the MSI/MSI-x requirement?

Currently I am looking at something like this: https://www.ebay.com/itm/114524502105
 

linusxu

Cadet
Joined
Aug 30, 2023
Messages
2
Should anyone stumble upon this thread: I bought the linked card, and it worked fine. My VM now has USB.
 

potatosword

Dabbler
Joined
Dec 30, 2018
Messages
44
In case anyone else stumbles on this like I did searching for the same thing. The PCI specification states:
MSI/MSI-X interrupt support, which is optional for PCI 3.0 devices, is required for PCI Express devices. All PCI Express device Functions that are capable of generating interrupts must support MSI or MSI-X or both.
So in theory any card you get should support it as long as it isn't ancient. Basically PCIe = will work (unless the manufacturer is blatantly violating the spec).

Sauce: https://electronics.stackexchange.c...e-required-to-support-msi-what-does-that-mean
 
Top