<div dir="ltr">Works perfectly now! Thank you Alex!<div><br></div><div>Thanks,</div><div>Daniel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 17, 2017 at 11:18 PM, Alex Williamson <span dir="ltr"><<a href="mailto:alex.l.williamson@gmail.com" target="_blank">alex.l.williamson@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Jan 17, 2017 at 8:54 PM, Daniel Browne <span dir="ltr"><<a href="mailto:jairuncaloth@gmail.com" target="_blank">jairuncaloth@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi guys,<div>I've got a new Fedora 25 host setup and I am attempting to get an Ubuntu 16.40 guest running with VGA passthrough. On the guest, I've installed the official nvidia driver via the Ubuntu drivers tool. The nvidia driver loads, but xorg.log shows the error "failed to initialize glx extension (compatible nvidia x driver not found)"</div><div><br></div><div>Based on an e-mail to this list from the last time I attempted this, it is my understanding that you need a Q35 machine and a valid pci-e bus setup to make this all work.</div></div></blockquote><div> </div></span><div>I'm not sure how much this is true, that you need a "valid pci-e bus setup", but you haven't got one.  AFAIK, the PCI-e root port issues are limited to Radeon.</div><div><div class="h5"><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I *believe* I have a valid pci-e setup with Q35, but I'm honestly not entirely sure. Most of what I've found regarding the subject is a bit light on details. I would appreciate it if someone could look over my domain XML below and help me figure out what I'm doing wrong.</div><div><br></div><div><div><domain type='kvm' xmlns:qemu='<a href="http://libvirt.org/schemas/domain/qemu/1.0" target="_blank">http://libvirt.org<wbr>/schemas/domain/qemu/1.0</a>'></div><div>  <name>ubuntu16.04</name></div><div>  <uuid>80e1008f-b83c-47c7-a334-<wbr>c9a07577751c</uuid></div><div>  <memory unit='KiB'>4184064</memory></div><div>  <currentMemory unit='KiB'>4184064</currentMem<wbr>ory></div><div>  <vcpu placement='static'>2</vcpu></div><div>  <os></div><div>    <type arch='x86_64' machine='pc-q35-2.7'>hvm</type<wbr>></div><div>    <loader readonly='yes' type='pflash'>/usr/share/edk2/<wbr>ovmf/OVMF_CODE.fd</loader></div><div>    <nvram>/var/lib/libvirt/qemu/n<wbr>vram/ubuntu16.04_VARS.fd</nvra<wbr>m></div><div>    <boot dev='hd'/></div><div>  </os></div><div>  <features></div><div>    <acpi/></div><div>    <apic/></div><div>    <kvm></div><div>      <hidden state='on'/></div><div>    </kvm></div><div>    <vmport state='off'/></div><div>  </features></div><div>  <cpu mode='custom' match='exact'></div><div>    <model fallback='allow'>Haswell-noTSX<wbr></model></div><div>  </cpu></div><div>  <clock offset='utc'></div><div>    <timer name='rtc' tickpolicy='catchup'/></div><div>    <timer name='pit' tickpolicy='delay'/></div><div>    <timer name='hpet' present='no'/></div><div>  </clock></div><div>  <on_poweroff>destroy</on_power<wbr>off></div><div>  <on_reboot>restart</on_reboot></div><div>  <on_crash>restart</on_crash></div><div>  <pm></div><div>    <suspend-to-mem enabled='no'/></div><div>    <suspend-to-disk enabled='no'/></div><div>  </pm></div><div>  <devices></div><div>    <emulator>/usr/bin/qemu-kvm</e<wbr>mulator></div><div>    <disk type='file' device='disk'></div><div>      <driver name='qemu' type='raw'/></div><div>      <source file='/var/lib/libvirt/images/<wbr>ubuntu.img'/></div><div>      <target dev='vda' bus='virtio'/></div><div>      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/></div><div>    </disk></div><div>    <disk type='file' device='cdrom'></div><div>      <driver name='qemu' type='raw'/></div><div>      <target dev='sda' bus='sata'/></div><div>      <readonly/></div><div>      <address type='drive' controller='0' bus='0' target='0' unit='0'/></div><div>    </disk></div><div>    <controller type='usb' index='0' model='ich9-ehci1'></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/></div><div>    </controller></div><div>    <controller type='usb' index='0' model='ich9-uhci1'></div><div>      <master startport='0'/></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/></div><div>    </controller></div><div>    <controller type='usb' index='0' model='ich9-uhci2'></div><div>      <master startport='2'/></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/></div><div>    </controller></div><div>    <controller type='usb' index='0' model='ich9-uhci3'></div><div>      <master startport='4'/></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/></div><div>    </controller></div><div>    <controller type='sata' index='0'></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/></div><div>    </controller></div><div>    <controller type='pci' index='0' model='pcie-root'/></div><div>    <controller type='pci' index='1' model='dmi-to-pci-bridge'></div><div>      <model name='i82801b11-bridge'/></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/></div><div>    </controller></div><div>    <controller type='pci' index='2' model='pci-bridge'></div><div>      <model name='pci-bridge'/></div><div>      <target chassisNr='2'/></div><div>      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/></div><div>    </controller></div></div></div></blockquote><div><br></div></div></div><div>Add a PCIe root port here:</div><div><br></div><div>    <controller type='pci' index='3' model='pcie-root-port'><br></div><div><div>      <address type='pci' domain='0x0' bus='0x0' slot='0x1c' function='0'/></div><div>    </controller></div></div><div><div class="h5"><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>    <controller type='virtio-serial' index='0'></div><div>      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/></div><div>    </controller></div><div>    <interface type='network'></div><div>      <mac address='52:54:00:11:00:b1'/></div><div>      <source network='default'/></div><div>      <model type='virtio'/></div><div>      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/></div><div>    </interface></div><div>    <serial type='pty'></div><div>      <target port='0'/></div><div>    </serial></div><div>    <console type='pty'></div><div>      <target type='serial' port='0'/></div><div>    </console></div><div>    <channel type='spicevmc'></div><div>      <target type='virtio' name='com.redhat.spice.0'/></div><div>      <address type='virtio-serial' controller='0' bus='0' port='1'/></div><div>    </channel></div><div>    <input type='mouse' bus='ps2'/></div><div>    <input type='keyboard' bus='ps2'/></div><div>    <graphics type='spice' autoport='yes'></div><div>      <listen type='address'/></div><div>      <image compression='off'/></div><div>    </graphics></div><div>    <sound model='ich6'></div><div>      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/></div><div>    </sound></div><div>    <video></div><div>      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/></div><div>      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/></div><div>    </video></div></div></div></blockquote><div><br></div></div></div><div>Hmm, you have emulated QXL graphics too, this alone could be the source of your problem.  Generally the xorg.conf needs a BusID to pick the right device in this sort of setup, but I can't vouch for GeForce working as secondary in a Linux guest.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>    <hostdev mode='subsystem' type='pci' managed='yes'></div><div>      <driver name='vfio'/></div><div>      <source></div><div>        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/></div><div>      </source></div><div>      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/></div><div>    </hostdev></div></div></div></blockquote><div><br></div></span><div>Chance the address to:</div><div><br></div><div><address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/><br></div><div><br></div><div>Bus = 3 puts it on the index = 3 pcie-root-port above</div><span class=""><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>    <hostdev mode='subsystem' type='pci' managed='yes'></div><div>      <driver name='vfio'/></div><div>      <source></div><div>        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/></div><div>      </source></div><div>      <address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/></div><div>    </hostdev></div><div>    <redirdev bus='usb' type='spicevmc'></div><div>      <address type='usb' bus='0' port='1'/></div><div>    </redirdev></div><div>    <redirdev bus='usb' type='spicevmc'></div><div>      <address type='usb' bus='0' port='2'/></div><div>    </redirdev></div><div>    <memballoon model='virtio'></div><div>      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/></div><div>    </memballoon></div><div>  </devices></div><div>  <qemu:commandline></div><div>    <qemu:arg value='-set'/></div><div>    <qemu:arg value='device.hostdev0.x-vga=o<wbr>n'/></div><div>  </qemu:commandline></div></div></div></blockquote><div><br></div></span><div>Kudos for good use of <qemu:arg>, but you're running an OVMF VM, so you don't want to use this.  Thanks,</div><div><br></div><div>Alex</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div></domain></div><div><br></div></div><div>Thanks,</div><div>Daniel</div></div>
<br>______________________________<wbr>_________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/vfio-users</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div>