dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* RE: VirtIO-GPU 3D OpenGL Hardware Acceleration for VMs
@ 2016-02-17  7:10 Andrew Randrianasulu
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Randrianasulu @ 2016-02-17  7:10 UTC (permalink / raw)
  To: dri-devel, Saket, Sinha, saket.sinha89

Hello!

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: 
http://stackoverflow.com/questions/23065501/stdatomicunsiged-long-long-undefined-reference-to-atomic-fetch-add-8
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 
#nouveau.

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:
http://ibin.co/2XC09wl34cuT
http://ibin.co/2XCIj5vhR9l8

#nouveau log from 16-02-2016: 
https://people.freedesktop.org/~cbrill/dri-log/index.php?channel=nouveau&date=2016-02-16

I hope it will help someone!
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread
* VirtIO-GPU 3D OpenGL Hardware Acceleration for VMs
@ 2016-02-15  2:34 Saket Sinha
  2016-02-15  2:47 ` David Airlie
  2016-03-24  7:41 ` Chih-Wei Huang
  0 siblings, 2 replies; 4+ messages in thread
From: Saket Sinha @ 2016-02-15  2:34 UTC (permalink / raw)
  To: dri-devel, kvm, qemu-devel; +Cc: Dave Airlie

Hi,

It seems upstream Linux/Gallium3D/Mesa/Qemu/KVM has recently gained
virtualized support for 3D/OpenGL hardware acceleration in VMs,
allowing using the GPU of the host in VMs.

As per my understanding the following components are needed -

- Linux 4.4 kernel includes the DRM driver for VirtIO-GPU 3D
acceleration (needed in the VM).
- Qemu 2.5  includes the VirtIO-GPU 3D mode support.
- Gallium3D VirGL driver is included in Mesa git (needed in the VM,
supports up to OpenGL 3.3 atm).
- On the host *any* OpenGL driver (for the host GPU obviously), no
special requirements there.

In order to do test this, if I can be guided as to what are the right
applications to test the entire Graphic stack on a QEMU-KVM Virtual
machine, I shall be grateful.






Regards,
Saket Sinha

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-24  7:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-17  7:10 VirtIO-GPU 3D OpenGL Hardware Acceleration for VMs Andrew Randrianasulu
  -- strict thread matches above, loose matches on Subject: below --
2016-02-15  2:34 Saket Sinha
2016-02-15  2:47 ` David Airlie
2016-03-24  7:41 ` Chih-Wei Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).