XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    PCI Passthrough back to dom0

    Compute
    6
    13
    3.1k
    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 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
          • dthenotD
            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
              • olivierlambertO
                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!

                  L 1 Reply Last reply Reply Quote 1
                  • L
                    lotusdew @l1c
                    last edited by

                    @olivierlambert : I was able to do a passthrough and assign to VM. But then I needed to detach it. I did
                    /opt/xensource/libexec/xen-cmdline --delete-dom0 xen-pciback.hide

                    then followed by

                    /opt/xensource/libexec/xen-cmdline --set-dom0 "xen-pciback.hide=(0000:03:00.0)(0000:03.00.1)(0000:03:00.2)"

                    I had subsequently assigned it to a VM. Then I

                    Then reboot. The first time I did it it worked fine.

                    However, now its not working anymore.

                    My boot config looks like

                    menuentry 'XCP-ng' {
                    search --label --set root root-fwztre
                    multiboot2 /boot/xen.gz dom0_mem=7584M,max:7584M watchdog ucode=scan dom0_max_vcpus=1-16 crashkernel=256M,below=4G console=vga vga=mode-0x0311
                    module2 /boot/vmlinuz-4.19-xen root=LABEL=root-fwztre ro nolvm hpet=disable console=hvc0 console=tty0 quiet vga=785 splash plymouth.ignore-serial-consoles xen-pciback.hide=(0000:03:00.0)(0000:03.00.1)(0000:03:00.2)
                    module2 /boot/initrd-4.19-xen.img

                    [16:07 xilinx-xcp ~]# xl pci-assignable-list
                    libxl: error: libxl_pci.c:427:libxl_device_pci_assignable_list: Looks like pciback driver not loaded

                    Deleting and recreating the pciback.hide is not solving the problem.

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

                      @lotusdew Your second PCI address is wrong. You have a dot instead of a colon: 0000:03.00.1 -> 0000:03:00.1.

                      L 1 Reply Last reply Reply Quote 1
                      • L
                        lotusdew @dthenot
                        last edited by

                        @dthenot THANK YOU !!

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