Jump to content
archedraft

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

507 posts in this topic Last Reply

Recommended Posts

 

For whatever reason, it doesn't work for me.

 

If I remember correctly you said that this is the first VM you have attempted, correct? If so please try getting a Windows 7,8, or 10 VM working with GPU and USB passthrough. More people can help and it's a lot more clear if your system is capable of even doing USB passthrough. With OSX there could be a multitude of reasons. Let's start eliminating some of the easy ones.

Share this post


Link to post

 

For whatever reason, it doesn't work for me.

 

If I remember correctly you said that this is the first VM you have attempted, correct? If so please try getting a Windows 7,8, or 10 VM working with GPU and USB passthrough. More people can help and it's a lot more clear if your system is capable of even doing USB passthrough. With OSX there could be a multitude of reasons. Let's start eliminating some of the easy ones.

And here I thought Apple products was chosen for it's ease of use  ::)  ;D

Share this post


Link to post
And here I thought Apple products was chosen for it's ease of use  ::)  ;D
on apple certified hardware. When you have a limited pool of possible hardware combinations to support, it's easy to get it right. Running hackintosh, not so much.

Share this post


Link to post

I'm guessing that either my hardware doesnt support this or i'm not doing the right thing in my bios.

 

"host doesn't support VFIO PCI passthrough" is what i get when trying to start the VM.  The VM works fine otherwise.  This is on an Intel E8400 core 2 duo CPU (circa 2008).

 

Any hope that it's just a bios setting? (I did check, the bios is the latest)

 

PS.  During the tutorial when i go to "System Devices" i see "No IOMMU Groups" which smells like my hardware cant do it.  But i'd love a confirmation that my CPU doesn't do it.

 

According to Intel it supports VT-x and VT-d.  Does pass through require something else? 

 

http://ark.intel.com/products/33910/Intel-Core2-Duo-Processor-E8400-6M-Cache-3_00-GHz-1333-MHz-FSB

 

 

Share this post


Link to post

I'm guessing that either my hardware doesnt support this or i'm not doing the right thing in my bios.

 

"host doesn't support VFIO PCI passthrough" is what i get when trying to start the VM.  The VM works fine otherwise.  This is on an Intel E8400 core 2 duo CPU (circa 2008).

 

Any hope that it's just a bios setting? (I did check, the bios is the latest)

 

PS.  During the tutorial when i go to "System Devices" i see "No IOMMU Groups" which smells like my hardware cant do it.  But i'd love a confirmation that my CPU doesn't do it.

 

According to Intel it supports VT-x and VT-d.  Does pass through require something else? 

 

http://ark.intel.com/products/33910/Intel-Core2-Duo-Processor-E8400-6M-Cache-3_00-GHz-1333-MHz-FSB

Does it say enabled on both HVM and iommu on the info page in the webgui?

Share this post


Link to post

The bigger problem is that your Core 2 Duo CPU is only dual core and does not support hyper threading, so its really unsuitable for virtualization because you simply don't have enough cores to use for a virtual machine.

 

 

I'm guessing that either my hardware doesnt support this or i'm not doing the right thing in my bios.

 

"host doesn't support VFIO PCI passthrough" is what i get when trying to start the VM.  The VM works fine otherwise.  This is on an Intel E8400 core 2 duo CPU (circa 2008).

 

Any hope that it's just a bios setting? (I did check, the bios is the latest)

 

PS.  During the tutorial when i go to "System Devices" i see "No IOMMU Groups" which smells like my hardware cant do it.  But i'd love a confirmation that my CPU doesn't do it.

 

According to Intel it supports VT-x and VT-d.  Does pass through require something else? 

 

http://ark.intel.com/products/33910/Intel-Core2-Duo-Processor-E8400-6M-Cache-3_00-GHz-1333-MHz-FSB

Share this post


Link to post

I'm guessing that either my hardware doesnt support this or i'm not doing the right thing in my bios.

 

"host doesn't support VFIO PCI passthrough" is what i get when trying to start the VM.  The VM works fine otherwise.  This is on an Intel E8400 core 2 duo CPU (circa 2008).

 

Any hope that it's just a bios setting? (I did check, the bios is the latest)

 

PS.  During the tutorial when i go to "System Devices" i see "No IOMMU Groups" which smells like my hardware cant do it.  But i'd love a confirmation that my CPU doesn't do it.

 

According to Intel it supports VT-x and VT-d.  Does pass through require something else? 

 

http://ark.intel.com/products/33910/Intel-Core2-Duo-Processor-E8400-6M-Cache-3_00-GHz-1333-MHz-FSB

Does it say enabled on both HVM and iommu on the info page in the webgui?

 

I've been fumbling in the linux config after some googleing started to make it smell like iommu is not enabled.  So i added this:

 

intel_iommu=on

 

but that didnt seem to make any difference.

 

I'm not sure what i'm looking for in the webgui to confirm that "both HVM and iommu" are enabled.  Where would i see that?  As in, under which tab? 

Share this post


Link to post

Does your mobo support vt-x or vt-d?

Share this post


Link to post

I'm guessing that either my hardware doesnt support this or i'm not doing the right thing in my bios.

 

"host doesn't support VFIO PCI passthrough" is what i get when trying to start the VM.  The VM works fine otherwise.  This is on an Intel E8400 core 2 duo CPU (circa 2008).

 

Any hope that it's just a bios setting? (I did check, the bios is the latest)

 

PS.  During the tutorial when i go to "System Devices" i see "No IOMMU Groups" which smells like my hardware cant do it.  But i'd love a confirmation that my CPU doesn't do it.

 

According to Intel it supports VT-x and VT-d.  Does pass through require something else? 

 

http://ark.intel.com/products/33910/Intel-Core2-Duo-Processor-E8400-6M-Cache-3_00-GHz-1333-MHz-FSB

Does it say enabled on both HVM and iommu on the info page in the webgui?

 

I've been fumbling in the linux config after some googleing started to make it smell like iommu is not enabled.  So i added this:

 

intel_iommu=on

 

but that didnt seem to make any difference.

 

I'm not sure what i'm looking for in the webgui to confirm that "both HVM and iommu" are enabled.  Where would i see that?  As in, under which tab?

The button in the top right corner saying info....

Share this post


Link to post

Your CPU supports vt-x and vt-d but only if your motherboard does as well.  Post your mobo model.

Share this post


Link to post

 

Saarg,

 

I found the info data in unRaid, and it does show that iommu is off.  Thanks for explaining how to find that. 

 

Chbmb,

 

The motherboard is an ASUS P5Q Pro LGA 775 Intel P45 ATX Intel Motherboard

 

Share this post


Link to post

I bought a usb card and I'd like to use that exclusively for unraid and pass all other controllers through to the one VM I plan on running. This is doable, correct?

 

root@Tower:~# lspci | grep USB
00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller
00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2
00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1
04:00.0 USB controller: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller (rev 03)
root@Tower:~# lsusb
Bus 006 Device 002: ID 8087:8001 Intel Corp. 
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 046d:c30a Logitech, Inc. iTouch Composite
Bus 003 Device 002: ID 13fe:3800 Kingston Technology Company Inc. Rage XT Flash Drive
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 8087:8009 Intel Corp. 
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Share this post


Link to post

Hi guys.

Rebuilt my unraid this weekend from a xeon 1240v2 and socket 1155 motherboard to an i7 6700 and ASRock - Z170M Extreme4 (socket 1151) motherboard.

 

I noticed that the board had 2 usb controllers. The motherboard has only usb3 with usb 2.0 legacy support that can be enabled disabled in bios.

 

root@Prime:~# lspci | grep USB
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31)
04:00.0 USB controller: ASMedia Technology Inc. Device 1242

 

So my unraid flash drive would definately be on one controller and i can passthrough the other.

 

I noticed some interesting things. Any usb device i plugged into the intel controller if usb 2.0 would be assigned bus 001. Any usb 3.0 would be assigned bus 002.

root@Prime:~# lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0781:5583 SanDisk Corp 64gig usb3.0 flash
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 046d:c52b Logitech, Inc. Unifying Receiver 
Bus 001 Device 006: ID 0f30:0001 Jess Technology Co., Ltd    
Bus 001 Device 002: ID 0781:556b SanDisk Corp UNRAID flash
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

Swapping the devices in different usb ports gives same result usb 3.0 always bus 002 and usb 2.0 always bus 001

 

same on the other contoller. Usb 3.0 is bus 004 and usb 2.0 is bus 003.

 

so looking at the device numbers

root@Prime:~# readlink /sys/bus/usb/devices/usb1
../../../devices/pci0000:00/0000:00:14.0/usb1
root@Prime:~# readlink /sys/bus/usb/devices/usb2
../../../devices/pci0000:00/0000:00:14.0/usb2
root@Prime:~# readlink /sys/bus/usb/devices/usb3
../../../devices/pci0000:00/0000:00:1c.0/0000:04:00.0/usb3
root@Prime:~# readlink /sys/bus/usb/devices/usb4
../../../devices/pci0000:00/0000:00:1c.0/0000:04:00.0/usb4

 

 

I assume the usb2.0 legacy of the board just assigns a different bus to usb 2.0 devices.

 

The reason im posting this is just to let others know that your bus can change and always test each port with a usb 2.0 and 3.0 device when checking the bus. I could have checked all my spare usb ports with my usb 3.0 flash and it would have given me a different bus to my unraid flash (which is usb 2.0) and i could have passed that controller by mistake.

 

 

 

 

 

 

 

 

 

 

 

 

 

Share this post


Link to post

I bought a usb card and I'd like to use that exclusively for unraid and pass all other controllers through to the one VM I plan on running. This is doable, correct?

 

root@Tower:~# lspci | grep USB
00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller
00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2
00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1
04:00.0 USB controller: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller (rev 03)
root@Tower:~# lsusb
Bus 006 Device 002: ID 8087:8001 Intel Corp. 
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 046d:c30a Logitech, Inc. iTouch Composite
Bus 003 Device 002: ID 13fe:3800 Kingston Technology Company Inc. Rage XT Flash Drive
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 8087:8009 Intel Corp. 
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

First try to boot unraid from the add-on card, then follow the guide to see if this works for you.

Share this post


Link to post

I've searched and couldn't find an answer on this, but is it possible to do a passthrough of a single port or set of ports?

 

The reason I ask is that my mobo has about 10 USB ports on a single controller. Am I able to assign USB ports 1-4 to VM1, 5-7 to VM2, and 8-10 to VM3?

 

Thanks in advance...

Share this post


Link to post

I've searched and couldn't find an answer on this, but is it possible to do a passthrough of a single port or set of ports?

 

The reason I ask is that my mobo has about 10 USB ports on a single controller. Am I able to assign USB ports 1-4 to VM1, 5-7 to VM2, and 8-10 to VM3?

 

Thanks in advance...

 

Not that I am aware of, you could just pass through the usb device however.

Share this post


Link to post

I've searched and couldn't find an answer on this, but is it possible to do a passthrough of a single port or set of ports?

 

The reason I ask is that my mobo has about 10 USB ports on a single controller. Am I able to assign USB ports 1-4 to VM1, 5-7 to VM2, and 8-10 to VM3?

 

Thanks in advance...

 

My understanding of how this works makes me think that that is not possible.  I am curious though, what motherboard is that?  I am in the process of building a new unRaid system abs I bought a z170 based ASRock Extreme 7+ and was very disappointed to lean that every one of its usb2 and 3 ports were all on the same bus.  I ended up buying a pcie add in card to get a separate bus. 

Share this post


Link to post

It's an ASUS X99 Deluxe 3.1.

 

I can pass devices through just fine, but I was hoping for the ability to add or remove devices on the fly like you can with the full controller passthrough (just at the port level).

Share this post


Link to post

Good Morning, Could anyone help me format my XML for PCIe card pass-through? I think I am getting stuck on the fact that my card is seen connecting off of a PCIe port... highlighted below.

 

root@Tower:~# lsusb

Bus 006 Device 002: ID 8087:8000 Intel Corp.

Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 004 Device 004: ID 2109:0812

Bus 004 Device 003: ID 2109:0812

Bus 004 Device 002: ID 2109:0812

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 003 Device 004: ID 1a7c:0191 Evoluent VerticalMouse 4

Bus 003 Device 006: ID 2109:2812

Bus 003 Device 007: ID 18f8:0f97

Bus 003 Device 003: ID 2109:2812

Bus 003 Device 002: ID 2109:2812

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 005 Device 002: ID 8087:8008 Intel Corp.

Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 002: ID 174c:3074 ASMedia Technology Inc.

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 001 Device 005: ID 1532:010b Razer USA, Ltd

Bus 001 Device 004: ID e0ff:0005

Bus 001 Device 003: ID 0781:5583 SanDisk Corp.

Bus 001 Device 002: ID 174c:2074 ASMedia Technology Inc.

Bus 001 Device 006: ID 051d:0002 American Power Conversion Uninterruptible Power Supply

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

___________________________________________________

 

root@Tower:~# readlink /sys/bus/usb/devices/usb1

../../../devices/pci0000:00/0000:00:14.0/usb1

root@Tower:~# readlink /sys/bus/usb/devices/usb2

../../../devices/pci0000:00/0000:00:14.0/usb2

root@Tower:~# readlink /sys/bus/usb/devices/usb3

../../../devices/pci0000:00/0000:00:1c.5/0000:05:00.0/usb3

root@Tower:~# readlink /sys/bus/usb/devices/usb4

../../../devices/pci0000:00/0000:00:1c.5/0000:05:00.0/usb4

root@Tower:~# readlink /sys/bus/usb/devices/usb5

../../../devices/pci0000:00/0000:00:1a.0/usb5

root@Tower:~# readlink /sys/bus/usb/devices/usb6

../../../devices/pci0000:00/0000:00:1d.0/usb6

root@Tower:~# readlink /sys/bus/usb/devices/usb7

../../../devices/pci0000:00/0000:00:1c.6/0000:06:00.0/0000:07:01.2/usb7

root@Tower:~# readlink /sys/bus/usb/devices/usb8

../../../devices/pci0000:00/0000:00:1c.6/0000:06:00.0/0000:07:01.0/usb8

root@Tower:~# readlink /sys/bus/usb/devices/usb9

../../../devices/pci0000:00/0000:00:1c.6/0000:06:00.0/0000:07:01.1/usb9

 

___________________________________________________

root@Tower:~# lspci | grep USB

00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)

00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)

00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)

05:00.0 USB controller: Fresco Logic Device 1100 (rev 10)

07:01.0 USB controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 61)

07:01.1 USB controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 61)

07:01.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 63)

root@Tower:~#

 

UNRAID

___________________________________________________

 

PCI Devices

 

00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)

00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)

00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)

00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)

00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)

00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-V (rev 04)

00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)

00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)

00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d4)

00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d4)

00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d4)

00:1c.5 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #6 (rev d4)

00:1c.6 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d4)

00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)

00:1f.0 ISA bridge: Intel Corporation Z87 Express LPC Controller (rev 04)

00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 04)

00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 04)

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cypress PRO [Radeon HD 5850]

01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cypress HDMI Audio [Radeon HD 5800 Series]

03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)

04:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)

05:00.0 USB controller: Fresco Logic Device 1100 (rev 10)

06:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 03)

07:01.0 USB controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 61)

07:01.1 USB controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 61)

07:01.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 63)

 

___________________________________________________

IOMMU Groups

 

/sys/kernel/iommu_groups/0/devices/0000:00:00.0

/sys/kernel/iommu_groups/1/devices/0000:00:01.0

/sys/kernel/iommu_groups/1/devices/0000:01:00.0

/sys/kernel/iommu_groups/1/devices/0000:01:00.1

/sys/kernel/iommu_groups/2/devices/0000:00:02.0

/sys/kernel/iommu_groups/3/devices/0000:00:03.0

/sys/kernel/iommu_groups/4/devices/0000:00:14.0

/sys/kernel/iommu_groups/5/devices/0000:00:16.0

/sys/kernel/iommu_groups/6/devices/0000:00:19.0

/sys/kernel/iommu_groups/7/devices/0000:00:1a.0

/sys/kernel/iommu_groups/8/devices/0000:00:1b.0

/sys/kernel/iommu_groups/9/devices/0000:00:1c.0

/sys/kernel/iommu_groups/10/devices/0000:00:1c.2

/sys/kernel/iommu_groups/11/devices/0000:00:1c.4

/sys/kernel/iommu_groups/12/devices/0000:00:1c.5

/sys/kernel/iommu_groups/13/devices/0000:00:1c.6

/sys/kernel/iommu_groups/13/devices/0000:06:00.0

/sys/kernel/iommu_groups/13/devices/0000:07:01.0

/sys/kernel/iommu_groups/13/devices/0000:07:01.1

/sys/kernel/iommu_groups/13/devices/0000:07:01.2

/sys/kernel/iommu_groups/14/devices/0000:00:1d.0

/sys/kernel/iommu_groups/15/devices/0000:00:1f.0

/sys/kernel/iommu_groups/15/devices/0000:00:1f.2

/sys/kernel/iommu_groups/15/devices/0000:00:1f.3

/sys/kernel/iommu_groups/16/devices/0000:03:00.0

/sys/kernel/iommu_groups/17/devices/0000:04:00.0

/sys/kernel/iommu_groups/18/devices/0000:05:00.0

 

___________________________________________________

USB Devices

Bus 006 Device 002: ID 8087:8000 Intel Corp.

Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 004 Device 004: ID 2109:0812 

Bus 004 Device 003: ID 2109:0812 

Bus 004 Device 002: ID 2109:0812 

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 003 Device 004: ID 1a7c:0191 Evoluent VerticalMouse 4

Bus 003 Device 006: ID 2109:2812 

Bus 003 Device 007: ID 18f8:0f97 

Bus 003 Device 003: ID 2109:2812 

Bus 003 Device 002: ID 2109:2812 

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 005 Device 002: ID 8087:8008 Intel Corp.

Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 002: ID 174c:3074 ASMedia Technology Inc.

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 001 Device 005: ID 1532:010b Razer USA, Ltd

Bus 001 Device 004: ID e0ff:0005 

Bus 001 Device 003: ID 0781:5583 SanDisk Corp.

Bus 001 Device 002: ID 174c:2074 ASMedia Technology Inc.

Bus 001 Device 006: ID 051d:0002 American Power Conversion Uninterruptible Power Supply

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

 

---------------------------------XML--------------------

 

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>w7x64-har</name>
  <uuid>03456cee-2570-0de7-0cdb-a24411528728</uuid>
  <description>har</description>
  <metadata>
    <vmtemplate name="Custom" icon="windows7.png" os="windows7"/>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='2' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/disk8/w7x64-har/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/ISO/en-ru_windows_all_aio_70in1_with_update_x86-x64_v15.12.19.iso'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/ISO/virtio-win-0.1.112.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:5a:4f:a2'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/w7x64-har.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:1b.0,bus=root.1,addr=01.0'/>
  </qemu:commandline>
</domain>

Share this post


Link to post

What happens if you add the below to the XML above the balloon tag.

 

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

 

You USB card should work to pass through as it's in its own group.

Share this post


Link to post

Thank you saarg, worked well.

I just wish it was a bit easier to make changes to the settings in a VM without killing xml changes.

 

Share this post


Link to post

HI folks,

 

I'm trying to pass through really any of my USB ports to my win10 VM but it's just not working.  I've figured out how to manually pass through a usb device on a bus to the VM but not the bus itself.  I'd prefer to pass through my usb 3 ports as those are the accessible front ports.  I mapped out the ports using lsusb and all the usb 2/1.1 ports are on bus 00.  I imagine that the usb 3 ports are on bus 02 (sysdevices page attached below), but whenever I plug a device into any of the usb3 ports (on the motherboard i/o OR the case front usb ports) the device just doesn't show up under lsusb.

 

I'll be honest I only sort of understand what we're doing but I don't have enough grasp of bus addressing to trouble shoot it myself, I could use some help please.  I'm sorry for being such a noob. :(

 

 

PCI Devices

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (external gfx0 port B) (rev 02)
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD/ATI] RD990 I/O Memory Management Unit (IOMMU)
00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port B)
00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port D)
00:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port E)
00:09.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port H)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 42)
00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller (rev 40)
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA) (rev 40)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge (rev 40)
00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:15.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0)
00:16.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:16.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 5
01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
01:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
02:00.0 USB controller: VIA Technologies, Inc. Device 3483 (rev 01)
03:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
06:00.0 VGA compatible controller: NVIDIA Corporation GF116 [GeForce GTX 550 Ti] (rev a1)
06:00.1 Audio device: NVIDIA Corporation GF116 High Definition Audio Controller (rev a1)


IOMMU Groups

/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/1/devices/0000:00:02.0
/sys/kernel/iommu_groups/2/devices/0000:00:04.0
/sys/kernel/iommu_groups/3/devices/0000:00:05.0
/sys/kernel/iommu_groups/4/devices/0000:00:09.0
/sys/kernel/iommu_groups/5/devices/0000:00:11.0
/sys/kernel/iommu_groups/6/devices/0000:00:12.0
/sys/kernel/iommu_groups/6/devices/0000:00:12.2
/sys/kernel/iommu_groups/7/devices/0000:00:13.0
/sys/kernel/iommu_groups/7/devices/0000:00:13.2
/sys/kernel/iommu_groups/8/devices/0000:00:14.0
/sys/kernel/iommu_groups/9/devices/0000:00:14.1
/sys/kernel/iommu_groups/10/devices/0000:00:14.2
/sys/kernel/iommu_groups/11/devices/0000:00:14.3
/sys/kernel/iommu_groups/12/devices/0000:00:14.4
/sys/kernel/iommu_groups/13/devices/0000:00:14.5
/sys/kernel/iommu_groups/14/devices/0000:00:15.0
/sys/kernel/iommu_groups/14/devices/0000:06:00.0
/sys/kernel/iommu_groups/14/devices/0000:06:00.1
/sys/kernel/iommu_groups/15/devices/0000:00:16.0
/sys/kernel/iommu_groups/15/devices/0000:00:16.2
/sys/kernel/iommu_groups/16/devices/0000:01:00.0
/sys/kernel/iommu_groups/16/devices/0000:01:00.1
/sys/kernel/iommu_groups/17/devices/0000:02:00.0
/sys/kernel/iommu_groups/18/devices/0000:03:00.0
/sys/kernel/iommu_groups/19/devices/0000:04:00.0


USB Devices

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 05dc:a81d Lexar Media, Inc. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[b]Bus 005 Device 003: ID 400c:107a  
Bus 005 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver[/b]
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
(Bold has been passed through to win10 VM succesfully at device level, not pci controller/bus level, all of these are usb2/1.1, usb 3 not showing up here)


SCSI Devices

[0:0:0:0]    disk    ATA      ST1000DM003-1ER1 CC46  /dev/sda 
[1:0:0:0]    disk    ATA      Hitachi HTS54505 A7A0  /dev/sdb 
[2:0:0:0]    disk    ATA      WDC WD30EZRZ-00W 0A80  /dev/sdc 
[6:0:0:0]    disk    Lexar    USB Flash Drive  1100  /dev/sdd 
Done

 

CURRENT Win10 XML:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>HTPCVM</name>
  <uuid>a14872ff-2316-0785-8e42-366eba888f4d</uuid>
  <metadata>
    <vmtemplate name="Custom" icon="windows.png" os="windows"/>
  </metadata>
  <memory unit='KiB'>6291456</memory>
  <currentMemory unit='KiB'>6291456</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='4' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/disk1/vdisks/HTPC/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='mnt/user/ISOs/Windows 10.iso'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='mnt/user/ISOs/virtio-win-0.1.112.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:bd:1e:f4'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/HTPCVM.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x400c'/>
        <product id='0x107a'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=06:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1,bus=root.1,addr=01.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=06:00.1,bus=root.1,addr=00.1'/>
  </qemu:commandline>
</domain>

Share this post


Link to post

Have you checked that your USB 3 ports is enabled in the bios? If it's the front ports in your case, have you checked if they are connected to the motherboard?

Share this post


Link to post

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.