Problem passing through Nvidia GTX 970 [SOLVED]


jude

Recommended Posts

I have successfully had AMD GPU's passed through but I am now trying to get a MSI GTX 970 to pass through on a Win8.1 guest.

 

The Win8.1 guest starts up fine and I am able to download and install the nvidia drivers for the card. Upon restart of the VM the GPU shows as not working in the device manager and the Windows guest is using the microsoft driver to run the graphics.

 

I have done some reading and it seems that Nvidia checks the guest to see if it is running as a virtual machine and then disables much of the cards functions. I am not sure what to do at this point. Does anyone have a fix for this?

 

here is my current xml

 

<domain type='kvm' id='2' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>windows81</name>
  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa9c</uuid>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>3906252</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>
    <loader>/usr/share/qemu/bios-256k.bin</loader>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='yes'/>
    <timer name='hypervclock' present='yes'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native'/>
      <source file='/mnt/cache/Image Media/Win8.1ProN.qcow2'/>
      <backingStore/>
      <target dev='hda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/Images/en_windows_8_1_n_x64_dvd_2707896.iso'/>
      <backingStore/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/Images/virtio-win-0.1-94.iso'/>
      <backingStore/>
      <target dev='hdd' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='sata0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb0'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb0'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:46:29:be'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </interface>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1,bus=pcie.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:12.0,bus=root.1,addr=00.1'/>
  </qemu:commandline>
</domain>

Link to comment

I have successfully had AMD GPU's passed through but I am now trying to get a MSI GTX 970 to pass through on a Win8.1 guest.

 

The Win8.1 guest starts up fine and I am able to download and install the nvidia drivers for the card. Upon restart of the VM the GPU shows as not working in the device manager and the Windows guest is using the microsoft driver to run the graphics.

 

I have done some reading and it seems that Nvidia checks the guest to see if it is running as a virtual machine and then disables much of the cards functions. I am not sure what to do at this point. Does anyone have a fix for this?

 

here is my current xml

 

<domain type='kvm' id='2' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>windows81</name>
  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa9c</uuid>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>3906252</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>
    <loader>/usr/share/qemu/bios-256k.bin</loader>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='yes'/>
    <timer name='hypervclock' present='yes'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native'/>
      <source file='/mnt/cache/Image Media/Win8.1ProN.qcow2'/>
      <backingStore/>
      <target dev='hda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/Images/en_windows_8_1_n_x64_dvd_2707896.iso'/>
      <backingStore/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/Images/virtio-win-0.1-94.iso'/>
      <backingStore/>
      <target dev='hdd' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='sata0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb0'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb0'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:46:29:be'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </interface>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1,bus=pcie.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:12.0,bus=root.1,addr=00.1'/>
  </qemu:commandline>
</domain>

 

Take out this section of your XML:

 

    <hyperv>

      <relaxed state='on'/>

      <vapic state='on'/>

      <spinlocks state='on' retries='8191'/>

    </hyperv>

 

nVIDIA uses your use of viridian extensions (viridian = hyper-v) to detect that the card is running in a virtualized state.  They then issue a Code 43 error to Device Manager (typically).  Therefore you cannot use hyperv extensions in KVM guest VMs where you're passing through a nVIDIA GPU.

 

I can tell you from personal experience, if this is a workstation VM / gaming machine, using hyper-v extensions doesn't seem to affect that much at all for me.  At a technical level, they are "better" to use for windows guests than not, but since there is no workaround and nVIDIA isn't going to "fix" this so-called "bug" (hmmph), there is no other way to get the GPU to work correctly without removing that section.

Link to comment

I have successfully had AMD GPU's passed through but I am now trying to get a MSI GTX 970 to pass through on a Win8.1 guest.

 

The Win8.1 guest starts up fine and I am able to download and install the nvidia drivers for the card. Upon restart of the VM the GPU shows as not working in the device manager and the Windows guest is using the microsoft driver to run the graphics.

 

I have done some reading and it seems that Nvidia checks the guest to see if it is running as a virtual machine and then disables much of the cards functions. I am not sure what to do at this point. Does anyone have a fix for this?

 

here is my current xml

 

<domain type='kvm' id='2' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>windows81</name>
  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa9c</uuid>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>3906252</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>
    <loader>/usr/share/qemu/bios-256k.bin</loader>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='yes'/>
    <timer name='hypervclock' present='yes'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native'/>
      <source file='/mnt/cache/Image Media/Win8.1ProN.qcow2'/>
      <backingStore/>
      <target dev='hda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/Images/en_windows_8_1_n_x64_dvd_2707896.iso'/>
      <backingStore/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/Images/virtio-win-0.1-94.iso'/>
      <backingStore/>
      <target dev='hdd' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='sata0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb0'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb0'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:46:29:be'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </interface>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1,bus=pcie.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:12.0,bus=root.1,addr=00.1'/>
  </qemu:commandline>
</domain>

 

Hi JonP thanks for responding so quickly. I did what you said reinstalled the drivers and nothing seemed to change. Still getting the code 43 error in the Device Manager when looking at the GPU.

 

I did a little more research http://www.linux-kvm.org/wiki/images/b/b3/01x09b-VFIOandYou-small.pdf

and then added the following to the xml file

 

<domain type='kvm'>
...
<features>
<kvm>
<hidden state='on'/>
</kvm>
...
</features>
</domain>

 

I reinstalled the drivers and again still had the same code 43 on the GPU.

 

As a last ditch effort I removed

 

<timer name='hypervclock' present='yes'/>

 

from under

 

<clock offset='localtime'>

 

Reinstalled the drivers and now the card is working and so is the audio. Not sure which of the combo worked but it does seem to be functioning.

 

xml

 

<domain type='kvm' id='5' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>windows81nvidia</name>
  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa8b</uuid>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>3906252</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>
    <loader>/usr/share/qemu/bios-256k.bin</loader>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    <kvm>
      <hidden state='on'/>
    </kvm>
  </features>
  <cpu mode='host-passthrough'>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='yes'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native'/>
      <source file='/mnt/cache/Image Media/Win8.1ProN.qcow2'/>
      <backingStore/>
      <target dev='hda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/Images/en_windows_8_1_n_x64_dvd_2707896.iso'/>
      <backingStore/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/Images/virtio-win-0.1-94.iso'/>
      <backingStore/>
      <target dev='hdd' bus='sata'/>
      <readonly/>
      <alias name='sata0-0-3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='sata0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb0'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb0'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb0'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:46:29:be'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </interface>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1,bus=pcie.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:12.0,bus=root.1,addr=00.1'/>
  </qemu:commandline>
</domain>

 

I have 5 days to trial the card before I either return or keep it. The primary purpose of the card is for gaming and the secondary is for playing media through plex.

 

As I can still return the card do you still think that the performance hit will be negligible or should I box it up and go back to the AMD Radeon series or cards?

Link to comment

Tough question to answer. I personally like nVIDIA for gsync tech and the game-specific optimizations they get. I do not like their approach to Linux and this seemingly blatant attempt to prevent the use of VMs with PCI device pass through. The fact is that on KVM, I've had better success (even with these issues) with nVIDIA than AMD for windows guests.

 

NVIDIA cards also tend to work better for passing through HDMI audio.

 

If I were you, I'd stick with nVIDIA right now.  And as for performance, I'd suggest you pound in some testing to see for yourself, but gaming performance isn't like to be impacted by the removal of the hyper v settings.

Link to comment

I really appreciate your feedback. I love the specs on the new NVIDIA cards (low power consumption, high frame rates) its just hard to understand why they are so against VM use. I would figure it is a growth market for them and at the very least a market in which they can remain viable and competitive.

 

I am going to install FarCry4 and see if I can put the card through its paces over the next few days.

 

I had some trouble with the audio. Everything would install fine and I was able to play 5.1 and 7.1 audio tracks through Plex. Within a short period of time the audio would stutter and breakup followed by video stalls and sometimes OS crashes.

It turned out to be the Windows inbuilt sound settings which allow you to choose how many speakers are connected to the sound device. The initial default is two channel. I had changed it to 5.1/7.1 and this caused a conflict between the GTX 970 NVIDIA HD audio driver and the windows driver. Leaving it at the default allowed correct passthrough of the audio stream that was then decoded properly by my Denon receiver. No more stuttering or breakups.

 

There's always something........

 

Thanks

Link to comment

I really appreciate your feedback. I love the specs on the new NVIDIA cards (low power consumption, high frame rates) its just hard to understand why they are so against VM use. I would figure it is a growth market for them and at the very least a market in which they can remain viable and competitive.

 

I am going to install FarCry4 and see if I can put the card through its paces over the next few days.

 

I had some trouble with the audio. Everything would install fine and I was able to play 5.1 and 7.1 audio tracks through Plex. Within a short period of time the audio would stutter and breakup followed by video stalls and sometimes OS crashes.

It turned out to be the Windows inbuilt sound settings which allow you to choose how many speakers are connected to the sound device. The initial default is two channel. I had changed it to 5.1/7.1 and this caused a conflict between the GTX 970 NVIDIA HD audio driver and the windows driver. Leaving it at the default allowed correct passthrough of the audio stream that was then decoded properly by my Denon receiver. No more stuttering or breakups.

 

There's always something........

 

Thanks

Far cry 4 graphics are AMAZING and have some nvidia specific optimizations too.  My GTX 780 ROCKS for this game.  I also have an Asus 4k gsync monitor that just makes all games play like blu ray smooth. I actually could get 4k res on my card with far cry 3 and good framerate.  Far cry 4 I can't push to 4k with my current gpu though. Need to either get SLI working or get a bigger 9xx series card at some point.

 

Either way, my testing with 3dmark gave me scores within 3% of bare metal performance.

Link to comment

Yeah I am looking forward to firing up FarCry4 it will be connected to a 1080P 52 inch TV so no 4k for me (yet).

 

I just need to increase my cache size as currently I have a single 120G SSD. Will have to get on that ASAP. I have an additional 120G SSD or a 240G SSD as options. With BTRFS cache pooling is there a significant advantage to going with the two 120G SSD's or should I just go for the larger single SSD? (Off topic)

 

 

Link to comment

Yeah I am looking forward to firing up FarCry4 it will be connected to a 1080P 52 inch TV so no 4k for me (yet).

 

I just need to increase my cache size as currently I have a single 120G SSD. Will have to get on that ASAP. I have an additional 120G SSD or a 240G SSD as options. With BTRFS cache pooling is there a significant advantage to going with the two 120G SSD's or should I just go for the larger single SSD? (Off topic)

 

 

Cache pooling doesn't really yield any gains on performance at all.  Its protection. If you do 2 x 128GB devices, you will have a RAID 1 pool that can only store up to 128.  If you don't care about that kind of protection, opt for a single larger device.

Link to comment
  • 3 weeks later...

Just thought I would give this thread an update. The GTX 970 works great and gaming with it is pretty fantastic. Very smooth gameplay on FarCry4 with ultra settings. I love having unRaid and a powerful Win8.1 gaming machine all running off the same hardware. Very cool. Thanks to all who have made this possible.

Link to comment
  • 2 years later...
On 06/01/2015 at 5:21 AM, jonp said:

 

Take out this section of your XML:

 

    <hyperv>

      <relaxed state='on'/>

      <vapic state='on'/>

      <spinlocks state='on' retries='8191'/>

    </hyperv>

 

nVIDIA uses your use of viridian extensions (viridian = hyper-v) to detect that the card is running in a virtualized state.  They then issue a Code 43 error to Device Manager (typically).  Therefore you cannot use hyperv extensions in KVM guest VMs where you're passing through a nVIDIA GPU.

 

I can tell you from personal experience, if this is a workstation VM / gaming machine, using hyper-v extensions doesn't seem to affect that much at all for me.  At a technical level, they are "better" to use for windows guests than not, but since there is no workaround and nVIDIA isn't going to "fix" this so-called "bug" (hmmph), there is no other way to get the GPU to work correctly without removing that section.

@jonp

 

Hi Jon,

 

Is this still the case? I have a machine with Hyper-V turned on. Both GPUs (GTX 1080) being passed to the one VM appear to be running fine. As a test I removed the above hyper section from the XML and both GPUs posted a code 43 without the Hyper-V extensions?

Link to comment
  • 2 weeks later...

Same here,

 

passing trough a Gtx 1080 with a dumped vBios. Works very well.

hyperv enabled. 

<hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>

 

No issues until now. Is it like it should be?

 

Edited by feraay
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.