Jump to content

Rosewill PCI Express USB 3 Card KVM Passthrough issues


Recommended Posts

I recently purchased a Rosewill 4-port USB 3.0 PCI Express card to give some usb hot plug support to one of the VM's I'm running from my PC. 

 

The device seems to work and if I plug in a usb device, it shows up in the unraid System Devices List.  I can successfully pass through the device to a virtual machine with nothing plugged into it but as soon as I plug in a usb device the entire system locks up and I have to Force Stop the VM.  If I try to boot into the VM with a device plugged in then it just hangs on the TianoCore loading screen before windows 10 gets a chance to boot.

 

I have PCIe ACS Override enabled for reference.

 

I've already added the device to the append list for unraid on boot.

 

Quote

kernel /bzimage
append vfio-pci.ids=058f:6364,07fd:0002,8086:a370,8087:0aaa,046d:082d,041e:3249,1a2c:4324,1912:0014
append pcie_acs_override=downstream,multifunction initrd=/bzroot,/bzroot-gui

 

Here is what the VM xml looks like:

Quote

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
  <name>Cody&apos;s VM 3</name>
  <uuid>2ae0c3a8-155f-a5e2-54d3-ef1222b258a6</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>16777216</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>6</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='3'/>
    <vcpupin vcpu='1' cpuset='11'/>
    <vcpupin vcpu='2' cpuset='4'/>
    <vcpupin vcpu='3' cpuset='12'/>
    <vcpupin vcpu='4' cpuset='5'/>
    <vcpupin vcpu='5' cpuset='13'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/2ae0c3a8-155f-a5e2-54d3-ef1222b258a6_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='3' threads='2'/>
  </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/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/vdisks/Cody&apos;s VM 3/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.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.141.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='nec-xhci' ports='15'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <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>
    <controller type='pci' index='0' model='pci-root'/>
    <interface type='bridge'>
      <mac address='52:54:00:e4:ee:f0'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <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='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc313'/>
      </source>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x1038'/>
        <product id='0x0777'/>
      </source>
      <address type='usb' bus='0' port='4'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
</domain>

And here is the list of system devices


 

Quote

 

IOMMU group 0:[8086:3e30] 00:00.0 Host bridge: Intel Corporation 8th Gen Core 8-core Desktop Processor Host Bridge/DRAM Registers [Coffee Lake S] (rev 0a)

IOMMU group 1:[8086:1901] 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 0a)

IOMMU group 2:[8086:1905] 00:01.1 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x8) (rev 0a)

IOMMU group 3:[8086:3e98] 00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Desktop 9 Series)

IOMMU group 4:[8086:a36d] 00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)

[8086:a36f] 00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)

IOMMU group 5:[8086:a370] 00:14.3 Network controller: Intel Corporation Wireless-AC 9560 [Jefferson Peak] (rev 10)

IOMMU group 6:[8086:a360] 00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)

IOMMU group 7:[8086:a352] 00:17.0 SATA controller: Intel Corporation Cannon Lake PCH SATA AHCI Controller (rev 10)

IOMMU group 8:[8086:a340] 00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #17 (rev f0)

IOMMU group 9:[8086:a32c] 00:1b.4 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #21 (rev f0)

IOMMU group 10:[8086:a338] 00:1c.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #1 (rev f0)

IOMMU group 11:[8086:a33e] 00:1c.6 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #7 (rev f0)

IOMMU group 12:[8086:a330] 00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 (rev f0)

IOMMU group 13:[8086:a305] 00:1f.0 ISA bridge: Intel Corporation Z390 Chipset LPC/eSPI Controller (rev 10)

[8086:a348] 00:1f.3 Audio device: Intel Corporation Cannon Lake PCH cAVS (rev 10)

[8086:a323] 00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)

[8086:a324] 00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)

[8086:15bc] 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-V (rev 10)

IOMMU group 14:[10de:1f08] 01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060 Rev. A] (rev a1)

IOMMU group 15:[10de:10f9] 01:00.1 Audio device: NVIDIA Corporation TU106 High Definition Audio Controller (rev a1)

IOMMU group 16:[10de:1ada] 01:00.2 USB controller: NVIDIA Corporation TU106 USB 3.1 Host Controller (rev a1)

IOMMU group 17:[10de:1adb] 01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU106 USB Type-C Port Policy Controller (rev a1)

IOMMU group 18:[10de:1c03] 02:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)

IOMMU group 19:[10de:10f1] 02:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)

IOMMU group 20:[8086:f1a8] 04:00.0 Non-Volatile memory controller: Intel Corporation SSDPEKNW020T8 [660p, 2TB] (rev 03)

IOMMU group 21:[1912:0014] 06:00.0 USB controller: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller (rev 03)

IOMMU group 22:[8086:f1a8] 07:00.0 Non-Volatile memory controller: Intel Corporation SSDPEKNW020T8 [660p, 2TB] (rev 03)

 

CPU Thread Pairings

Pair 1:cpu 0 / cpu 8

Pair 2:cpu 1 / cpu 9

Pair 3:cpu 2 / cpu 10

Pair 4:cpu 3 / cpu 11

Pair 5:cpu 4 / cpu 12

Pair 6:cpu 5 / cpu 13

Pair 7:cpu 6 / cpu 14

Pair 8:cpu 7 / cpu 15

 

USB Devices

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

Bus 001 Device 002:ID 0b05:18a3 ASUSTek Computer, Inc.

Bus 001 Device 003:ID 046d:c313 Logitech, Inc. Internet 350 Keyboard

Bus 001 Device 004:ID 05e3:0610 Genesys Logic, Inc. 4-port hub

Bus 001 Device 005:ID 1038:0777 SteelSeries ApS

Bus 001 Device 006:ID 05e3:0610 Genesys Logic, Inc. 4-port hub

Bus 001 Device 007:ID 0781:5571 SanDisk Corp. Cruzer Fit

Bus 001 Device 008:ID 1a2c:4324 China Resource Semico Co., Ltd

Bus 001 Device 009:ID 046d:c08b Logitech, Inc.

Bus 001 Device 010:ID 258a:1007

Bus 001 Device 011:ID 05e3:0610 Genesys Logic, Inc. 4-port hub

Bus 001 Device 012:ID 8087:0aaa Intel Corp.

Bus 001 Device 013:ID 058f:6364 Alcor Micro Corp. AU6477 Card Reader Controller

Bus 002 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 004 Device 001:ID 1d6b:0003 Linux Foundation 3.0 root hub

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

Bus 005 Device 002:ID 046d:082d Logitech, Inc. HD Pro Webcam C920

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

 

 

Any insight as to what might be causing the VM to hang would be greatly appreciated.

 

Thanks!

 

-C

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.

×
×
  • Create New...