From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afUck-00084g-77 for qemu-devel@nongnu.org; Mon, 14 Mar 2016 11:41:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afUch-0001mu-Hj for qemu-devel@nongnu.org; Mon, 14 Mar 2016 11:41:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afUch-0001mq-C0 for qemu-devel@nongnu.org; Mon, 14 Mar 2016 11:41:35 -0400 References: <1457955672-28758-1-git-send-email-cfergeau@redhat.com> From: Eric Blake Message-ID: <56E6DBAE.1060408@redhat.com> Date: Mon, 14 Mar 2016 09:41:34 -0600 MIME-Version: 1.0 In-Reply-To: <1457955672-28758-1-git-send-email-cfergeau@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tQw6PjsTqwDd2vc4lRVkCRh22Hx2kDPB1" 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: Christophe Fergeau , qemu-devel@nongnu.org Cc: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Gerd Hoffmann This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tQw6PjsTqwDd2vc4lRVkCRh22Hx2kDPB1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/14/2016 05:41 AM, 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 > --- > ui/spice-core.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/ui/spice-core.c b/ui/spice-core.c > index 7987a4e..94f3236 100644 > --- a/ui/spice-core.c > +++ b/ui/spice-core.c > @@ -844,6 +844,10 @@ void qemu_spice_init(void) > =20 > #ifdef HAVE_SPICE_GL > if (qemu_opt_get_bool(opts, "gl", 0)) { > + if ((port !=3D 0) || (tls_port !=3D 0)) { Overparenthesized; you could write: if (port || tls_port) { for the same effect with less typing. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --tQw6PjsTqwDd2vc4lRVkCRh22Hx2kDPB1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW5tuuAAoJEKeha0olJ0NqIOgH/2HuowMT4XHyBMm3x4QgiPdT oAdE0+e2D3QqcOcgCKddu9hjdZvsO3ZUgOnp3qTR9vt6X7tZaZMzhEOBGdqAzQFd nkgbbdTStY/QOSXZblrESk9O7p2B2I0WRaTxOdhWtLy+lnM0b6RE3Lh08ZlPz7rY 7wbbgtox8Hmu0/EuiiXQs2nRXMwO06etL+U90Gczsc5UvGEOuKZSrAUQyGSSzdgm FCWCivs9UI9XZ3+DMXBbHrSvFS5YhiffihGQoJLq9fudGew5b7IRT+Osx53eDWMp YBKGPHTT+ykywwjkcuI1WhSWE5D2cemzuSIp6tdIquzXusIG5UtI1p2nzk0UlPc= =3Cq5 -----END PGP SIGNATURE----- --tQw6PjsTqwDd2vc4lRVkCRh22Hx2kDPB1--