From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agqNx-00072k-CV for qemu-devel@nongnu.org; Fri, 18 Mar 2016 05:08:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agqNu-0002hL-27 for qemu-devel@nongnu.org; Fri, 18 Mar 2016 05:07:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agqNt-0002gu-QW for qemu-devel@nongnu.org; Fri, 18 Mar 2016 05:07:53 -0400 Date: Fri, 18 Mar 2016 10:07:50 +0100 From: Christophe Fergeau Message-ID: <20160318090750.GI6170@edamame.cdg.redhat.com> References: <1457955672-28758-1-git-send-email-cfergeau@redhat.com> <1458289073.6882.7.camel@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="L+ofChggJdETEG3Y" Content-Disposition: inline In-Reply-To: <1458289073.6882.7.camel@redhat.com> Subject: Re: [Qemu-devel] [PATCH] spice: Disallow use of gl + TCP port List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: =?iso-8859-1?Q?Marc-Andr=E9?= Lureau , qemu-devel@nongnu.org --L+ofChggJdETEG3Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > >=20 > > Signed-off-by: Christophe Fergeau >=20 > 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 incom= patible with -spice port/tls-port"); + exit(1); + } if (egl_rendernode_init() =3D=3D 0) { display_opengl =3D 1; } Christophe --L+ofChggJdETEG3Y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJW68VmAAoJEKnYwhQprGyCc1cP/3Z5eLjQYjxedhHR6FdnVvps NWGTyIjTuoQot+nTkayrbjoaZZQRwMaE9dIv7yHaanKKp/slXc4sOccsMdgBiHDp +RP1CrjXfMlseq/LUOK3pkII7Fh+VFhB5l46JPiOzYYAd2b/xodXEiU/IWKmrWES DcChmhAB7q/8ECslySiRbRFUec0x481e2cqNkWNIjd+bA7/Cp+w7cM8Wpii5dKPD RiV9G/oiv45A9CfPGEIMM9/xPqHynjJdoEqEGabEG99bE/Kb3iunCsyMPupbGEvv vJmOWTDKde8e8LciyS9ruMjKHVCiRfcBh3RA6yqc3xNIhTmeGL/5mTrEDPHQD8t9 OKVi/ZVsiyKOqtCosSlOz3MBzoiCyMJfQkmHG3N64tE4t1M6dHdNQsGqpqvkKc/a wJ6zY55cgOAzTgwh3up88hLlmJWzq1//uPMJSVcxXF7jyhc6MK4yWGDfVr+aqzqn UNIthYidK+47Sc0WDsrK/sySrVL47Cigmiwwlc9p+p9UBk+ztkjoHOLs+7jytVS2 alncZujlSEdNzy0pvwuQjfZXEOVj9gL7huTW4CzqopAjmRnoE6CsAMSX7sFEiyd9 g2ccc0/nnVj9dhoxDbbTny1DXuvPyKnMfs04H2Hw6mpK5fQcbbjAd8/3wgmro+N8 LJQLmu3Dbw7t1Eo1SQVx =0Lti -----END PGP SIGNATURE----- --L+ofChggJdETEG3Y--