From patchwork Thu Mar 24 07:56:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 8658691 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 091909F3D1 for ; Thu, 24 Mar 2016 07:56:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 72DE3202E9 for ; Thu, 24 Mar 2016 07:56:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C06572038A for ; Thu, 24 Mar 2016 07:56:40 +0000 (UTC) Received: from localhost ([::1]:48227 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj08G-0005iY-9Z for patchwork-qemu-devel@patchwork.kernel.org; Thu, 24 Mar 2016 03:56:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj084-0005hF-Up for qemu-devel@nongnu.org; Thu, 24 Mar 2016 03:56:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj081-0002cw-Gr for qemu-devel@nongnu.org; Thu, 24 Mar 2016 03:56:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj081-0002ar-BX for qemu-devel@nongnu.org; Thu, 24 Mar 2016 03:56:25 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4F43D63146 for ; Thu, 24 Mar 2016 07:56:23 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-29.ams2.redhat.com [10.36.116.29]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2O7uLLe006065; Thu, 24 Mar 2016 03:56:22 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id B253881B8E; Thu, 24 Mar 2016 08:56:20 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 24 Mar 2016 08:56:18 +0100 Message-Id: <1458806178-31096-4-git-send-email-kraxel@redhat.com> In-Reply-To: <1458806178-31096-1-git-send-email-kraxel@redhat.com> References: <1458806178-31096-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 24 Mar 2016 07:56:23 +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: Gerd Hoffmann , Christophe Fergeau Subject: [Qemu-devel] [PULL 3/3] 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Christophe Fergeau 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 Message-id: 1457955672-28758-1-git-send-email-cfergeau@redhat.com [ applied codestyle fix: break long line ] Signed-off-by: Gerd Hoffmann --- ui/spice-core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/spice-core.c b/ui/spice-core.c index e117925..61db3c1 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -828,6 +828,11 @@ 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; }