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

Cole Robinson crobinso at redhat.com
Thu Mar 24 17:26:17 UTC 2016


On 03/24/2016 01:08 PM, Christophe Fergeau wrote:
> 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)
> 

Ah I see. So F23 guest has all the bits it needs, gotchya

>> 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\ )
> 

Sounds good.

> 
>>
>>> +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)
> 

Oh interesting. I just tried it. That basically means spice isn't listening
anywhere, and can only be accessed via virDomainOpenGraphics/add_client. I
didn't realize that was an option! Things make more sense now :)

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

Basically the remote-viewer case you describe, since that's the default
virt-manager (and libvirt) config for spice setups. Gerd seemed to indicate
that it will work in the near term, in his response to your qemu patch. Isn't
that what the dmabuf stuff is all about? Or are we always going to have to use
the OpenGraphics/add_client method to get GL?

Please give me the clue-stick if I'm horribly confused :)

- Cole


More information about the Spice-devel mailing list