Passthrough Sonnet USB-C card to Windows guest via KVM and vfio












0















I am trying to passthrough a USB card to a guest, but I can't seem to make the VFIO driver stick, instead it seems that the host loads and takes over the card. I have a GPU successfully passed through, so I am sure that vfio/IOMMU are working.



card: Sonnet Allegro USB 3.1, Two-Port USB-C 10Gb PCIe Card (USB3C-2PM-E)
motherboard: ASRock x399 Taichi
CPU: Threadripper 1950x
I tried following the same procedure that I used to passthrough a GPU, which I mostly learned here:



First, get the ID of the card:



~ lspci | grep USB
01:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43ba (rev 02)
0a:00.0 USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller
0b:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller
45:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller


Next. get the vendor, product ID, and an alias, then modify system files accordingly in hopes that it will prevent the card from being grabbed by the host:



~ lspci -nn | grep 0a:00
0a:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242]
cat /sys/bus/pci/devices/0000:0a:00.0/modalias
pci:v00001B21d00001242sv000016B8sd00007230bc0Csc03i30
~ sudo nano /etc/modprobe.d/local.conf


paste at end:



alias pci:v00001B21d00001242sv000016B8sd00007230bc0Csc03i30 vfio-pci
options vfio-pci ids=1b21:1242


then:



~ sudo update-initramfs -u


and reboot and check if the card is using the vfio driver:



~ lspci -kn | grep -A 2 0a
0a:00.0 0c03: 1b21:1242
Subsystem: 16b8:7230
Kernel driver in use: xhci_hcd


I also tried making an override script as per the same blog mentioned above:



sudo nano /sbin/vfio-pci-override-usb.sh


#!/bin/sh

DEVS="0000:0a:00.0"

for DEV in $DEVS; do
echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
done

modprobe -i vfio-pci

#####

sudo chmod 755 /sbin/vfio-pci-override-usb.sh

sudo nano /etc/modprobe.d/local.conf


commented out previous entry and added:



install vfio-pci /sbin/vfio-pci-override-usb.sh
sudo update-initramfs -u
reboot


but still no good:



 ~ lspci -kn | grep -A 2 0a:00
0a:00.0 0c03: 1b21:1242
Subsystem: 16b8:7230
Kernel driver in use: xhci_hcd


also: When I look for the driver, in lspci (to see what else is using it), it brings up a bunch of devices but not 0a:00.



~ lspci -kn | grep -A 2 xhci
Kernel driver in use: xhci_hcd
01:00.1 0106: 1022:43b6 (rev 02)
Subsystem: 1b21:1062
--
Kernel driver in use: xhci_hcd
0b:00.0 1300: 1022:145a
Subsystem: 1022:145a
--
Kernel driver in use: xhci_hcd
0c:00.0 1300: 1022:1455
Subsystem: 1022:1455
--
Kernel driver in use: xhci_hcd
46:00.0 1300: 1022:1455
Subsystem: 1022:1455


Next I tried Tried blacklisting the driver:



sudo nano /etc/default/grub

# original: GRUB_CMDLINE_LINUX_DEFAULT=”amd_iommu=on”
# to:
GRUB_CMDLINE_LINUX_DEFAULT=”modprobe.blacklist=xhci_hcd amd_iommu=on”

##then:
sudo update-grub

##Uncomment in local.conf:
# options vfio-pci ids=1b21:1242

sudo update-initramfs -u


still no:



lspci -kn | grep -A 2 0a:00
0a:00.0 0c03: 1b21:1242
Subsystem: 16b8:7230
Kernel driver in use: xhci_hcd


What else might I try? Am I correct that the kernel driver in use for that device must be vfio-pci?










share|improve this question





























    0















    I am trying to passthrough a USB card to a guest, but I can't seem to make the VFIO driver stick, instead it seems that the host loads and takes over the card. I have a GPU successfully passed through, so I am sure that vfio/IOMMU are working.



    card: Sonnet Allegro USB 3.1, Two-Port USB-C 10Gb PCIe Card (USB3C-2PM-E)
    motherboard: ASRock x399 Taichi
    CPU: Threadripper 1950x
    I tried following the same procedure that I used to passthrough a GPU, which I mostly learned here:



    First, get the ID of the card:



    ~ lspci | grep USB
    01:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43ba (rev 02)
    0a:00.0 USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller
    0b:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller
    45:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller


    Next. get the vendor, product ID, and an alias, then modify system files accordingly in hopes that it will prevent the card from being grabbed by the host:



    ~ lspci -nn | grep 0a:00
    0a:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242]
    cat /sys/bus/pci/devices/0000:0a:00.0/modalias
    pci:v00001B21d00001242sv000016B8sd00007230bc0Csc03i30
    ~ sudo nano /etc/modprobe.d/local.conf


    paste at end:



    alias pci:v00001B21d00001242sv000016B8sd00007230bc0Csc03i30 vfio-pci
    options vfio-pci ids=1b21:1242


    then:



    ~ sudo update-initramfs -u


    and reboot and check if the card is using the vfio driver:



    ~ lspci -kn | grep -A 2 0a
    0a:00.0 0c03: 1b21:1242
    Subsystem: 16b8:7230
    Kernel driver in use: xhci_hcd


    I also tried making an override script as per the same blog mentioned above:



    sudo nano /sbin/vfio-pci-override-usb.sh


    #!/bin/sh

    DEVS="0000:0a:00.0"

    for DEV in $DEVS; do
    echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
    done

    modprobe -i vfio-pci

    #####

    sudo chmod 755 /sbin/vfio-pci-override-usb.sh

    sudo nano /etc/modprobe.d/local.conf


    commented out previous entry and added:



    install vfio-pci /sbin/vfio-pci-override-usb.sh
    sudo update-initramfs -u
    reboot


    but still no good:



     ~ lspci -kn | grep -A 2 0a:00
    0a:00.0 0c03: 1b21:1242
    Subsystem: 16b8:7230
    Kernel driver in use: xhci_hcd


    also: When I look for the driver, in lspci (to see what else is using it), it brings up a bunch of devices but not 0a:00.



    ~ lspci -kn | grep -A 2 xhci
    Kernel driver in use: xhci_hcd
    01:00.1 0106: 1022:43b6 (rev 02)
    Subsystem: 1b21:1062
    --
    Kernel driver in use: xhci_hcd
    0b:00.0 1300: 1022:145a
    Subsystem: 1022:145a
    --
    Kernel driver in use: xhci_hcd
    0c:00.0 1300: 1022:1455
    Subsystem: 1022:1455
    --
    Kernel driver in use: xhci_hcd
    46:00.0 1300: 1022:1455
    Subsystem: 1022:1455


    Next I tried Tried blacklisting the driver:



    sudo nano /etc/default/grub

    # original: GRUB_CMDLINE_LINUX_DEFAULT=”amd_iommu=on”
    # to:
    GRUB_CMDLINE_LINUX_DEFAULT=”modprobe.blacklist=xhci_hcd amd_iommu=on”

    ##then:
    sudo update-grub

    ##Uncomment in local.conf:
    # options vfio-pci ids=1b21:1242

    sudo update-initramfs -u


    still no:



    lspci -kn | grep -A 2 0a:00
    0a:00.0 0c03: 1b21:1242
    Subsystem: 16b8:7230
    Kernel driver in use: xhci_hcd


    What else might I try? Am I correct that the kernel driver in use for that device must be vfio-pci?










    share|improve this question



























      0












      0








      0








      I am trying to passthrough a USB card to a guest, but I can't seem to make the VFIO driver stick, instead it seems that the host loads and takes over the card. I have a GPU successfully passed through, so I am sure that vfio/IOMMU are working.



      card: Sonnet Allegro USB 3.1, Two-Port USB-C 10Gb PCIe Card (USB3C-2PM-E)
      motherboard: ASRock x399 Taichi
      CPU: Threadripper 1950x
      I tried following the same procedure that I used to passthrough a GPU, which I mostly learned here:



      First, get the ID of the card:



      ~ lspci | grep USB
      01:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43ba (rev 02)
      0a:00.0 USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller
      0b:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller
      45:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller


      Next. get the vendor, product ID, and an alias, then modify system files accordingly in hopes that it will prevent the card from being grabbed by the host:



      ~ lspci -nn | grep 0a:00
      0a:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242]
      cat /sys/bus/pci/devices/0000:0a:00.0/modalias
      pci:v00001B21d00001242sv000016B8sd00007230bc0Csc03i30
      ~ sudo nano /etc/modprobe.d/local.conf


      paste at end:



      alias pci:v00001B21d00001242sv000016B8sd00007230bc0Csc03i30 vfio-pci
      options vfio-pci ids=1b21:1242


      then:



      ~ sudo update-initramfs -u


      and reboot and check if the card is using the vfio driver:



      ~ lspci -kn | grep -A 2 0a
      0a:00.0 0c03: 1b21:1242
      Subsystem: 16b8:7230
      Kernel driver in use: xhci_hcd


      I also tried making an override script as per the same blog mentioned above:



      sudo nano /sbin/vfio-pci-override-usb.sh


      #!/bin/sh

      DEVS="0000:0a:00.0"

      for DEV in $DEVS; do
      echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
      done

      modprobe -i vfio-pci

      #####

      sudo chmod 755 /sbin/vfio-pci-override-usb.sh

      sudo nano /etc/modprobe.d/local.conf


      commented out previous entry and added:



      install vfio-pci /sbin/vfio-pci-override-usb.sh
      sudo update-initramfs -u
      reboot


      but still no good:



       ~ lspci -kn | grep -A 2 0a:00
      0a:00.0 0c03: 1b21:1242
      Subsystem: 16b8:7230
      Kernel driver in use: xhci_hcd


      also: When I look for the driver, in lspci (to see what else is using it), it brings up a bunch of devices but not 0a:00.



      ~ lspci -kn | grep -A 2 xhci
      Kernel driver in use: xhci_hcd
      01:00.1 0106: 1022:43b6 (rev 02)
      Subsystem: 1b21:1062
      --
      Kernel driver in use: xhci_hcd
      0b:00.0 1300: 1022:145a
      Subsystem: 1022:145a
      --
      Kernel driver in use: xhci_hcd
      0c:00.0 1300: 1022:1455
      Subsystem: 1022:1455
      --
      Kernel driver in use: xhci_hcd
      46:00.0 1300: 1022:1455
      Subsystem: 1022:1455


      Next I tried Tried blacklisting the driver:



      sudo nano /etc/default/grub

      # original: GRUB_CMDLINE_LINUX_DEFAULT=”amd_iommu=on”
      # to:
      GRUB_CMDLINE_LINUX_DEFAULT=”modprobe.blacklist=xhci_hcd amd_iommu=on”

      ##then:
      sudo update-grub

      ##Uncomment in local.conf:
      # options vfio-pci ids=1b21:1242

      sudo update-initramfs -u


      still no:



      lspci -kn | grep -A 2 0a:00
      0a:00.0 0c03: 1b21:1242
      Subsystem: 16b8:7230
      Kernel driver in use: xhci_hcd


      What else might I try? Am I correct that the kernel driver in use for that device must be vfio-pci?










      share|improve this question
















      I am trying to passthrough a USB card to a guest, but I can't seem to make the VFIO driver stick, instead it seems that the host loads and takes over the card. I have a GPU successfully passed through, so I am sure that vfio/IOMMU are working.



      card: Sonnet Allegro USB 3.1, Two-Port USB-C 10Gb PCIe Card (USB3C-2PM-E)
      motherboard: ASRock x399 Taichi
      CPU: Threadripper 1950x
      I tried following the same procedure that I used to passthrough a GPU, which I mostly learned here:



      First, get the ID of the card:



      ~ lspci | grep USB
      01:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43ba (rev 02)
      0a:00.0 USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller
      0b:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller
      45:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller


      Next. get the vendor, product ID, and an alias, then modify system files accordingly in hopes that it will prevent the card from being grabbed by the host:



      ~ lspci -nn | grep 0a:00
      0a:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242]
      cat /sys/bus/pci/devices/0000:0a:00.0/modalias
      pci:v00001B21d00001242sv000016B8sd00007230bc0Csc03i30
      ~ sudo nano /etc/modprobe.d/local.conf


      paste at end:



      alias pci:v00001B21d00001242sv000016B8sd00007230bc0Csc03i30 vfio-pci
      options vfio-pci ids=1b21:1242


      then:



      ~ sudo update-initramfs -u


      and reboot and check if the card is using the vfio driver:



      ~ lspci -kn | grep -A 2 0a
      0a:00.0 0c03: 1b21:1242
      Subsystem: 16b8:7230
      Kernel driver in use: xhci_hcd


      I also tried making an override script as per the same blog mentioned above:



      sudo nano /sbin/vfio-pci-override-usb.sh


      #!/bin/sh

      DEVS="0000:0a:00.0"

      for DEV in $DEVS; do
      echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
      done

      modprobe -i vfio-pci

      #####

      sudo chmod 755 /sbin/vfio-pci-override-usb.sh

      sudo nano /etc/modprobe.d/local.conf


      commented out previous entry and added:



      install vfio-pci /sbin/vfio-pci-override-usb.sh
      sudo update-initramfs -u
      reboot


      but still no good:



       ~ lspci -kn | grep -A 2 0a:00
      0a:00.0 0c03: 1b21:1242
      Subsystem: 16b8:7230
      Kernel driver in use: xhci_hcd


      also: When I look for the driver, in lspci (to see what else is using it), it brings up a bunch of devices but not 0a:00.



      ~ lspci -kn | grep -A 2 xhci
      Kernel driver in use: xhci_hcd
      01:00.1 0106: 1022:43b6 (rev 02)
      Subsystem: 1b21:1062
      --
      Kernel driver in use: xhci_hcd
      0b:00.0 1300: 1022:145a
      Subsystem: 1022:145a
      --
      Kernel driver in use: xhci_hcd
      0c:00.0 1300: 1022:1455
      Subsystem: 1022:1455
      --
      Kernel driver in use: xhci_hcd
      46:00.0 1300: 1022:1455
      Subsystem: 1022:1455


      Next I tried Tried blacklisting the driver:



      sudo nano /etc/default/grub

      # original: GRUB_CMDLINE_LINUX_DEFAULT=”amd_iommu=on”
      # to:
      GRUB_CMDLINE_LINUX_DEFAULT=”modprobe.blacklist=xhci_hcd amd_iommu=on”

      ##then:
      sudo update-grub

      ##Uncomment in local.conf:
      # options vfio-pci ids=1b21:1242

      sudo update-initramfs -u


      still no:



      lspci -kn | grep -A 2 0a:00
      0a:00.0 0c03: 1b21:1242
      Subsystem: 16b8:7230
      Kernel driver in use: xhci_hcd


      What else might I try? Am I correct that the kernel driver in use for that device must be vfio-pci?







      usb kvm pci pci-passthrough iommu






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 9 mins ago







      Thoughtcraft

















      asked 1 hour ago









      ThoughtcraftThoughtcraft

      1619




      1619






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f498940%2fpassthrough-sonnet-usb-c-card-to-windows-guest-via-kvm-and-vfio%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f498940%2fpassthrough-sonnet-usb-c-card-to-windows-guest-via-kvm-and-vfio%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Entries order in /etc/network/interfaces

          新発田市

          Grub takes very long (several minutes) to open Menu (in Multi-Boot-System)