archedraft

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

408 posts in this topic

Intent:

This guide will take you through the process of passing through an entire PCI USB Controller instead of doing it individually. One benefit is that USB will be plug n play on your virtual machines. Also, I have found that if you pass through USB devices separately the device name could change which will cause the VM to not start, but if you pass through the entire controller you will avoid this.

 

Warning!!!:

Please be VERY careful when doing this. You do NOT want to pass through your unRAID USB by mistake. unRAID needs the USB present to function properly. 

 

Prerequisites:

  • Working VM
  • CPU and Bios that supports VT-d
  • USB device (a spare USB Flash drive will work)
  • Motherboard Manual or paper for notes

 

Guide:

 

1. SSH into unRAID

 

2. Find out how many USB controllers your server has available

lspci | grep USB

00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)

00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)

00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)

Notice that my server has 3 USB controllers

 

3. Now would be a great time to pull out the Motherboard Manual to take notes on (see mine below). What we are going to do is plug in an USB flash drive in to each spare USB slot to figure out the controller.

5001b0456322496.jpg

 

4. First lets figure out which USB bus unRAID is on.

lsusb

Bus 002 Device 004: ID 13fe:3800 Kingston Technology Company Inc. Rage XT Flash Drive

Note that my unRAID USB is on bus 002 (figure out which USB that relates to on your motherboard manual and write that down).

**THIS MEANS I SHOULD NOT PASS THROUGH BUS 002!!!**

 

5. Now take a spare USB flash drive that is preferably a different manufacture than your unRAID USB (this will make it easier to identify). Plug it into a spare USB slot and type

lsusb

into your ssh session and write down which "Bus 00#" the spare USB drive appears on. Repeat this step this for all your USB slots.

 

6. Now you should have identified every USB slot's bus number, so lets figure out which PCI Number the bus belongs to (for me I have 3 USB controllers (Bus 001, 002, & 003). Replace the USB# with your bus number example: bus 001 = usb1 in the below code

readlink /sys/bus/usb/devices/usb1

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

readlink /sys/bus/usb/devices/usb2

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

readlink /sys/bus/usb/devices/usb3

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

 

7. We have just figured out the USB controller device number (In my server all Bus 001 USB slots are part of 0000:00:1a.0)

 

8. Now lets make sure that this USB controller doesn't have any other device in its IOMMU Groups

Go to your unRAID gui -> Tools -> System Devices -> IOMMU Groups

 

9. Match the group with the device number. As you can see below, mine is part of group 5 and that is the only device on group 5. If you have more than one device in the same group you will most likly have to pass them through to your VM as well, YMMV

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

 

As of unRAID 6.1 this step is no longer needed. unRAID does this for you automatically.

10. Now lets add that device number to the vfio-pci driver. Open your "go" file under config on your unRAID flash drive and add this line:

/usr/local/sbin/vfio-bind 0000:00:1a.0

and then type the same code into your SSH session to make it active or reboot your server.

 

11. You can either do step 11.a or 11.b [11.b is the easier option]

 

11.a Now lets add that to your Windows 8 VM XML to passthrough:

<domain type='kvm' id='2' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Windows-8-Nvidia</name>
  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa9d</uuid>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>2</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='2' cores='2' threads='1'/>
  </cpu>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/vmdisk/vm_images/default/windows8.img'/>
      <backingStore/>
      <target dev='hda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </disk>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <alias name='scsi0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb0'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb0'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x2'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='sata0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:00:00:04'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </interface>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,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:1a.0,bus=root.1,addr=00.1'/>
  </qemu:commandline>
</domain>

 

This part of the code is needed no matter what and you shouldn't have to change anything (see Hint #1 for more details):

<qemu:commandline>
<qemu:arg value='-device'/>
<qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>

This part is my graphics card (yours will be different):

<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>

This part is the code for the USB controller passthrough:

<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=00:1a.0,bus=root.1,addr=00.1'/>
</qemu:commandline>

 

HINT:

#1 You MUST add the following right after <gemu:commandline> AND then you put in your code for the USB controller

<qemu:arg value='-device'/>
<qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>

 

Then add your USB code so when its all said and done it should look like this if you are only passing through an USB controller without a graphics card (if you are passing through a graphics card as well see my config in step 11 for that example):

<qemu:arg value='-device'/>
<qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=00:1a.0,bus=root.1,addr=00.0'/>

#2 If you are only passing through a USB controller and nothing else (GPU, etc.) then you need to modify your "addr=" part to "addr=00.0"

Every PCI device you passthrough gets its own addr=00.# and it starts at 0. In my above code my GPU is 00.0 and my USB controller is 00.1

 

11.b Using Hostdev instead of the qemu:arg

author=saarg link=topic=36768.msg430843#msg430843 date=1451775451

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'/>

 

12. All done.

 

What if you only have 1 bus...

To my knowledge there are two paths; I will post what JonP posted HERE below (I revised what Jon said a bit to make sense in this thread):

 

The Easy Path

You could always just buy a PCIe USB controller card, install that, and pass it through to a VM directly.

 

The Time Consuming Path

What you need to do is boot into your motherboard BIOS and try tinkering with the settings relating to XHCI / EHCI handoff.  Doing so may allow you to coax certain USB ports to attach to one controller and others to the other controller(s).  It's honestly just a process of trial and error process of changing those settings, and then going through the above guide again to see if anything changed.

 

 

0

Share this post


Link to post
Share on other sites

Well done arch. This is pretty much how I did it.  You can play with xhci and ehci handoff settings in your bios as well to get multiple USB controllers accessible from onboard chip set.

0

Share this post


Link to post
Share on other sites

Thanks, I know I will need to retrace my steps in the future so I better write it down somewhere. What better place than the forum and hopefully others find it useful.

0

Share this post


Link to post
Share on other sites

Excellent write up, thank you! I just setup my KVM and this couldn't come at a better time. I did a little bit of usb-investigation and not having much luck with pci passthrough. I have a long 40ft monoprice usb cable (think it has a in-built repeater) that goes to my htpc and need to passthrough just this port for now. I have rearranged the usb ports so that bus 005 has only these devices. I defined the xml and vfio binds based on the archedraft's example. I have two pci address and that could be the tricky part here. I am having trouble Windows 7 recognizing the devices ...

 

output of >lsusb

Bus 002 Device 002: ID 8087:8001 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 017: ID 046d:c714 Logitech, Inc. diNovo Edge Keyboard
Bus 005 Device 016: ID 046d:c713 Logitech, Inc.
Bus 005 Device 013: ID 046d:0b04 Logitech, Inc.
Bus 005 Device 012: ID 0471:0815 Philips (or NXP) eHome Infrared Receiver
Bus 005 Device 015: ID 04d8:003f Microchip Technology, Inc.
Bus 005 Device 014: ID 046d:082d Logitech, Inc. HD Pro Webcam C920
Bus 005 Device 011: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 005 Device 010: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 005 Device 009: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 005 Device 008: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8009 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 174c:3074 ASMedia Technology Inc.
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 021: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
Bus 003 Device 020: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 003 Device 019: ID 046d:c227 Logitech, Inc. G15 Refresh Keyboard
Bus 003 Device 018: ID 0458:0007 KYE Systems Corp. (Mouse Systems)
Bus 003 Device 017: ID 046d:c226 Logitech, Inc. G15 Refresh Keyboard
Bus 003 Device 016: ID 046d:c223 Logitech, Inc. G11/G15 Keyboard / USB Hub
Bus 003 Device 003: ID 174c:2074 ASMedia Technology Inc.
Bus 003 Device 002: ID 8564:1000
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

output of readlink, note there are two parts of address next to pci unlike the example from OP (0000:00:1c.6/0000:0b:00.0)

root@Tower:/boot/INSTALL# readlink /sys/bus/usb/devices/usb5
../../../devices/pci0000:00/0000:00:1c.6/0000:0b:00.0/usb5

 

for vfio bind (the first two are for videocard video, hdmi audio)

/usr/local/sbin/vfio-bind  0000:01:00.0  0000:01:00.1 0000:0b:00.0

 

my xml

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>win7x64-usbpci</name>
  <uuid>5239b56c-419e-407e-86d0-eaf2c0bad2b5</uuid>
  <description>win7x64usbpci</description>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>
    <boot dev='hd'/>
    <bootmenu enable='no'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
  </cpu>
  <clock offset='localtime'/>
  <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='qcow2' cache='none' io='native'/>
      <source file='/mnt/disk/SSD1/vm/image/Win7x64.qcow2'/>
      <target dev='vdc' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/disk/SSD1/vm/media/X17-24281.iso'/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <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/disk/SSD1/vm/media/virtio-win-0.1-81.iso'/>
      <target dev='sdd' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x2'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:0e:6d:3d'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </interface>
    <input type='tablet' bus='usb'/>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='none' model='none'/>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,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=01:00.1,bus=pcie.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=0b:00.0,bus=root.1,addr=00.1'/>		
  </qemu:commandline>
</domain>

 

I have removed all sections I previously had for hostdev usb definitions and added the pci for usb, the relevant qemu code is:

    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=0b:00.0,bus=root.1,addr=00.1'/>	

 

Am I defining the xml part correctly? The root and addr part look mysterious to me. I used only the second part of the readlink pci address. Using the first part (0000:00:1c.6) gives an xml error and the vm does not start.

0

Share this post


Link to post
Share on other sites

Yes, the VM starts but the usb devices are not recognized in Windows. If I add the second part of the pci address (to vfio bind and qemu part in xml), the VM doesn't start.

 

So if you use 0b:00.0 your VM starts correct?

0

Share this post


Link to post
Share on other sites

Double check to make sure bus 005 is part of vifo-bind. Type lsusb and make sure that any bus 005 devices do not show up. That means that unRAID cannot see them which is what you eant

0

Share this post


Link to post
Share on other sites

Arche - I realized that unraid cannot see bus005 by accident. After I started the VM and the usb devices weren't responding, I saw that none of the bus005 devices were not visible in VM > devices > pci. I thought they were disconnected and double checked they were all connected. A reboot showed they were visible again. So to answer your question, yes they were correctly vfio binded.

 

I was wondering whether my interpretation of the pci address to xml is incorrect since I see two parts in there and I am using only the second part in the pci address. I am going to try to check again later tonight ... Meanwhile let me know if you have any suggestions to try out.

 

Double check to make sure bus 005 is part of vifo-bind. Type lsusb and make sure that any bus 005 devices do not show up. That means that unRAID cannot see them which is what you eant

0

Share this post


Link to post
Share on other sites

The usb pci part of your XML looks correct to me. Have you tired a different USB device when to turn on the VM (just to see if that works). If a different USB device does not work, you could try passing a different bus instead. If it still is giving you issues maybe it is a Windows 7 issue? I have never tried Windows 7 as a VM so I am not sure.

0

Share this post


Link to post
Share on other sites

Spent sometime debugging and think it could be Win 7 related. I moved all the pci passthru intended usb's to usb003 (has one pci address similar to OP) and moved my unraid flash drive to usb005 (has two pci addresses). Defined the vfio-bind and qemu. The VM started and everything looked good except that the usb devices on pci pass thru were not recognized. In fact as soon as I defined the vfio-bind, the keyboards and mice on usb003 lost their power and kvm>devices did not show any usb003 devices.

 

I am going back to define my usb's in host mode until I get around to installing Win 8 :(

 

The usb pci part of your XML looks correct to me. Have you tired a different USB device when to turn on the VM (just to see if that works). If a different USB device does not work, you could try passing a different bus instead. If it still is giving you issues maybe it is a Windows 7 issue? I have never tried Windows 7 as a VM so I am not sure.

0

Share this post


Link to post
Share on other sites

Thank you Archedraft for your great tutorial. All up and working in my win8.1vm. ;)

0

Share this post


Link to post
Share on other sites

 

Thank you Archedraft for your great tutorial. All up and working in my win8.1vm. ;)

 

You're welcome, glad it's working!

0

Share this post


Link to post
Share on other sites

Thanks for the excellent guide. [sOLVED]

 

Having a few problems passing through the controller however.

 

I mapped out the ports as suggested. The ports I wish to pass through are all on Bus 4.

 

The output of readlink

 

# readlink /sys/bus/usb/devices/usb4

 

is

 

../../../devices/pci0000:00/0000:00:12.0/usb4

 

I have updated the XML and vfio bind. Connected usb keyboard (did not get power) and confirmed that it did not show up in lsusb.

 

Using virsh to start the domain I get the following error.

 

virsh # start windows81
error: Failed to start domain windows81
error: internal error: early end of file from monitor: possible problem:
2014-12-22T16:45:59.153076Z qemu-system-x86_64: -device vfio-pci,host=00:12.0,bus=root.1,addr=00.1: vfio: error, group 6 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
2014-12-22T16:45:59.153139Z qemu-system-x86_64: -device vfio-pci,host=00:12.0,bus=root.1,addr=00.1: vfio: failed to get group 6
2014-12-22T16:45:59.153172Z qemu-system-x86_64: -device vfio-pci,host=00:12.0,bus=root.1,addr=00.1: Device initialization failed.
2014-12-22T16:45:59.153206Z qemu-system-x86_64: -device vfio-pci,host=00:12.0,bus=root.1,addr=00.1: Device 'vfio-pci' could not be initialized

 

going back and entering

 

lspci | grep USB

 

I see

 

00:12.0 USB controller: AMD/ATI [Advanced Micro Devices, Inc.] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.2 USB controller: AMD/ATI [Advanced Micro Devices, Inc.] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: AMD/ATI [Advanced Micro Devices, Inc.] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.2 USB controller: AMD/ATI [Advanced Micro Devices, Inc.] SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.5 USB controller: AMD/ATI [Advanced Micro Devices, Inc.] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
00:16.0 USB controller: AMD/ATI [Advanced Micro Devices, Inc.] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:16.2 USB controller: AMD/ATI [Advanced Micro Devices, Inc.] SB7x0/SB8x0/SB9x0 USB EHCI Controller
02:00.0 USB controller: Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)
07:00.0 USB controller: Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev 01)

 

I am guessing that I also have to vfio-bind 00:12.2 as well as 00:12.0 but when I do this by editing the XML file and vfio-bind I get the following

 

virsh # start windows81
error: Failed to start domain windows81
error: internal error: early end of file from monitor: possible problem:
2014-12-22T16:57:26.634081Z qemu-system-x86_64: -device vfio-pci,host=00:12.2,bus=root.1,addr=00.1: PCI: slot 0 function 1 not available for vfio-pci, in use by vfio-pci
2014-12-22T16:57:26.634143Z qemu-system-x86_64: -device vfio-pci,host=00:12.2,bus=root.1,addr=00.1: Device initialization failed.
2014-12-22T16:57:26.634199Z qemu-system-x86_64: -device vfio-pci,host=00:12.2,bus=root.1,addr=00.1: Device 'vfio-pci' could not be initialized

 

currently my XML file qemu section looks like this

 

<qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=04:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=04:00.1,bus=pcie.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:12.0,bus=root.1,addr=00.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:12.2,bus=root.1,addr=00.1'/>
  </qemu:commandline>

 

Not sure what I am doing wrong here. Help and thanks

 

[sOLVED]

 

Removed

 

<qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:12.2,bus=root.1,addr=00.1'/>

 

from XML but left the Go file looking like this

 

/usr/local/sbin/vfio-bind 0000:04:00.0 0000:04:00.1 0000:00:12.0 0000:00:12.2

 

The VM starts and the Microsoft all-in-one keyboard trackpad that would not work for more than a minute or so without stopping now works great and is not having any instability issues. I can plug other USB devices into any of the ports that belong to the USB controller and they work hot plug style.

 

Thanks

0

Share this post


Link to post
Share on other sites

htpcnewbie and I have the same motherboard, and I came across having the same issues as they were.  It is not a Win7 issue, as the same thing happens in Win8.  Basically, the controller shows up in device manager, but it has a yellow exclamation because it has failed to start.  We have the ASRock Xtreme6 LGA1150 motherboard.  Here's a few commands with their outputs:

 

root@Tower:~# lspci | grep ASMedia
05:00.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:01.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:03.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:05.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:07.0 PCI bridge: ASMedia Technology Inc. Device 1184
08:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
0a:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
0c:00.0 USB controller: ASMedia Technology Inc. Device 1142
root@Tower:~# lsusb
Bus 002 Device 002: ID 8087:8001 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 007: ID 04f2:0841 Chicony Electronics Co., Ltd HP Multimedia Keyboard
Bus 005 Device 016: ID 1532:0101 Razer USA, Ltd Copperhead Mouse
Bus 005 Device 008: ID 046d:0a1f Logitech, Inc. G930
Bus 005 Device 006: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 005 Device 013: ID 0cf3:3002 Atheros Communications, Inc. AR3011 Bluetooth
Bus 005 Device 011: ID 046d:c50e Logitech, Inc. Cordless Mouse Receiver
Bus 005 Device 005: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 005 Device 004: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 005 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 005 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8009 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 174c:3074 ASMedia Technology Inc.
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 010: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 004: ID 045e:006d Microsoft Corp. eHome Remote Control Keyboard keys
Bus 003 Device 003: ID 174c:2074 ASMedia Technology Inc.
Bus 003 Device 002: ID 0781:5580 SanDisk Corp. SDCZ80 Flash Drive
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@Tower:~# readlink /sys/bus/usb/devices/usb5
../../../devices/pci0000:00/0000:00:1c.6/0000:0c:00.0/usb5
root@Tower:~#

 

 

0

Share this post


Link to post
Share on other sites

Thanks for the excellent guide. [sOLVED]

 

The VM starts and the Microsoft all-in-one keyboard trackpad that would not work for more than a minute or so without stopping now works great and is not having any instability issues. I can plug other USB devices into any of the ports that belong to the USB controller and they work hot plug style.

 

Awesome, glad you got that figured out. It seems with computers there is always something "special" about each one that requires a slightly different approach.

0

Share this post


Link to post
Share on other sites

htpcnewbie and I have the same motherboard, and I came across having the same issues as they were.  It is not a Win7 issue, as the same thing happens in Win8.  Basically, the controller shows up in device manager, but it has a yellow exclamation because it has failed to start.  We have the ASRock Xtreme6 LGA1150 motherboard.  Here's a few commands with their outputs:

 

Hmmm, well the only thing I can think of is maybe the USB Controller is part of a larger group and you also need to bind the rest of the group. Copy the attached file to your unRAID flash drive and then SSH into unRAID and run it.

 

sh group

 

Notice that my USB controller is part of group #5 and is the only device on group #5

### Group 5 ###
    00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)

 

And for example if I wanted to pass through my dual Nic card to a VM it is part of group #16 and I believe I would have to pass through both Ethernet controllers to the VM.

### Group 16 ###
    04:00.0 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)
    04:00.1 Ethernet controller: Intel Corporation 82571EB Gigabit Ethernet Controller (rev 06)

 

 

 

 

 

group.zip

0

Share this post


Link to post
Share on other sites

Only itself in the group.

 

### Group 28 ###

    0c:00.0 USB controller: ASMedia Technology Inc. Device 1142

 

 

Maybe I just need to try harder with the drivers, but I did try a bunch of different ones the last time I tried.

0

Share this post


Link to post
Share on other sites

I've followed the guide and the results make no sense in that every socket is coming back as bus 003.

 

The Lexar is the usb stick I used to move around.

 

If I plug it back in a port I've already listed the Device number goes up by 1

 

[Edit] This was done with the array running and clean boot, array stopped. The results were the same.

 

Kevin.

 

p9d-m usb ports

root@Tower:~# lspci|grep USB
00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 05)
00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 05)
00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 05)
root@Tower:~# lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 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 0781:5571 SanDisk Corp. Cruzer Fit								internal socket
Bus 003 Device 007: ID 046b:ff31 American Megatrends, Inc. 
Bus 003 Device 006: ID 046b:ff40 American Megatrends, Inc. 
Bus 003 Device 005: ID 046b:ff20 American Megatrends, Inc. 
Bus 003 Device 004: ID 046b:ff10 American Megatrends, Inc. Virtual Keyboard and Mouse
Bus 003 Device 002: ID 046b:ff01 American Megatrends, Inc. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 008: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					front usb2 left
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 009: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					front usb2 right
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 010: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					front usb3 (single socket)
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 011: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					rear usb2 bottom
root@Tower:~# lsusb
Bus 003 Device 013: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					rear usb2 top
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 014: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					rear usb3 bottom
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 015: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					rear usb3 top
root@Tower:~# ls 

root@Tower:~# readlink /sys/bus/usb/devices/usb1
../../../devices/pci0000:00/0000:00:1a.0/usb1
root@Tower:~# readlink /sys/bus/usb/devices/usb2
../../../devices/pci0000:00/0000:00:1d.0/usb2
root@Tower:~# readlink /sys/bus/usb/devices/usb3
../../../devices/pci0000:00/0000:00:14.0/usb3
root@Tower:~# readlink /sys/bus/usb/devices/usb4
../../../devices/pci0000:00/0000:00:14.0/usb4
root@Tower:~#

 

 

0

Share this post


Link to post
Share on other sites

Hey reluctantflux - I have been meaning to ping and let you know about this but travelling this week and got busy. I tried win8.1 with the xml that I posted earlier on this thread and the Pci pass through for usb3 worked without trouble in first go. You were right about it not working in win7 though but it worked in win8.1.

 

My unraid key is moved to usb5 slot, bottom left side (front looking aft). I think the inside USB slot, inside usb2 headers and mobo right side slots are on usb3 which I am passing through. Can you try this config and see whether it works on your win8.1?

 

Merry Christmas and Happy Holidays!

 

EDIT: I just checked the xml I posted earlier and seems it is my first pass using usb5 pass through. If you are having trouble let me know and I can send my working version of xml. I will be back home this Monday.

 

htpcnewbie and I have the same motherboard, and I came across having the same issues as they were.  It is not a Win7 issue, as the same thing happens in Win8.  Basically, the controller shows up in device manager, but it has a yellow exclamation because it has failed to start.  We have the ASRock Xtreme6 LGA1150 motherboard.  Here's a few commands with their outputs:

 

root@Tower:~# lspci | grep ASMedia
05:00.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:01.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:03.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:05.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:07.0 PCI bridge: ASMedia Technology Inc. Device 1184
08:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
0a:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
0c:00.0 USB controller: ASMedia Technology Inc. Device 1142
root@Tower:~# lsusb
Bus 002 Device 002: ID 8087:8001 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 007: ID 04f2:0841 Chicony Electronics Co., Ltd HP Multimedia Keyboard
Bus 005 Device 016: ID 1532:0101 Razer USA, Ltd Copperhead Mouse
Bus 005 Device 008: ID 046d:0a1f Logitech, Inc. G930
Bus 005 Device 006: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 005 Device 013: ID 0cf3:3002 Atheros Communications, Inc. AR3011 Bluetooth
Bus 005 Device 011: ID 046d:c50e Logitech, Inc. Cordless Mouse Receiver
Bus 005 Device 005: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 005 Device 004: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 005 Device 003: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 005 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8009 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 174c:3074 ASMedia Technology Inc.
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 010: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 004: ID 045e:006d Microsoft Corp. eHome Remote Control Keyboard keys
Bus 003 Device 003: ID 174c:2074 ASMedia Technology Inc.
Bus 003 Device 002: ID 0781:5580 SanDisk Corp. SDCZ80 Flash Drive
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@Tower:~# readlink /sys/bus/usb/devices/usb5
../../../devices/pci0000:00/0000:00:1c.6/0000:0c:00.0/usb5
root@Tower:~#

 

0

Share this post


Link to post
Share on other sites

 

I've followed the guide and the results make no sense in that every socket is coming back as bus 003.

 

The Lexar is the usb stick I used to move around.

 

If I plug it back in a port I've already listed the Device number goes up by 1

 

[Edit] This was done with the array running and clean boot, array stopped. The results were the same.

 

Kevin.

 

p9d-m usb ports

root@Tower:~# lspci|grep USB
00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 05)
00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 05)
00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 05)
root@Tower:~# lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 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 0781:5571 SanDisk Corp. Cruzer Fit								internal socket
Bus 003 Device 007: ID 046b:ff31 American Megatrends, Inc. 
Bus 003 Device 006: ID 046b:ff40 American Megatrends, Inc. 
Bus 003 Device 005: ID 046b:ff20 American Megatrends, Inc. 
Bus 003 Device 004: ID 046b:ff10 American Megatrends, Inc. Virtual Keyboard and Mouse
Bus 003 Device 002: ID 046b:ff01 American Megatrends, Inc. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 008: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					front usb2 left
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 009: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					front usb2 right
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 010: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					front usb3 (single socket)
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 011: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					rear usb2 bottom
root@Tower:~# lsusb
Bus 003 Device 013: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					rear usb2 top
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 014: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					rear usb3 bottom
root@Tower:~# lsusb
Bus 003 Device 003: ID 0781:5571 SanDisk Corp. Cruzer Fit
Bus 003 Device 015: ID 05dc:a440 Lexar Media, Inc. JumpDrive Lightning					rear usb3 top
root@Tower:~# ls 

root@Tower:~# readlink /sys/bus/usb/devices/usb1
../../../devices/pci0000:00/0000:00:1a.0/usb1
root@Tower:~# readlink /sys/bus/usb/devices/usb2
../../../devices/pci0000:00/0000:00:1d.0/usb2
root@Tower:~# readlink /sys/bus/usb/devices/usb3
../../../devices/pci0000:00/0000:00:14.0/usb3
root@Tower:~# readlink /sys/bus/usb/devices/usb4
../../../devices/pci0000:00/0000:00:14.0/usb4
root@Tower:~#

 

On step #2, how many USB controllers does your computer have?

0

Share this post


Link to post
Share on other sites

archedraft

 

That was the first chunk in my code list.

 

root@Tower:~# lspci|grep USB

00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 05)

00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 05)

00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 05)

 

Kevin.

0

Share this post


Link to post
Share on other sites

 

archedraft

 

That was the first chunk in my code list.

 

root@Tower:~# lspci|grep USB

00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host Controller (rev 05)

00:1a.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #2 (rev 05)

00:1d.0 USB controller: Intel Corporation Lynx Point USB Enhanced Host Controller #1 (rev 05)

 

Kevin.

 

You said above that the test were done with the array stopped? My array was on when I ran the test so that might be it.

0

Share this post


Link to post
Share on other sites

Tried with the array running and clean boot with array stopped.

 

I'm going to leave it now until after boxing day then have a good look at my bios settings for usb related stuff and install a 2 port pci-e usb card.

 

Hopefully something will work so I can get the bluray drive working on my kvm.

 

I'll follow up with anything I find.

 

Kevin.

 

0

Share this post


Link to post
Share on other sites

 

 

EDIT: I just checked the xml I posted earlier and seems it is my first pass using usb5 pass through. If you are having trouble let me know and I can send my working version of xml. I will be back home this Monday.

 

 

So you're passing through the ASMedia controller, and not the intel one, correct? Can you show me your "Universal Serial Bus Controllers" section of Device Manager?  I'm curious on if you have different host controllers showing than me.  Also, I read this could be an issue with the Bios, having the USB 3.0 supporting legacy devices.

0

Share this post


Link to post
Share on other sites

reluctantflux - Here is my output from lspci and the highlighted one is the one I am passing for USB (usb3/BUS 003). This config has the pci usb slots passing through, so I am not sure whether some of them are not visible to Unraid.

 

EDIT: looks like I cannot make the bold that is input in code format but I have not removed the bold code to highlight the relevant code.

"

root@Tower:/mnt/disk/SSD1/vm/image# lspci
00:00.0 Host bridge: Intel Corporation Haswell DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Haswell PCI Express x16 Controller (rev 06)
00:01.1 PCI bridge: Intel Corporation Haswell PCI Express x8 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Haswell Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Haswell HD Audio Controller (rev 06)
[b]00:14.0 USB controller: Intel Corporation Device 8cb1[/b]
00:16.0 Communication controller: Intel Corporation Device 8cba
00:19.0 Ethernet controller: Intel Corporation Device 15a1
00:1a.0 USB controller: Intel Corporation Device 8cad
00:1b.0 Audio device: Intel Corporation Device 8ca0
00:1c.0 PCI bridge: Intel Corporation Device 8c90 (rev d0)
00:1c.2 PCI bridge: Intel Corporation Device 8c94 (rev d0)
00:1c.3 PCI bridge: Intel Corporation Device 8c96 (rev d0)
00:1c.6 PCI bridge: Intel Corporation Device 8c9c (rev d0)
00:1d.0 USB controller: Intel Corporation Device 8ca6
00:1f.0 ISA bridge: Intel Corporation Device 8cc4
00:1f.2 SATA controller: Intel Corporation Device 8c82
00:1f.3 SMBus: Intel Corporation Device 8ca2
01:00.0 VGA compatible controller: AMD/ATI [Advanced Micro Devices, Inc.] Tahiti XT [Radeon HD 7970]
01:00.1 Audio device: AMD/ATI [Advanced Micro Devices, Inc.] Tahiti XT HDMI Audio [Radeon HD 7970 Series]
02:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 11)
05:00.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:01.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:03.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:05.0 PCI bridge: ASMedia Technology Inc. Device 1184
06:07.0 PCI bridge: ASMedia Technology Inc. Device 1184
08:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
0a:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)
0b:00.0 USB controller: ASMedia Technology Inc. Device 1142

 

output from lsusb (note BUS 003 is missing here since it is being passed through)

root@Tower:/mnt/disk/SSD1/vm/image# lsusb
Bus 002 Device 002: ID 8087:8001 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 003: ID 03f0:0024 Hewlett-Packard KU-0316 Keyboard
Bus 005 Device 002: ID 8564:1000 <<- This is the unraid key. Location: Leftmost bottom slot on the mobo, forward looking aft.
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8009 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

vfio-bind in go, the last address is for usb pci

#For KVM videocard video & hdmi audio pass thru
/usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1 0000:00:14.0

 

my xml (bold toward the end is the pci passthrough for usb3)

<domain type='kvm' id='2' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>win81x64pci</name>
  <uuid>d8d5720f-e23f-40d4-8a6b-19864c464c41</uuid>
  <description>win81x64pci</description>
  <memory unit='KiB'>13107200</memory>
  <currentMemory unit='KiB'>13107200</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>
    <boot dev='hd'/>
    <bootmenu enable='yes'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
  </cpu>
  <clock offset='localtime'/>
  <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='qcow2' cache='none' io='native'/>
      <source file='/mnt/disk/SSD1/vm/image/Win81x64.qcow2'/>
      <backingStore/>
      <target dev='vdc' bus='virtio'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/disk/SSD1/vm/media/Windows81Pro.iso'/>
      <backingStore/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-0'/>
      <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/disk/SSD1/vm/media/virtio-win-0.1-81.iso'/>
      <backingStore/>
      <target dev='sdd' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb0'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb0'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x2'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='sata0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:0e:6d:3d'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </interface>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='none' model='none'/>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,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=01:00.1,bus=pcie.0'/>
[b]    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:14.0,bus=root.1,addr=00.1'/>[/b]
  </qemu:commandline>
</domain>

 

 

 

So you're passing through the ASMedia controller, and not the intel one, correct? Can you show me your "Universal Serial Bus Controllers" section of Device Manager?  I'm curious on if you have different host controllers showing than me.  Also, I read this could be an issue with the Bios, having the USB 3.0 supporting legacy devices.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

Copyright © 2005-2017 Lime Technology, Inc. unRAID® is a registered trademark of Lime Technology, Inc.