[Spice-devel] [spice-server] doc: Add virgl documentation

Christophe Fergeau cfergeau at redhat.com
Thu Mar 24 17:08:43 UTC 2016


On Thu, Mar 24, 2016 at 12:59:04PM -0400, Cole Robinson wrote:
> I'm trying to test this stuff at the moment. Some comments and questions below
> (not an ACK or NACK, I see the patch was already pushed)
> 
> On 03/18/2016 12:12 PM, Christophe Fergeau wrote:
> > Document how to use virgl with QEMU/libvirt
> > 
> > virt-manager documentation still needs to be added.
> > ---
> >  docs/manual/manual.txt | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 55 insertions(+)
> > 
> > diff --git a/docs/manual/manual.txt b/docs/manual/manual.txt
> > index 2c0035a..a89a702 100644
> > --- a/docs/manual/manual.txt
> > +++ b/docs/manual/manual.txt
> > @@ -901,6 +901,61 @@ folder will show up in GNOME Files network places (or Nautilus). It
> >  can then be mounted and browsed in traditional applications thanks to
> >  `gvfs-fuse`.
> >  
> > +GL acceleration (virgl)
> > +=======================
> > +
> > +OpenGL acceleration is currently local only (it has to go through a Unix socket)
> > +and it needs guest support. It's currently limited to recent linux
> > +distributions (for example up to date Fedora 23).
> > +
> 
> The Fedora 23 reference isn't true and likely won't ever be true. The hard
> requirements are looking like
> 
> - not-yet-released qemu 2.6 (won't ever be in f23)
> - not-yet-released libvirt 1.3.3 (won't ever be in f23)
> - not-yet-released spice 1.13.1 (likely not in f23)
> - f23 era virgl and mesa bits

Ah, I'll have to improve the text I guess. By "It's currently limited",
I meant "Guest support is currently limited". (I tested this)

> Speaking of which, what's the timeline for spice 1.13.1 release?

High up on my TODO, so in the next days (but I've been saying that for a
while as usual /o\ )


> 
> > +Configuration
> > +-------------
> > +
> > +.Using libvirt
> > +
> > +You need to add a virtio-gpu video device to your virtual machine instead of QXL.
> > +[source,xml]
> > +<video>
> > +  <model type='virtio' heads='1'>
> > +    <acceleration accel3d='yes'/>
> > +  </model>
> > +</video>
> > +
> > +Then you need to enable OpenGL on your SPICE graphics node:
> > +[source,xml]
> > +<graphics type='spice' autoport='no'>
> > +  <gl enable='yes'/>
> > +</graphics>
> > +
> > +You don't need any port/address as they won't be usable with
> > +GL.
> > +
> 
> But this in fact won't work because we are dependent on spice+unix socket
> bits, right? Which isn't implemented for libvirt yet and likely won't
> committed for 1.3.3 either.
> 
> Even more, I feel like libvirt should reject a config like the above one
> because it's kinda meaningless... with default qemu.conf settings that's
> effectively listen=127.0.0.1 autoport=no which should raise an error since we
> have no port to specify.

This works together with virt-viewer -a even without spice+unix socket
in libvirt (I tested this with libvirt.git)

> 
> Slightly related question: what is the timeline for working gl passthrough
> with local host + VM + spice listen=127.0.0.1 ? Is it under heavy development
> or just waiting for just waiting for some new releases? If the latter, which
> packages will be required?

What do you expect out of it exactly ? To be able to do remote-viewer
spice://localhost:5900 and have virgl acceleration work? Or something
different?

> 
> > +.Using QEMU
> > +
> > +You need to add a virtio-gpu device on QEMU command line,
> > +as well as enable GL with SPICE. port/tls-port/addr arguments
> > +won't be used in this setup. You need to configure a Unix socket to
> > +connect to the VM display.
> > +
> > +[source,sh]
> > +-device virtio-vga,virgl=on -spice gl=on,unix,addr=/run/user/1000/spice.sock
> > +
> > +Connecting to the guest
> > +-----------------------
> > +
> > +Connecting to the guest when virgl is in use is slightly different
> > +than usual
> > +
> > +.If libvirt is being used
> > +
> > +[source,sh]
> > +client$ virt-viewer -a $vmname
> > +
> > +.If a Unix socket has been set on QEMU command line
> > +
> 
> Just a note, maybe someone should look into virt-viewer using -a automatically
> when it sees a unix socket in the XML that it can't directly access

Yes, would be nice (it could probably always use -a in the local case
actually).

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160324/2dc3c65c/attachment.sig>


More information about the Spice-devel mailing list