XCP-ng

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    PCI Passthrough back to dom0

    Compute
    5
    10
    2624
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      l1c last edited by

      I've been trying to do pci passthrough of an AMD 5600xt . I got it to work on a Windows VM (though I did not test its performance), but now I want to assign the pci back to dom0, and I can't seem to find a straight answer on the web.

      I tried

      # xl pci-assignable-remove -r <uuid>
      

      based on xen documentation but that did not work

      Out of frustration I did:

      /opt/xensource/libexec/xen-cmdline --set-dom0 "xen-pciback.hide=()"
      

      and when I checked

      pci-assignable-list
      

      I got

      libxl: error: libxl_pci.c:427:libxl_device_pci_assignable_list: Looks like pciback driver not loaded
      

      Does any one see this being an issue/problem later on?

      What would be the proper command to give the pci back to dom0?

      onur 1 Reply Last reply Reply Quote 1
      • onur
        onur @l1c last edited by

        @l1c I am not 100% sure but can you check your grub.cfg and see if the pciback.hide is still there?

        /boot/efi/EFI/xenserver/grub.cfg
        

        If it is there remove the text xen-pciback.hide=(xx:xx.X) . (assuming your system uses EFI)

        But use this for the last resort, I am sure someone here will have better solution.

        1 Reply Last reply Reply Quote 0
        • dthenot
          dthenot Vates πŸͺ XCP-ng Team πŸš€ last edited by dthenot

          /opt/xensource/libexec/xen-cmdline --delete-dom0 xen-pciback.hide should do the trick to remove the device from the pci-assignable list of devices at the next reboot.
          dom0 rebooting will take control of the device.

          1 Reply Last reply Reply Quote 0
          • L
            l1c last edited by

            I see. I suspected that line in the docs would be it.
            In that case, may I suggest modifying the wording in the docs? The current wording suggests the opposite. At least it does to me. The "from" in the docs makes it read as if you are hiding all devices from dom0.

            1 Reply Last reply Reply Quote 0
            • L
              l1c last edited by

              @dthenot Before this thread dies, I just wanted to ask one more thing.
              How would you go about only giving back one pci device back dom0?

              1 Reply Last reply Reply Quote 0
              • T
                tony last edited by tony

                You can use the following command to display all the PCI devices being passthrough, and then just set them up again without the one you want to remove.

                /opt/xensource/libexec/xen-cmdline --get-dom0 xen-pciback.hide
                
                1 Reply Last reply Reply Quote 1
                • dthenot
                  dthenot Vates πŸͺ XCP-ng Team πŸš€ last edited by

                  Exactly as @tony said, the option --delete-dom0 just remove the option from the booting command line given to dom0, if you need to remove a device you just need to remove it from the command when calling --set-dom0. I'll take a look at the doc, you can modify it too, we are always open to contribution πŸ™‚ .

                  1 Reply Last reply Reply Quote 0
                  • L
                    l1c last edited by

                    Thanks for all the help everyone. Everyone here is always very helpful
                    How does one go about modifying the docs?

                    1 Reply Last reply Reply Quote 0
                    • olivierlambert
                      olivierlambert Vates πŸͺ Co-Founder🦸 CEO πŸ§‘β€πŸ’Ό last edited by

                      There's a link in the bottom of every documentation page πŸ™‚

                      1 Reply Last reply Reply Quote 2
                      • L
                        l1c last edited by

                        Gotcha
                        Will do
                        Thanks for the help!

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post