On Fri, Mar 18, 2016 at 09:17:53AM +0100, Gerd Hoffmann wrote: > On Mo, 2016-03-14 at 12:41 +0100, Christophe Fergeau wrote: > > Currently, virgl support has to go through a local unix socket, trying > > to connect to a VM using -spice gl through spice://localhost:5900 will > > only result in a black screen. > > This commit errors out when the user tries to start a VM with both GL > > support and a port/tls-port set. > > This would fit better in spice-server, but currently QEMU does not call > > into spice-server when parsing 'gl' on its command line, so we have to > > do this check in QEMU instead. > > > > Signed-off-by: Christophe Fergeau > > Picked up for ui patch queue. Great thanks! Fwiw, I've changed it locally to address Eric's comments, but did not send it as v2 since a discussion was ongoing, here is what it looks in my local clone now (but I'm fine with either version): commit c0e10fb17a45a9da14d068a58af3a00e78f82403 Author: Christophe Fergeau Date: Mon Mar 14 12:37:50 2016 +0100 spice: Disallow use of gl + TCP port Currently, virgl support has to go through a local unix socket, trying to connect to a VM using -spice gl through spice://localhost:5900 will only result in a black screen. This commit errors out when the user tries to start a VM with both GL support and a port/tls-port set. This would fit better in spice-server, but currently QEMU does not call into spice-server when parsing 'gl' on its command line, so we have to do this check in QEMU instead. Signed-off-by: Christophe Fergeau diff --git a/ui/spice-core.c b/ui/spice-core.c index 7987a4e..83950fe 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -844,6 +844,10 @@ void qemu_spice_init(void) #ifdef HAVE_SPICE_GL if (qemu_opt_get_bool(opts, "gl", 0)) { + if (port || tls_port) { + error_report("SPICE GL support is local-only for now and incompatible with -spice port/tls-port"); + exit(1); + } if (egl_rendernode_init() == 0) { display_opengl = 1; } Christophe