A more reliable setup uses the OVMF firmware. After that, I keep getting Unable to power on device, stuck in D3. I’m only able to run the passthrough VM once per reboot. The above script works, but not consistently. And I finally get the score right: Getting some frags in the VM at 200 fps About OVMF The result is virtually indistinguishable from bare metal. To pass through my USB keyboard, I use -usb -device usb-host,vendorid=0x04d9,productid=0x0192. You might also want to pass through keyboard and mouse to the VM.The approach with driver_override and modprobe has been more reliable for me. I struggled to get manual bind and unbind working, as described by Greg Kroah-Hartman.After qemu terminates, you will want the script to unbind vfio-pci and rebind the host device drivers.
x-vga=on seems to be required if you’re using SeaBIOS (as we are above).
#QEMU VGA VMWARE BLACK DRIVERS#
#QEMU VGA VMWARE BLACK DRIVER#
The para-virtualized virtio-gpu driver scales up to 4096x2160 and can adjust resolution to match the QEMU window. The moment you unbind amdgpu, the host becomes headless. qemu-system-x8664 \-enable-kvm \-smp 4 \-m 8G \-vga virtio \ ubu.qcow2 This is where things start to get interesting. Qemu-system-x86_64 \ -enable-kvm \ -smp 4 \ -m 8G \ -nographic \ -vga none \ -device vfio-pci,host = $GPU,x-vga =on \ -device vfio-pci,host = $GPU_AUDIO \ #!/bin/sh GPU = "0000:0d:00.0" GPU_AUDIO = "0000:0d:00.1" echo " $GPU " > /sys/bus/pci/drivers/amdgpu/unbindĮcho " $GPU_AUDIO " > /sys/bus/pci/drivers/snd_hda_intel/unbindĮcho vfio-pci > /sys/bus/pci/devices/ $GPU/driver_overrideĮcho vfio-pci > /sys/bus/pci/devices/ $GPU_AUDIO/driver_override