Hi, I am testing Intel GVT-g on my notebook. Ubuntu 18.04 guests with the 4.16.7 kernel are working near flawlessly but I'm having trouble with a Windows 10 guest.
The Ubuntu guest has never experienced a crash but, on rare occasions when playing a video using VA-API decoder in mpv, ffplay or vlc in fullscreen, artifacts appear in the guest. This only happens when using the VA-API decoder. This is sporadic and it lasts for one frame, but happens sometimes. FreeRDP server is being used in the guest and FreeRDP in the host. The video is VP8 (encoded with vp8_vaapi) and Opus (libopus).
On this same guest, encoding with FFmpeg works properly with VA-API. A sample video is encoded with approximately 6x the speed in the guest, while the host is able to encode the same video with the same settings at 13x the speed. So the guest has around 45% the performance the host has encoding with VA-API. Using glmark2, the host scores around 1300 points while the guest scores between 260 and 422 (xfwm4 and mutter, respectively).
The commands used:
QEMU command: qemu-system-x86_64 -k pt-br -hda /var/lib/libvirt/images/BionicDesktop.qcow2 -enable-kvm -cpu host,kvm=off -smp cpus=2 -usb -device usb-tablet -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/123f09b0-4c00-11e8-a6ca-f3c21e47e012,rombar=0,x-igd-opregion=on -m 2048 -netdev bridge,id=hostnet0,br=virbr0 -soundhw hda -device e1000,netdev=hostnet0,id=net0,mac=aa:bb:cc:dd:ee:11,bus=pci.0,addr=0x8 -vga none
FFmpeg command: ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -i input.webm -vf format=nv12,hwupload -acodec aac -vcodec h264_vaapi output.mp4
The Ubuntu guest is nearly flawless, the only issue I've found being very minor. The first question is: are the guest results consistent with a correct setup of a Ubuntu guest using iGVT-g?
The Windows 10 guests is problematic. It's slow to setup as Windows tries to install a 2016 Intel HD Graphics driver which makes the Windows 10 guest unusable and causes problems to the host (including GPU hangs and this issue: https://i.imgur.com/eMtdDAG.png ). It must be set up without internet, have the updates paused and then download a utility from Microsoft's site to stop the download of that driver. Installing the driver 22.214.171.12460 is then possible. The Windows 10 guest works with full functionality for one boot after the graphics driver was installed, but after that it has many driver errors, making the screen freeze frequently and making its usage challenging. Windows 10 RDP is being used in the guest and the host is using FreeRDP to access it.
As it has limited functionality and stability issues, its performance couldn't be check, but it wouldn't be surprising if there was a 70% performance hit.
QEMU command: qemu-system-x86_64 -k pt-br -hda /var/lib/libvirt/images/redm.qcow2 -enable-kvm -cpu host,kvm=off -smp cpus=2 -usb -device usb-tablet -m 3072 -vga none -display none -netdev bridge,id=hostnet0,br=virbr0 -device e1000,netdev=hostnet0,id=net0,mac=aa:bb:cc:dd:ee:11,bus=pci.0,addr=0x8 -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/123f09b0-4c00-11e8-a6ca-f3c21e47e012,rombar=0,x-igd-opregion=on
The second question is: what should be done to set up a stable and functional Windows 10 guest using iGVT-g? The examples I have found were only for Linux guests.
The third question is related to the host. There are strange errors in the screen, where it may blink, lines may appear, the image may be distorted and/or external screens turn off and on sporadically when using iGVT-g. This only happens with the required options to use iGVT-g and sometimes dmesg show the following when this happens:
[drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
The command line used for boot in grub is:
linux /vmlinuz root=UUID=6b4ae5c0-c78c-49a6-a1ba-029192618a7a ro email@example.com/eth0,firstname.lastname@example.org/<mailto:email@example.com/eth0,firstname.lastname@example.org/> net.ifnames=0 debug i915.enable_gvt=1 btusb.enable_autosuspend=1 kvm.ignore_msrs=1 intel_iommu=on
btusb.enable_autosuspend=1 is unavoidable because of a unrelated bug, netconsole, debug and net.ifnames=0 are set to be able to get information in the case a problem, as the Windows 10 guest could hang the host.
The host is a Lenovo Ideapad 310-14ISK with a Intel Core i3-6100U and a Intel HD Graphics 520, has Xubuntu 18.04 installed with kernel version 4.16.7 with the required options set in the kernel according the GitHub page, 8 GB of RAM with 128 MB available to virtual GPUs, allowing one or two of them, depending if the one limited to 1024x768 or 1920x1200 is used. The graphical bugs appear to be related with mesa: if mesa has issues, then the host presents the problems. With a stable mesa (Ubuntu 18.04 has 18.0.0-rc5 now) apparently there are no issues.
The third and fourth questions are: what should be done to make those graphical corruptions don't happen in host? And should I be worried with them?
Could you please add support for Windows UEFI guests?
Or citing Jack Coulter:
"Intel potentially provides a (minimal, no GOP support) UEFI driver In
the GVT-g device's ROM BAR to set-up the OpRegion"
I use qemu 2.12 with dma-buffering, kernel 4.17.3 for kvmgt and I struggle
to attach my mdev vgpu to my Windows 8.1 guest using libvirt. (Host is
I tried to connect with virt-manager and "virt-viewer -a Win8.1".
-) with an additional qxl graphics card attached, I have no display output
at all (black screen)
-) with a cirrus card attached, I have a tiny screen in the bottom left in
virt-manager where I somehow managed to successfully install Intel driver
15.45. (recommended in Wiki)
-) The second screen, probably the vgpu, shown with virt-viewer is unusable
(I can't click something, no mouse, sometimes hovering only works.
-) No matter how I change monitor settings (primary display, resolution,
deactivate Cirrus in device manager) I can't produce a functioning vgpu
-) Sometimes my host freezes when I play with the Windows VM for setup,
while connecting virt-viewer or changing Windows screens.
Part of config:
<hostdev mode='subsystem' type='mdev' managed='no' model='vfio-pci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x09'
Tried with and without:
dmesg | grep firmware
[ 0.559100] i915 0000:00:02.0: Direct firmware load for
i915/gvt/vid_0x8086_did_0x1916_rid_0x07.golden_hw_state failed with error -2
[ 0.576039] [drm] Finished loading DMC firmware i915/skl_dmc_ver1_27.bin
[ 1.984293] platform regulatory.0: Direct firmware load for
regulatory.db failed with error -2
Dmesg output shows an issue with loading golden state firmware. Host is
But creating a vgpu is possible:
dmesg | grep -i mdev
[ 0.575292] i915 0000:00:02.0: MDEV: Registered
[ 4052.925958] vfio_mdev 30b480da-7f3f-486c-b056-c4de16796a12: MDEV:
group_id = 9
[ 4052.937350] vfio_mdev 30b480da-7f3f-486c-b056-c4de16796a12: MDEV:
[ 4063.756478] vfio_mdev 30b480da-7f3f-486c-b056-c4de16796a12: MDEV:
group_id = 9
What am I doing wrong? Advice is very much appreciated!