Update:<div><div><br></div><div>Thank you Zir Blazer and Anthanasios Tasoglou</div><div><br></div><div>I was able to get it working today in qemu with the following that I cobbled together from <http://turlucode.com/qemu-kvm-on-arch-linux-guide> and right here <https://www.redhat.com/archives/vfio-users/2016-May/msg00010.html> Tomorrow I will try to figure out why it is so slow. Assuming I can get it, I will then try and convert it to domain.xml afterward and post the results here in case someone else could use them. </div><div><br></div><div>I'm sure it is me, but it's crazy how much more difficult gpu passthrough from linux host to linux guest has been to achieve than linux host to mac guest.</div><div><br></div><div>Thanks again</div><div>Allen</div><div><br></div><div>sudo qemu-system-x86_64 \<br>-enable-kvm -m 32764 \<br>-cpu host,kvm=off \<br>-smp 8,sockets=1,cores=8,threads=1 \<br>-machine pc-q35-2.5,accel=kvm \<br>-vga none \<br>-device ioh3420,chassis=1,bus=pcie.0,id=pcie.1 \<br>-device vfio-pci,multifunction=true,bus=pcie.1,addr=00.0,host=07:00.0 \<br>-device vfio-pci,bus=pcie.1,addr=00.1,host=07:00.1 \<br>-device vfio-pci,host=04:00.0,bus=pcie.0 \<br>-drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF.fd \<br>-drive if=pflash,format=raw,file=/var/lib/libvirt/qemu/nvram/arch-anywhere-nv_VARS.fd \<br>-hda /dev/sdc \<br>-usb -usbdevice host:05ac:0304 \<br>-usb -usbdevice host:05ac:024f<br></div><br><signature></signature>
        <img class="n1-open" width="0" height="0" style="border:0; width:0; height:0;" src="https://link.nylas.com/open/1m3veovga7nl7tepk1he21tjo/local-4668cb2d-d176?r=dmZpby11c2Vyc0ByZWRoYXQuY29t"><div class="gmail_quote nylas-quote nylas-quote-id-chv1vulvv2bz9zyd4yj3ymqip">
          <br>
          On May 23 2017, at 5:33 pm, Allen Dial <adial@mac.com> wrote:
          <br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
            Hello and thank you for all of your work.<div><div><br></div><div>Distro version: 4.9.28-1-MANJARO - 4.9.28-1 kernel</div><div>QEMU version: QEMU emulator version 2.9.0</div><div>libvirtd version: libvirtd (libvirt) 3.2.0<br></div><div>virt-manager version: 1.4.1</div><div>guest vm: arch linux 2017.05.01 - 4.10.13 kernel</div><div><br></div><div><div>I am a noob to the community (or even the idea of community) "long time mac user" but am loving linux so far.</div><div><br></div><div>Recently I have been trying to get GPU passthrough working for a Linux guest. Previously I have only been successful passing through gpu to macOS guests; MacOS 10.12.5, MacOS 10.12.4, MacOS 10.11.4 and I have never attempted windows.</div><div><br></div><div>For the longest time I couldn't get drivers installed so this last time I installed Arch Linux on metal in the aspired configuration then passed the installed disk to the vm in virt-manager by editing the xml manually.</div><div><br></div><div>The vm outputs to the gpu and I get a display on my monitor but after grub nothing continues on the screen.</div><div><br></div><div>I have modified versions of the xml from ideas in this mainling list and several online source quite a few times all with similar lackluster results. That being said most examples that exist seem geared toward windows.</div><div><br></div><div>Hopefully it goes without saying, but starting the vm without the gpu works fine.</div><div><br></div><div>below are copy/pasted lines from the xml and last log:</div><div><br></div><div>Thank you in advance for any guidance.</div><div><br></div><div>Allen Dial</div><div><br></div><div><u>domain.xml</u>________________________</div><br></div><div><!--<br>WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE<br>OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:<br>  virsh edit arch-anywhere-nv<br>or other application using the libvirt API.<br>--><br><br><domain type='kvm'><br>  <name>arch-anywhere-nv</name><br>  <uuid>3f1e4dbc-e47f-4dbf-9d21-984efbb2f9dc</uuid><br>  <title>arch-anywhere-nv</title><br>  <memory unit='KiB'>16777216</memory><br>  <currentMemory unit='KiB'>16777216</currentMemory><br>  <vcpu placement='static'>4</vcpu><br>  <os><br>    <type arch='x86_64' machine='pc-q35-2.9'>hvm</type><br>    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader><br>    <nvram>/var/lib/libvirt/qemu/nvram/arch-anywhere-nv_VARS.fd</nvram><br>    <boot dev='cdrom'/><br>    <boot dev='hd'/><br>  </os><br>  <features><br>    <acpi/><br>    <kvm><br>      <hidden state='on'/><br>    </kvm><br>  </features><br>  <cpu mode='custom' match='exact' check='partial'><br>    <model fallback='allow'>Haswell-noTSX</model><br>  </cpu><br>  <clock offset='utc'><br>    <timer name='rtc' tickpolicy='catchup'/><br>    <timer name='pit' tickpolicy='delay'/><br>    <timer name='hpet' present='no'/><br>  </clock><br>  <on_poweroff>destroy</on_poweroff><br>  <on_reboot>destroy</on_reboot><br>  <on_crash>destroy</on_crash><br>  <pm><br>    <suspend-to-mem enabled='no'/><br>    <suspend-to-disk enabled='no'/><br>  </pm><br>  <devices><br>    <emulator>/usr/sbin/qemu-system-x86_64</emulator><br>    <disk type='block' device='disk'><br>      <driver name='qemu' type='raw'/><br>      <source dev='/dev/disk/by-id/ata-SanDisk_SDSSDA240G_170735467315'/><br>      <target dev='vdd' bus='virtio'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/><br>    </disk><br>    <disk type='file' device='cdrom'><br>      <driver name='qemu' type='raw'/><br>      <target dev='sdb' bus='sata'/><br>      <readonly/><br>      <address type='drive' controller='0' bus='0' target='0' unit='1'/><br>    </disk><br>    <controller type='usb' index='0' model='ich9-ehci1'><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/><br>    </controller><br>    <controller type='usb' index='0' model='ich9-uhci1'><br>      <master startport='0'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/><br>    </controller><br>    <controller type='usb' index='0' model='ich9-uhci2'><br>      <master startport='2'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/><br>    </controller><br>    <controller type='usb' index='0' model='ich9-uhci3'><br>      <master startport='4'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/><br>    </controller><br>    <controller type='sata' index='0'><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/><br>    </controller><br>    <controller type='pci' index='0' model='pcie-root'/><br>    <controller type='pci' index='1' model='dmi-to-pci-bridge'><br>      <model name='i82801b11-bridge'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/><br>    </controller><br>    <controller type='pci' index='2' model='pci-bridge'><br>      <model name='pci-bridge'/><br>      <target chassisNr='2'/><br>      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/><br>    </controller><br>    <controller type='pci' index='3' model='pcie-root-port'><br>      <model name='pcie-root-port'/><br>      <target chassis='3' port='0x8'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/><br>    </controller><br>    <controller type='pci' index='4' model='pcie-root-port'><br>      <model name='pcie-root-port'/><br>      <target chassis='4' port='0x9'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/><br>    </controller><br>    <controller type='pci' index='5' model='pcie-root-port'><br>      <model name='pcie-root-port'/><br>      <target chassis='5' port='0xa'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/><br>    </controller><br>    <controller type='pci' index='6' model='pcie-root-port'><br>      <model name='pcie-root-port'/><br>      <target chassis='6' port='0xb'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/><br>    </controller><br>    <controller type='pci' index='7' model='pcie-root-port'><br>      <model name='pcie-root-port'/><br>      <target chassis='7' port='0xc'/><br>      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/><br>    </controller><br>    <controller type='virtio-serial' index='0'><br>      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/><br>    </controller><br>    <serial type='pty'><br>      <target port='0'/><br>    </serial><br>    <console type='pty'><br>      <target type='serial' port='0'/><br>    </console><br>    <channel type='spicevmc'><br>      <target type='virtio' name='com.redhat.spice.0'/><br>      <address type='virtio-serial' controller='0' bus='0' port='1'/><br>    </channel><br>    <input type='mouse' bus='ps2'/><br>    <input type='keyboard' bus='ps2'/><br>    <sound model='ich6'><br>      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/><br>    </sound><br>    <hostdev mode='subsystem' type='usb' managed='yes'><br>      <source><br>        <vendor id='0x05ac'/><br>        <product id='0x0304'/><br>      </source><br>      <address type='usb' bus='0' port='2'/><br>    </hostdev><br>    <hostdev mode='subsystem' type='usb' managed='yes'><br>      <source><br>        <vendor id='0x05ac'/><br>        <product id='0x024f'/><br>      </source><br>      <address type='usb' bus='0' port='3'/><br>    </hostdev><br>    <hostdev mode='subsystem' type='pci' managed='yes'><br>      <source><br>        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/><br>      </source><br>      <rom bar='on'/><br>      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/><br>    </hostdev><br>    <hostdev mode='subsystem' type='pci' managed='yes'><br>      <source><br>        <address domain='0x0000' bus='0x07' slot='0x00' function='0x1'/><br>      </source><br>      <rom bar='on'/><br>      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/><br>    </hostdev><br>    <hostdev mode='subsystem' type='usb' managed='yes'><br>      <source><br>        <vendor id='0x13b1'/><br>        <product id='0x0041'/><br>      </source><br>      <address type='usb' bus='0' port='1'/><br>    </hostdev><br>    <redirdev bus='usb' type='spicevmc'><br>      <address type='usb' bus='0' port='4'/><br>    </redirdev><br>    <redirdev bus='usb' type='spicevmc'><br>      <address type='usb' bus='0' port='5'/><br>    </redirdev><br>    <memballoon model='virtio'><br>      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/><br>    </memballoon><br>  </devices><br></domain><br></div><div><br></div><div><u>log</u>________________________<br></div><div><br></div><div>2017-05-23 22:34:33.400+0000: starting up libvirt version: 3.2.0, qemu version: 2.9.0, hostname: prototype.filmtek-cloud.intranet<br>LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/sbin/qemu-system-x86_64 -name guest=arch-anywhere-nv,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-3-arch-anywhere-nv/master-key.aes -machine pc-q35-2.9,accel=kvm,usb=off,dump-guest-core=off -cpu Haswell-noTSX,kvm=off -drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/var/lib/libvirt/qemu/nvram/arch-anywhere-nv_VARS.fd,if=pflash,format=raw,unit=1 -m 16384 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 3f1e4dbc-e47f-4dbf-9d21-984efbb2f9dc -display none -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-3-arch-anywhere-nv/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-reboot -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 -device pcie-root-port,port=0x8,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,addr=0x1 -device pcie-root-port,port=0x9,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x1 -device pcie-root-port,port=0xa,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x2 -device pcie-root-port,port=0xb,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x3 -device pcie-root-port,port=0xc,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x4 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 -drive file=/dev/disk/by-id/ata-SanDisk_SDSSDA240G_170735467315,format=raw,if=none,id=drive-virtio-disk3 -device virtio-blk-pci,scsi=off,bus=pcie.0,addr=0x9,drive=drive-virtio-disk3,id=virtio-disk3,bootindex=2 -drive if=none,media=cdrom,id=drive-sata0-0-1,readonly=on -device ide-cd,bus=ide.1,drive=drive-sata0-0-1,id=sata0-0-1,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device intel-hda,id=sound0,bus=pci.2,addr=0x1 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=4 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=5 -device usb-host,hostbus=3,hostaddr=5,id=hostdev0,bus=usb.0,port=2 -device usb-host,hostbus=3,hostaddr=10,id=hostdev1,bus=usb.0,port=3 -device vfio-pci,host=07:00.0,id=hostdev2,bus=pci.4,addr=0x0,rombar=1 -device vfio-pci,host=07:00.1,id=hostdev3,bus=pci.5,addr=0x0,rombar=1 -device virtio-balloon-pci,id=balloon0,bus=pci.6,addr=0x0 -msg timestamp=on<br>2017-05-23 22:34:33.400+0000: Domain id=3 is tainted: high-privileges<br>2017-05-23T22:34:33.443075Z qemu-system-x86_64: -chardev pty,id=charserial0: char device redirected to /dev/pts/2 (label charserial0)<br>2017-05-23T22:36:32.836901Z qemu-system-x86_64: terminating on signal 15 from pid 14129 (/usr/bin/libvirtd)<br>2017-05-23 22:36:34.437+0000: shutting down, reason=destroyed<br>2017-05-23 23:22:26.933+0000: starting up libvirt version: 3.2.0, qemu version: 2.9.0, hostname: prototype.filmtek-cloud.intranet<br>LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /usr/sbin/qemu-system-x86_64 -name guest=arch-anywhere-nv,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-4-arch-anywhere-nv/master-key.aes -machine pc-q35-2.9,accel=kvm,usb=off,dump-guest-core=off -cpu Haswell-noTSX,kvm=off -drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/var/lib/libvirt/qemu/nvram/arch-anywhere-nv_VARS.fd,if=pflash,format=raw,unit=1 -m 16384 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid 3f1e4dbc-e47f-4dbf-9d21-984efbb2f9dc -display none -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-4-arch-anywhere-nv/monitor.sock,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-reboot -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 -device pcie-root-port,port=0x8,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,addr=0x1 -device pcie-root-port,port=0x9,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x1 -device pcie-root-port,port=0xa,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x2 -device pcie-root-port,port=0xb,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x3 -device pcie-root-port,port=0xc,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x4 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 -drive file=/dev/disk/by-id/ata-SanDisk_SDSSDA240G_170735467315,format=raw,if=none,id=drive-virtio-disk3 -device virtio-blk-pci,scsi=off,bus=pcie.0,addr=0x9,drive=drive-virtio-disk3,id=virtio-disk3,bootindex=2 -drive if=none,media=cdrom,id=drive-sata0-0-1,readonly=on -device ide-cd,bus=ide.1,drive=drive-sata0-0-1,id=sata0-0-1,bootindex=1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device intel-hda,id=sound0,bus=pci.2,addr=0x1 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=4 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=5 -device usb-host,hostbus=3,hostaddr=5,id=hostdev0,bus=usb.0,port=2 -device usb-host,hostbus=3,hostaddr=10,id=hostdev1,bus=usb.0,port=3 -device vfio-pci,host=07:00.0,id=hostdev2,bus=pci.4,addr=0x0,rombar=1 -device vfio-pci,host=07:00.1,id=hostdev3,bus=pci.5,addr=0x0,rombar=1 -device usb-host,hostbus=3,hostaddr=12,id=hostdev4,bus=usb.0,port=1 -device virtio-balloon-pci,id=balloon0,bus=pci.6,addr=0x0 -msg timestamp=on<br>2017-05-23 23:22:26.933+0000: Domain id=4 is tainted: high-privileges<br>2017-05-23T23:22:26.979538Z qemu-system-x86_64: -chardev pty,id=charserial0: char device redirected to /dev/pts/2 (label charserial0)<br></div><div><br></div></div>
          </blockquote>
        </div><div id="n1-quoted-text-marker"></div></div>