qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] 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; 3+ 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] 3+ messages in thread

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



----- Original Message -----
> From: "Saket Sinha" <saket.sinha89@gmail.com>
> To: dri-devel@lists.freedesktop.org, kvm@vger.kernel.org, qemu-devel@nongnu.org
> Cc: "Dave Airlie" <airlied@redhat.com>
> Sent: Monday, 15 February, 2016 12:34:18 PM
> Subject: VirtIO-GPU 3D OpenGL Hardware Acceleration for VMs
> 
> 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.

In qemu 2.5 only gtk3 frontend support 3D and must be enabled with gl=on

> - 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.

glxinfo in the guest should print virgl in the renderer string, that is enough
to know the stack is functioning.

if it shows llvmpipe it isn't.

Dave.

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

* Re: [Qemu-devel] VirtIO-GPU 3D OpenGL Hardware Acceleration for VMs
  2016-02-15  2:34 [Qemu-devel] VirtIO-GPU 3D OpenGL Hardware Acceleration for VMs Saket Sinha
  2016-02-15  2:47 ` David Airlie
@ 2016-03-24  7:41 ` Chih-Wei Huang
  1 sibling, 0 replies; 3+ messages in thread
From: Chih-Wei Huang @ 2016-03-24  7:41 UTC (permalink / raw)
  To: Saket Sinha; +Cc: virglrenderer-devel, kvm, ML dri-devel, qemu-devel

2016-02-15 10:34 GMT+08:00 Saket Sinha <saket.sinha89@gmail.com>:
>
> 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.

If you are interested to test Android on QEMU
with 3D hardware acceleration (via virgl, of course),
here is an ISO you can test:

http://www.fosshub.com/Android-x86.html/android-x86-6.0-20160318.iso

The command to run QEMU

qemu-kvm -smp 2 -m 2048 \
    -device virtio-gpu-pci,virgl -display gtk,gl=on \
    -d guest_errors \
    -serial mon:stdio \
    -cdrom android-x86-6.0-20160318.iso


It's built with kernel 4.4.4 and Mesa 11.2.0-rc3.
If you'd like to build the ISO yourself, please read
https://sourceforge.net/p/android-x86/wiki/Downloading%20and%20Building/

-- 
Chih-Wei
Android-x86 project
http://www.android-x86.org

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15  2:34 [Qemu-devel] VirtIO-GPU 3D OpenGL Hardware Acceleration for VMs 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).