VirtIO-GPU 3D OpenGL Hardware Acceleration for VMs

Andrew Randrianasulu randrianasulu at
Wed Feb 17 07:10:32 UTC 2016


I tried to test virtGL on nouveau, and found few surprizes.

First, new quemu (commit commit a5af12871fd4601c44f08d9e49131e9ca13ef102, Merge 
remote-tracking branch 'remotes/sstabellini/tags/xen-2016-02-12' into staging) 
failed to link wih gcc 4.9 if I specified -march=i486, switching to -march=i686 
fixed this. I found this solution while search for specific error message:
error message in my case was "undefined reference to `__atomic_load_8' "

Second, I found my Xserver (1.12.4 patched with some patches from later 
Xservers, excluding most of glx stuff) was too old, for host side. Qemu just 
crashed at the moment guest loaded drm driver. Upgrading to 1.18.1 fixed this, 
but I assume anything from 1.13.0 should be minimally enough ? (due to 
GLX_ARB_create_context, GLX_ARB_create_context_profile stuff)

Next, I found even 1.18.1 by default builds without glamor support. There was 
configure swicth --enable-glamor, but it was, unlike dri3 stuff, off by 
default. Switching it on allowed guest to finally have 3d as in working 
glxinfo. glxgears still segfaulted. making /dev/shm user (ok, world-) writable 
fixed this. Found by strace-ing glxgears, and  launching glxgears from root, 
where  it worked. DRI3 stuff on host, where I also tried it, segfaulted 
similary, but I can live with DRI2/EXA here, especially because nouveau still 
have issues with glamor/modesetting, on both nv50, and nvc0, as I was told on 

I also tried few MESA debug environment variables in attttempt to get rid of 
artefacts inside VM, but  sadly they remained there. 

ESA_EXTENSION_MAX_YEAR=2001 ./x86_64-softmmu/qemu-system-x86_64 -cdrom /home/admin/slaxdvd-4.5.0-x64-test.iso -m 
512 -display sdl,gl=on -enable-kvm -soundhw es1370 -usb -vga virtio -usbdevice 
mouse -cpu host 

for example not resulted in any improvements.

MESA_GL_VERSION_OVERRIDE=3.0 and any version below (on host) resulted, like with 
old X server, in crashed qemu:

gl_version 0 - compat profile
WARNING: running without ARB robustness in place may crash
qemu-system-x86_64: Couldn't find current GLX or EGL context.

(note gl_version 0 thing - libepoxy bug? I use 1.3.1)

So, I assume right now host 3D driver must support OpenGL 3.1 or up?

Image links:

#nouveau log from 16-02-2016:

I hope it will help someone!

More information about the dri-devel mailing list