Hi, after following the steps from your tutorial(with some adaptation as I’m not on ubuntu) I did not manage to successfully boot my virtual machine.
I progressed a little bit : I can now use my gpu on my host and binding/unbinding the vfio driver.
the verification step after the bumblebee installation :
cat /proc/acpi/bbswitch
0000:01:00.0 OFF
optirun cat /proc/acpi/bbswitch
0000:01:00.0 ON
optirun nvidia-smi
Mon Feb 12 14:24:39 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.25 Driver Version: 390.25 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 106... Off | 00000000:01:00.0 Off | N/A |
| N/A 42C P0 22W / N/A | 7MiB / 6078MiB | 2% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1494 G /usr/lib/xorg-server/Xorg 5MiB |
+-----------------------------------------------------------------------------+
here is the script I use to launch my virtual machine
echo "[*] binding dGPU to vfio driver"
echo "10de 1c20" > "/sys/bus/pci/drivers/vfio-pci/new_id"
echo "[*] enabling huge pages"
echo 5000 |tee /proc/sys/vm/nr_hugepages
echo "[*] launching VM"
qemu-system-x86_64 \
-name "Windows10-QEMU" \
-machine type=q35,accel=kvm \
-global ICH9-LPC.disable_s3=1 \
-global ICH9-LPC.disable_s4=1 \
-cpu host,kvm=off,hv_vapic,hv_relaxed,hv_spinlocks=0x1fff,hv_time,hv_vendor_id=12alphanum \
-smp 8,sockets=1,cores=4,threads=2 \
-m 8G \
-mem-path /dev/hugepages \
-mem-prealloc \
-balloon none \
-rtc clock=host,base=localtime \
-vnc 127.0.0.1:1 \
-device qxl,bus=pcie.0,addr=1c.2 \
-vga none \
-nographic \
-serial none \
-parallel none \
-k en-us \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,x-pci-sub-device-id=1969,x-pci-sub-vendor-id=4136,multifunction=on,romfile=vbios.rom,x-vga=true \
-drive if=pflash,format=raw,readonly=on,file=/usr/share/ovmf/ovmf_code_x64.bin \
-drive if=pflash,format=raw,file=WIN_VARS.fd \
-boot menu=on \
-boot order=c \
-drive id=disk0,if=virtio,cache=none,format=raw,file=win10-gaming.img \
-drive file=Win10_1709_French_x64.iso,media=cdrom,index=1 \
-drive file=virtio-win.iso,media=cdrom,index=2 \
-net nic -net user,smb=/shared/
the vm boot without any errors, no logs are created. But when I connect to the host using vncviewer I always get the message “guest has not initialized the display (yet)”.
One fact is that I did not manage to dump my vbios (input/output error). i’m using a vbios from a msi gtx1060 mobile, the device vendor and system id are the same than on my dGPU, but the subsystem ID aren’t the same. I did not manage to find the vbios of the gtx1060 mobile with dell subsystem :
optirun lspci -nnk -s 01:00.0
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile 3GB] [10de:1c20] (rev a1)
Subsystem: Dell GP106M [GeForce GTX 1060 Mobile] [1028:0802]
Kernel driver in use: nvidia
Kernel modules: nouveau, nvidia_drm, nvidia
I have no idea what I can try now… I really want to make this passthrough work. I have no idea how to debug this as qemu don’t show me any errors or warning. Any help is welcome