From patchwork Fri Mar 18 09:07:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Fergeau X-Patchwork-Id: 599369 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qRKBw0Kfrz9sCj for ; Fri, 18 Mar 2016 20:08:24 +1100 (AEDT) Received: from localhost ([::1]:42340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agqOM-0007W1-5Y for incoming@patchwork.ozlabs.org; Fri, 18 Mar 2016 05:08:22 -0400 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 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id ADFB264394; Fri, 18 Mar 2016 09:07:52 +0000 (UTC) Received: from edamame.cdg.redhat.com (ovpn-116-76.ams2.redhat.com [10.36.116.76]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2I97pBY031119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 18 Mar 2016 05:07:52 -0400 Received: by edamame.cdg.redhat.com (Postfix, from userid 1000) id 9ECA0143C52; Fri, 18 Mar 2016 10:07:50 +0100 (CET) Date: Fri, 18 Mar 2016 10:07:50 +0100 From: Christophe Fergeau To: Gerd Hoffmann 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-Disposition: inline In-Reply-To: <1458289073.6882.7.camel@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 18 Mar 2016 09:07:52 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Cc: =?iso-8859-1?Q?Marc-Andr=E9?= Lureau , qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH] spice: Disallow use of gl + TCP port X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Christophe 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; }