***GUIDE*** Passthrough Entire PCI USB Controller


archedraft

Recommended Posts

7 hours ago, ksignorini said:

Thanks!

 

How come 00:14.0 only shows up once in the IOMMU groups list? Is that because that controller manages both USB3 and USB4?

 

Iommu groups doesn't have anything to do with the different usb busses. It's all about the pcie devices. 

Link to comment
  • 1 month later...

Hi, been reading through this thread and I can't find an exact answer to my situation:

 

I have a PCI (LEGACY) USB 2.0 card i want to passthrough to VM.

I've tried different methods to separate the PCI card it is own IOMMU group.  No luck.  ACS Override, downstream option, vfio PCI. Combination of all of them

Rebooted in between all those changes and the VIA USB Controller in group 11 will not move. CPU/Mobo is compatible. Version 6.5.3

 

Will this ever work or is this a limitation because it's PCI (Legacy)?  

Does the PCI card need to be separated from the group in order to attempt OP's workaround?

Thoughts/ideas?

 

IOMMU group 11:

[8086:244e] 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a6)

[1106:3038] 07:00.0 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 61)

[1106:3038] 07:00.1 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 61)

[1106:3104] 07:00.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 63)

[8086:1010] 07:02.0 Ethernet controller: Intel Corporation 82546EB Gigabit Ethernet Controller (Copper) (rev 03)

[8086:1010] 07:02.1 Ethernet controller: Intel Corporation 82546EB Gigabit Ethernet Controller (Copper) (rev 03)

[102b:0532] 07:04.0 VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 (rev 0a)

 



 

Link to comment
  • 6 months later...

Hi,

 

Can anyone confirm if it is possible to pass through a USB Controller here please?  I do not have one within a IOMMU group on it's own, does this mean I need to buy a PCI controller? Annoying if so as Brand New X399 board with only the unRAID USB plugged in.

 

Warning: Your system has booted with the PCIe ACS Override setting enabled. The below list doesn't not reflect the way IOMMU would naturally group devices.
To see natural IOMMU groups for your hardware, go to the VM Settings page and set the PCIe ACS Override setting to No.

IOMMU group 0:[1022:1452] 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge

IOMMU group 1:[1022:1453] 00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge

IOMMU group 2:[1022:1453] 00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge

IOMMU group 3:[1022:1452] 00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge

IOMMU group 4:[1022:1452] 00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge

IOMMU group 5:[1022:1453] 00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe GPP Bridge

IOMMU group 6:[1022:1452] 00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge

IOMMU group 7:[1022:1452] 00:07.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge

IOMMU group 8:[1022:1454] 00:07.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B

IOMMU group 9:[1022:1452] 00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge

IOMMU group 10:[1022:1454] 00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B

IOMMU group 11:[1022:790b] 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 59)

[1022:790e] 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)

IOMMU group 12:[1022:1460] 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0

[1022:1461] 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1

[1022:1462] 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2

[1022:1463] 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3

[1022:1464] 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4

[1022:1465] 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5

[1022:1466] 00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6

[1022:1467] 00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7

IOMMU group 13:[1022:1460] 00:19.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0

[1022:1461] 00:19.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1

[1022:1462] 00:19.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2

[1022:1463] 00:19.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3

[1022:1464] 00:19.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4

[1022:1465] 00:19.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5

[1022:1466] 00:19.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6

[1022:1467] 00:19.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7

IOMMU group 14:[1022:43ba] 01:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] X399 Series Chipset USB 3.1 xHCI Controller (rev 02)

[1022:43b6] 01:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] X399 Series Chipset SATA Controller (rev 02)

[1022:43b1] 01:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] X399 Series Chipset PCIe Bridge (rev 02)

[1022:43b4] 02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)

[1022:43b4] 02:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)

[1022:43b4] 02:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)

[1022:43b4] 02:03.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)

[1022:43b4] 02:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)

[8086:1539] 04:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)

[8086:24fd] 05:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)

[8086:1539] 06:00.0 Ethernet controller: Intel Corporation I211 Gigabit Network Connection (rev 03)

[15b3:6750] 07:00.0 Ethernet controller: Mellanox Technologies MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s] (rev b0)

IOMMU group 15:[10de:042f] 08:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 290] (rev a1)

IOMMU group 16:[10de:1187] 09:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 760] (rev a1)

[10de:0e0a] 09:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1)

IOMMU group 17:[1022:145a] 0a:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Device 145a

[1022:1456] 0a:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Platform Security Processor

[1022:145f] 0a:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] USB 3.0 Host controller

IOMMU group 18:[1022:1455] 0b:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Device 1455

[1022:7901] 0b:00.2 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 51)

[1022:1457] 0b:00.3 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller

Link to comment
6 minutes ago, mbc0 said:

Hi,

 

Can anyone confirm if it is possible to pass through a USB Controller here please?  I do not have one within a IOMMU group on it's own, does this mean I need to buy a PCI controller? Annoying if so as Brand New X399 board with only the unRAID USB plugged in.

 

Warning: Your system has booted with the PCIe ACS Override setting enabled. The below list doesn't not reflect the way IOMMU would naturally group devices.
To see natural IOMMU groups for your hardware, go to the VM Settings page and set the PCIe ACS Override setting to No.

IOMMU group 0:[1022:1452] 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge

SNIP

Try adding the multifunction switch to your ACS override.. should split those groups further and give you what you need

Link to comment

Ah, sorry mate, just finished a week of nights and only had 3 hours sleep so am obviously being lazy... many apologies! When you said switch, my sleepy brain made me look for a "Switch" setting on the config screen 😁

 

Just found this so will have a play 😉 pcie_acs_override=downstream,multifunction

 

Thank you for your time @methanoid 👍

  • Like 1
Link to comment

Hi @methanoid

 

Sorry to bother you but wonder if you wouldn't mind casting your very knowledgable eye over this for me? (I have spent hours on this and not just come running here 😁)

 

I have added the multifunction switch as you suggested and it has split all my groups up nicely, thank you for that.  I have added the line in the syslinux.cfg as per spaceinvaders video but there are still no pci devices available in my VM Manager?  Can you throw me a bone anywhere?

 

In the screenshots below, I plugged in a datatraveler for id purposes.

 

Thanks in Advance!

 

image.png.859b45174da629b0a57031cd084fb5f7.png

 

image.png.59817e32c12f0416444b5a9fecccc916.png

 

image.png.2120a2198e0b33cbb3093fb38877d9f4.png

Link to comment

I am going from memory here but your default boot option looks wrong. Try replacing that ' after multi-function with a space and see what happens! Also list all your USB controllers as (also from memory) some will work better than others. My AMD 3.1 controller was a bad choice but I had an Asmedia 3.1 controller that worked better.

Link to comment
5 minutes ago, mbc0 said:

Thank you @methanoid I will try that tonight (family watching Plex now)

 

Here is a list of my USB Controllers ☺️ not sure what the last IOMMU group is? there is no number?

 

image.png.2c1a804d83ddc8041134aadbc390c7b6.png

 

Sorry no idea. I never do my IOMMU groups from that.. just grab the unRAID output from the webUI and snip out so you JUST have the USB controllers groups (and anything else in them, if there is, which there shouldn't be). Just wanted to see what you had to choose from.   Better yet, PM me? This isn't really a general support thread for your specific issue (which isn't cos the guide doesn't work cos it does - worked for many of us)

Link to comment
37 minutes ago, bishyb said:

Can anyone recommend a PCI-E USB 3.0 card that works?

 

I purchased https://www.amazon.co.uk/gp/product/B07FK28BXX/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1 to test based on one of the reviews mentions works in unRAID, but no joy for me, detected in unRAID, VM doesn't start though, just hangs at OVMF Tianocore boot screen...

 

Cheers,

Andrew.

I'm guessing that has TWO controllers on same card which may be the issue. Buy one with ONE controller. Almost any will work for me. Renesas/NEC is what I used mainly (like that card!) but multi controller cards are giving you added complications

Link to comment

Has anyone managed to get the front USB ports connected to a USB card? If so which model usb card did you use? Were there any additional steps i.e. bios changes? It would be great to have the front usb ports wired up and available as hot swaps in a vm

 

I guess the process is buy a USB card which has a usb header on it and connect the front ports to that, but I havent a clue which one will work and Im sure this has been done by others. I know @jonp mentioned it in his recent video

Link to comment
44 minutes ago, AntaresUK said:

Has anyone managed to get the front USB ports connected to a USB card? If so which model usb card did you use? Were there any additional steps i.e. bios changes? It would be great to have the front usb ports wired up and available as hot swaps in a vm

 

I guess the process is buy a USB card which has a usb header on it and connect the front ports to that, but I havent a clue which one will work and Im sure this has been done by others. I know @jonp mentioned it in his recent video

Yes but not running unRAID right now. You are correct. Buy one with a header and connect that.  Any USB controller should be fine except ones with multiple controllers onboard which can be hit and miss (see previous post above yours)

Link to comment
  • 1 month later...

I am having similar problem. I am trying to attach PCI USB3 Controller (Transcend PDU3) to Windows VM. I enabled ACS Override multifunction to get it to its own IOMMU group. Which one would be better to use btw multifunction or downstream,multifunction (both) ?

 

I also added the vfio-pci.ids= to the unraid configuration and the USB controller appears correctly in PCI Devices in VM settings. The problem is the VM startup is slooow and VM doesn't recognize it after it finally is up. Is this incompatible card with unraid or is it something else ? 

 

This can't have multiple controller onboard because it is just 2 port card, right?!

Edited by SirPumpkin
more info
Link to comment
3 hours ago, SirPumpkin said:

I also added the vfio-pci.ids= to the unraid configuration and the USB controller appears correctly in PCI Devices in VM settings. The problem is the VM startup is slooow and VM doesn't recognize it after it finally is up. Is this incompatible card with unraid or is it something else ? 

Ok I tried with another PCI-E card (network card), Linux VM and xen-pciback.hide= method. Same problem.

When I start the VM the rounded arrows go round some time before VM actually starts, and the passthrough device isn't there :(

 

Edit. Whoa, I tried to passthrough internal USB3 gen1 controllers which are managed by CPU and it actually worked! (Mb: Gigabyte Aorus M and CPU 2200G). Yippee!

Edited by SirPumpkin
Link to comment
22 hours ago, SirPumpkin said:

Edit. Whoa, I tried to passthrough internal USB3 gen1 controllers which are managed by CPU and it actually worked! (Mb: Gigabyte Aorus M and CPU 2200G). Yippee!

While this seems to work fairly well, only caveat is that usually vm hangs at boot when starting 2nd or especially 3rd or 4th time.

After full unraid reboot it always works..

Link to comment
  • 4 weeks later...
On 1/2/2016 at 10:57 PM, saarg said:

For me it's much easier to use the hostdev tag instead of the qemu:arg. It's just too much trouble with it when you don't know what you are doing.

So for passing through a PCI(e) device with the hostdev tag this is the starting code:

 

 


    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x00' function='0x0'/>
      </source>
    </hostdev>
 

 

 

You then have to modify some parts of it to get it to work. The good thing is that you do not have to care about which bus and address it's supposed to have in the VM. You only need to find out the host PCI address.

The part you change is bus, slot and function. In your case it's 00:14.0.

Let's brake it down.

00 is the bus. You simply exchange the two numbers after the 0x.

14 is the slot. Same method as above.

0 is the function. Her it's also the same method as above.

So in your case the full device tag would be like this:

 

 


    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x14' function='0x0'/>
      </source>
    </hostdev>
 

 

 

After you start the VM you will see that there are some lines added to the tag, but those you don't have to care about. They get created automatically. If you copy a host device tag to pass through a new device, be sure to remove the two lines created after the


</source>
 

tag, as they are specific to that VM.

 

 


      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
 

 

I've got my external USB hub on the controller at 43:00.0, the bus is 07 and the port is 0.

My XML looks like this: 

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/>
    </hostdev>

 

When starting the VM, I get this error: 

Device 0000:07:00.0 not found: could not access /sys/bus/pci/devices/0000:07:00.0/config: No such file or directory

Also noted is the fact that it doesn't show up in /sys/bus/pci/devices in an ls (see attached)

 

I've also attached proof of the bus (the second screenshot).

 

Update: that device is a dummy: 

ot:   00:07.0
Class:  Host bridge
Vendor: Advanced Micro Devices, Inc. [AMD]
Device: Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge
NUMANode:       0

 

And the real device is 43:00.3, but unRAID doesn't let me type over 1F (43=2B)

 

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x2B' function='0x3'/>
      </source>
    </hostdev>

 

Note: upon changing the second slot (the automatically generated one after </source> to 0x00 errors out with an XML error saying it needs to be >=1.

Screen Shot 2019-08-05 at 12.56.30.png

Screen Shot 2019-08-05 at 12.57.55.png

Edited by dxfydd
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.