<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I know these are mostly gamers but they have a lot of experience
      doing PCI pass though: <a class="moz-txt-link-freetext" href="https://discord.gg/du9ecG">https://discord.gg/du9ecG</a></p>
    <p>I have found them extremely helpful in the past doing libvirt PCI
      passthough.<br>
    </p>
    <div class="moz-signature">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <title></title>
      <p><b>Paul O'Rorke</b><br>
      </p>
      <p style="margin-bottom: 0cm; line-height: 100%"><br>
      </p>
    </div>
    <div class="moz-cite-prefix">On 2020-02-05 10:13 a.m., Jim Fehlig
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:09d83aad-5a13-80c5-f825-2eb2109928ac@suse.com">On 2/4/20
      1:04 AM, Christoph wrote:
      <br>
      <blockquote type="cite">this config does not work... why?
        <br>
      </blockquote>
      <br>
      Without more details, I don't know why :-). In what way does it
      "not work"? Does 'virsh create' fail with this config? If so, what
      is the error? Also check /var/log/libvirt/libxl/libxl-driver.log
      for any errors emitted during the create process.
      <br>
      <br>
      <blockquote type="cite"><domain type='xen'>
        <br>
           <name>marax.chao5.int</name>
        <br>
           <uuid>72f8f7cf-d538-41cd-828a-9945b9157719</uuid>
        <br>
           <memory unit='GiB'>32</memory>
        <br>
           <currentMemory unit='GiB'>32</currentMemory>
        <br>
           <vcpu placement='static'>16</vcpu>
        <br>
           <os>
        <br>
             <type arch='x86_64' machine='xenfv'>hvm</type>
        <br>
             <loader
        type='rom'>/usr/lib/xen/boot/hvmloader</loader>
        <br>
             <boot dev='hd'/>
        <br>
           </os>
        <br>
           <features>
        <br>
             <acpi/>
        <br>
             <apic/>
        <br>
             <pae/>
        <br>
           </features>
        <br>
           <clock offset='localtime'/>
        <br>
           <on_poweroff>destroy</on_poweroff>
        <br>
           <on_reboot>restart</on_reboot>
        <br>
           <on_crash>destroy</on_crash>
        <br>
           <devices>
        <br>
            
        <emulator>/usr/lib/xen/bin/qemu-system-i386</emulator>
        <br>
             <disk type='block' device='disk'>
        <br>
               <driver name='phy' type='raw'/>
        <br>
               <source dev='/dev/mapper/marax_c'/>
        <br>
               <target dev='hda' bus='ide'/>
        <br>
               <address type='drive' controller='0' bus='0'
        target='0' unit='0'/>
        <br>
             </disk>
        <br>
             <disk type='file' device='cdrom'>
        <br>
               <driver type='raw'/>
        <br>
               <target dev='hdb' bus='ide'/>
        <br>
               <readonly/>
        <br>
               <address type='drive' controller='0' bus='0'
        target='0' unit='1'/>
        <br>
             </disk>
        <br>
             <disk type='block' device='disk'>
        <br>
               <driver name='phy' type='raw'/>
        <br>
               <source dev='/dev/vg_lilith/lv_marax_d'/>
        <br>
               <target dev='hdc' bus='ide'/>
        <br>
               <address type='drive' controller='0' bus='1'
        target='0' unit='0'/>
        <br>
             </disk>
        <br>
             <controller type='ide' index='0'/>
        <br>
             <interface type='bridge'>
        <br>
               <mac address='00:16:3e:8c:97:27'/>
        <br>
               <source bridge='xenbr5'/>
        <br>
               <model type='e1000'/>
        <br>
             </interface>
        <br>
             <serial type='pty'>
        <br>
               <target port='0'/>
        <br>
             </serial>
        <br>
             <console type='pty'>
        <br>
               <target type='serial' port='0'/>
        <br>
             </console>
        <br>
             <input type='tablet' bus='usb'/>
        <br>
             <input type='mouse' bus='ps2'/>
        <br>
             <input type='keyboard' bus='ps2'/>
        <br>
             <graphics type='vnc' port='5900' autoport='no'
        listen='0.0.0.0'
        <br>
        keymap='de'>
        <br>
               <listen type='address' address='0.0.0.0'/>
        <br>
             </graphics>
        <br>
             <video>
        <br>
               <model type='xen' vram='16384' heads='1'
        primary='yes'/>
        <br>
             </video>
        <br>
             <hostdev mode='subsystem' type='pci' managed='yes'>
        <br>
               <driver name='xen'/>
        <br>
               <source>
        <br>
                 <address domain='0x0000' bus='0x01' slot='0x00'
        function='0x0'/>
        <br>
               </source>
        <br>
             </hostdev>
        <br>
      </blockquote>
      <br>
      For debugging purposes try to passthrough only one device. Once
      that is working you can add the other devices.
      <br>
      <br>
      Another good debugging step would be to remove libvirt entirely
      and see if you can passthrough the device(s) using the xen tools
      <br>
      <br>
      <a class="moz-txt-link-freetext" href="https://wiki.xenproject.org/wiki/Xen_PCI_Passthrough">https://wiki.xenproject.org/wiki/Xen_PCI_Passthrough</a>
      <br>
      <br>
      Regards,
      <br>
      Jim
      <br>
      <br>
      <blockquote type="cite">     <hostdev mode='subsystem'
        type='pci' managed='yes'>
        <br>
               <driver name='xen'/>
        <br>
               <source>
        <br>
                 <address domain='0x0000' bus='0x01' slot='0x00'
        function='0x1'/>
        <br>
               </source>
        <br>
             </hostdev>
        <br>
             <hostdev mode='subsystem' type='pci' managed='yes'>
        <br>
               <driver name='xen'/>
        <br>
               <source>
        <br>
                 <address domain='0x0000' bus='0x01' slot='0x00'
        function='0x2'/>
        <br>
               </source>
        <br>
             </hostdev>
        <br>
             <hostdev mode='subsystem' type='pci' managed='yes'>
        <br>
               <driver name='xen'/>
        <br>
               <source>
        <br>
                 <address domain='0x0000' bus='0x01' slot='0x00'
        function='0x3'/>
        <br>
               </source>
        <br>
             </hostdev>
        <br>
             <memballoon model='xen'/>
        <br>
           </devices>
        <br>
        </domain>
        <br>
        <br>
        <br>
        ---
        <br>
        ------
        <br>
        Greetz
        <br>
        <br>
        Am 31.01.2020 23:07, schrieb Jim Fehlig:
        <br>
        <blockquote type="cite">On 1/30/20 1:24 AM, Christoph wrote:
          <br>
          <blockquote type="cite">Hi All,
            <br>
            <br>
            it is possible to use pci/gpu passthrough with xen and
            libvirt?
            <br>
            If yes, how is the syntax? Can I get an example?
            <br>
          </blockquote>
          <br>
          Yes, host PCI devices can be passed to xen guests using
          libvirt. Below
          <br>
          is example config of a "managed" PCI host device. For more
          details see
          <br>
          <a class="moz-txt-link-freetext" href="https://libvirt.org/formatdomain.html#elementsHostDevSubsys">https://libvirt.org/formatdomain.html#elementsHostDevSubsys</a>
          <br>
          <br>
              <hostdev mode='subsystem' type='pci' managed='yes'>
          <br>
                <driver name='xen'/>
          <br>
                <source>
          <br>
                  <address domain='0x0000' bus='0x0a' slot='0x10'
          <br>
          function='0x1'/>
          <br>
                </source>
          <br>
              </hostdev>
          <br>
          <br>
          Regards,
          <br>
          Jim
          <br>
        </blockquote>
      </blockquote>
      <br>
      <br>
    </blockquote>
  </body>
</html>