|
# Driver on guest is 335.23, it's last driver that no break KVM and Hyper-V |
|
# Anyway this doesn't make much sense because I only run D3D9 games on that card and those not sensetive to old drivers |
|
|
|
# Optional removal of existing data in Nvidia VM |
|
# This VM used for testing so I drop all changes on ever reboot |
|
rm /win81-writable-nvidia.qcow2 |
|
rm /home/gameshdd-writable-nvidia.qcow2 |
|
cp /win81-writable-nvidia.qcow2.backup /win81-writable-nvidia.qcow2 |
|
cp /home/gameshdd-writable-nvidia.qcow2.backup /home/gameshdd-writable-nvidia.qcow2 |
|
|
|
taskset -c 1,3,5,7 qemu-system-x86_64 \ |
|
-name "win81_nvidia" \ |
|
\ |
|
-bios /usr/share/seabios/bios.bin \ |
|
-enable-kvm \ |
|
\ |
|
-vga none \ |
|
-device qxl \ |
|
\ |
|
-usb \ |
|
-device usb-mouse \ |
|
\ |
|
-m 7G \ |
|
-mem-path /dev/hugepages \ |
|
\ |
|
-no-hpet \ |
|
-cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_time,hv_vapic \ |
|
-smp 4,sockets=1,cores=2,threads=2 \ |
|
\ |
|
-soundhw hda \ |
|
\ |
|
-M q35 \ |
|
\ |
|
-drive file=/win81-writable-nvidia.qcow2,id=disk1,format=qcow2,if=virtio \ |
|
-drive file=/home/gameshdd-writable-nvidia.qcow2,format=qcow2,if=virtio \ |
|
\ |
|
-device ioh3420,bus=pcie.0,addr=1c.0,port=1,chassis=1,id=root.1 \ |
|
-device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \ |
|
\ |
|
-net nic,model=virtio \ |
|
-net bridge,br=br0 \ |
|
\ |
|
-serial stdio \ |
|
-nographic |
|
|
|
# Nvidia reset. Boot to reset GPU between usages to avoid host freeze. |
|
# Also make it set fans to minimum so it's not so loud when VM not used. |
|
timeout 10 qemu-system-x86_64 \ |
|
-enable-kvm \ |
|
-M q35 \ |
|
-m 512 \ |
|
-cpu host \ |
|
-rtc base=localtime \ |
|
-smp 4,sockets=1,cores=4,threads=1 \ |
|
-bios /usr/share/qemu/bios.bin \ |
|
-boot menu=off,strict=on -vga none -nographic \ |
|
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \ |
|
-device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on |
|
|
|
|
|
# Everything else only needed if i915 VGA arbitration not used |
|
# I don't really use it because |
|
########################################## |
|
# kvm=off required to bypass Nvidia driver virtualization limitations |
|
# Hyper-V hv_ options can't be used for same reason |
|
|
|
# The way I got consistent VM startup: |
|
- First boot up "win81_nvidia_reset" configuration with livecd that use Nouveau. |
|
- Once monitor activated shutdown livecd or just kill QEMU. |
|
Display will remain with frozen image on it (or shutdown black screen, but active). |
|
- Now boot "win81_nvidia" configuration. |
|
- In "Device Manager" disable and enable device. |
|
Now monitor must lost connection and go idle / switch to different active port. |
|
- Disable and enable device once again. It's should be working now. |
|
|
|
qemu-system-x86_64 \ |
|
-boot menu=on \ |
|
-bios /usr/share/seabios/bios.bin \ |
|
-enable-kvm \ |
|
\ |
|
-vga none \ |
|
\ |
|
-m 1G \ |
|
\ |
|
-cpu host \ |
|
-smp 1,sockets=1,cores=1,threads=1 \ |
|
\ |
|
-name "win81_nvidia_reset" \ |
|
-M q35 \ |
|
\ |
|
-device ioh3420,bus=pcie.0,addr=1c.0,port=1,chassis=1,id=root.1 \ |
|
-device vfio-pci,host=02:00.0,bus=root.1,addr=00.0,x-vga=on \ |
|
\ |
|
-drive file=/opt/kubuntu-15.04-desktop-amd64.iso,id=isocd \ |
|
-device ide-cd,bus=ide.1,drive=isocd |
Hi,
What versions of Xorg/Mesa/Intel DDX are you using?
I'm on Debian jessie, running kernel v4.7.8-1~bpo8+1, using xorg-server v1.16.4-1 with backported xserver-xorg-video-intel v2.99.917+git20161105-1 and backported Mesa v12.0.4-2. I'm using Haswell graphics for desktop (with DRI3 enabled) and PRIME offloading games to Radeon HD7770. Works great, until I try unbinding the HD7770 from the radeon driver while Xorg is running... That's when the kernel just freezes dead :) Apparently you've managed to unbind your radeon while Xorg is running?