KVM / QEMU Benchmark Valley GTX 970 with VGA passthrough on Debian Jessie host
Created with Kdenlive, Debian 8 Jessie
Unigine Valley Benchmark on Windows 7 Pro x64 in a KVM virtual Machine hosted on Debian 8.0 Jessie.
Using vfio VGA passthrough of a Nvidia GTX 970.
Without special patches or kernel mods.
Host:
Debian 8.0 Jessie 01.05.2015
Guest:
KVM Win7 Pro amd64 with Nvidia whql Driver 350.12 64bit
Hardware:
CPU i7 4820K socket 2011
Mainboard Gigabyte GA-X79-UP4 Rev. 1.0
Graphic card:
Host: Gigabyte GV-N75TOC-2GI
Guest: ASUS 4GB STRIX-GTX970-DC2OC
Patches:
none, Debian standard
Modifications:
/etc/default/grub
/etc/initramfs-tools/modules
DEVICE1="03:00.0" ( The GTX970 address in my system )
DEVICE2="03:00.1"
./vfio-bind 0000:$DEVICE1 0000:$DEVICE2
QEMU_PA_SAMPLES=6144 QEMU_AUDIO_DRV=pa \
qemu-system-x86_64 -enable-kvm -m 8192 -cpu host,kvm=off \
-smp 4,sockets=1,cores=4,threads=1 \
-machine q35,accel=kvm \
-soundhw hda \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=$DEVICE1,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=$DEVICE2,bus=root.1,addr=00.1 \
-vga none \
-bios /usr/share/seabios/bios.bin \
-device virtio-net-pci,netdev=user.0,mac=52:54:00:03:02:01 \
-netdev user,id=user.0 \
-drive file=win7-x64_system.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 \
-device virtio-blk-pci,scsi=off,addr=0x7,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-drive file=win7-games.qcow2,if=none,id=drive-virtio-disk1,format=qcow2 \
-device virtio-blk-pci,scsi=off,addr=0x8,drive=drive-virtio-disk1,id=virtio-disk1 \
-rtc base=localtime,driftfix=slew \
-device qxl \
-device usb-kbd \
-usbdevice host:1e7d:2d51 (USB Mouse)
This will start the virtual machine, and passthrugh the Nvidia GTX 970 graphic card to the guest.
The USB mouse will also passthrugh to the guest.
Disc and network are virtio devices.
You have to change the vfio-pci device IDs and the USBdevice IDs.
start it as root
Enjoy
Informations from:
https://bbs.archlinux.org/viewtopic.php?id=162768
now https://www.redhat.com/mailman/listinfo/vfio-users
https://wiki.debian.org/VGAPassthrough