From patchwork Mon Mar 14 11:41:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christophe Fergeau X-Patchwork-Id: 597030 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 3qNz0s6mGgz9sdQ for ; Tue, 15 Mar 2016 00:21:33 +1100 (AEDT) Received: from localhost ([::1]:40949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afSR9-0008Sg-Ub for incoming@patchwork.ozlabs.org; Mon, 14 Mar 2016 09:21:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afSQt-0008BB-Hr for qemu-devel@nongnu.org; Mon, 14 Mar 2016 09:21:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afSQp-0006WI-LW for qemu-devel@nongnu.org; Mon, 14 Mar 2016 09:21:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afSQp-0006WB-Gb for qemu-devel@nongnu.org; Mon, 14 Mar 2016 09:21:11 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 6D6B28F50B; Mon, 14 Mar 2016 13:21:10 +0000 (UTC) Received: from edamame.cdg.redhat.com (ovpn-116-105.ams2.redhat.com [10.36.116.105]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2EDL8As017369 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 14 Mar 2016 09:21:09 -0400 Received: by edamame.cdg.redhat.com (Postfix, from userid 1000) id 17A1C149B11; Mon, 14 Mar 2016 12:41:21 +0100 (CET) From: Christophe Fergeau To: qemu-devel@nongnu.org Date: Mon, 14 Mar 2016 12:41:12 +0100 Message-Id: <1457955672-28758-1-git-send-email-cfergeau@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann Subject: [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 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 Reviewed-by: Marc-André Lureau --- ui/spice-core.c | 4 ++++ 1 file changed, 4 insertions(+) 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) #ifdef HAVE_SPICE_GL if (qemu_opt_get_bool(opts, "gl", 0)) { + if ((port != 0) || (tls_port != 0)) { + 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; }