From patchwork Fri Aug 23 16:21:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 172116 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp886040ily; Fri, 23 Aug 2019 09:22:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyp6U81tk0xOoi5hCX+n59sG3tVG1ljp6n9lu7zWebMYt1/qLz6UJFr+YusUkuTy0qb55kT X-Received: by 2002:ac8:7314:: with SMTP id x20mr5606793qto.239.1566577350452; Fri, 23 Aug 2019 09:22:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566577350; cv=none; d=google.com; s=arc-20160816; b=we6wYIs8VxdkjQ+2BcAx/9RF4elyCWL75eRkl0yfzJsZy5G9VRBJ6SbsuRJdYIrqKX DiHiq9VnXRXKGghDYeT20X3xPAGGIMLOkOtqZMl+9zDFXx42U8aaQiYsLL7M3y2R+tXh h1bh8J4TdMMBtwaLjBK45496fOn0IP7Im3m769vy8yPVNd26GzX1uCBoJeBf7iTtV/te YO7mOYKc7onvuadLs3ZcFZ5a2pxH4jNb3Kf8GfFiqdoTfjp2gdtmWtBJNuOLSOh2Mk4b dOKz3QxVTvgyWHASRtYTJZFQyDRZI4lqXppiUhNhoRwdgfpgbp0GMRs9GWN1Oo/dZxBy Cytg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=QDtDM6fTz95wXv3XUI2/+5jRWctaTqsxW10wafluDuw=; b=uVzSGbVVqHU165zwuXAQVFX3QXPHf7Mg2cGCbjvmwekOhKdOPiTvoStg6bOgrVo6z/ QJQUN2DOmGEBrTqbWOYEfGpM3/5NGZ/JkY4bbiySgp6kV0xekosrOlqQeWPWBtecMJju 7dlIploa6x3lz/wGlPXmqS28kn/aTyVtlVTrOh+tFYf+pPsaWzk2IBWTlW2lEbTmipxZ cyqgvRfmkMGj+61y/HgO2Bi7IfQiqYbVqVGupG5RlIApfXYdOGRTiDusrGL60GBTyizS q1Y5m3kNWYX4Pfp2JRAenHhGScrgKUkeQAXkTZywi99a7qx8zzHYOfn3HD8ZbWdMLgwn 0FJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id j4si2140585qkg.224.2019.08.23.09.22.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Aug 2019 09:22:30 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 02357A35FE5; Fri, 23 Aug 2019 16:22:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D2ADA60623; Fri, 23 Aug 2019 16:22:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 97F5C18034E0; Fri, 23 Aug 2019 16:22:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7NGM8Jw006032 for ; Fri, 23 Aug 2019 12:22:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id CE80A60A9F; Fri, 23 Aug 2019 16:22:08 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-122-169.rdu2.redhat.com [10.10.122.169]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5CA5660872; Fri, 23 Aug 2019 16:22:08 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 23 Aug 2019 12:21:52 -0400 Message-Id: <4d4c6ee46622dbfaf84cef5dfd2471111e9a5723.1566576129.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Subject: [libvirt] [PATCH v2 08/16] qemu: restrict 'virgl=' option to non-vhostuser video type X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.68]); Fri, 23 Aug 2019 16:22:29 +0000 (UTC) From: Marc-André Lureau vhost-user device doesn't have a virgl option, it is passed to the vhost-user-gpu helper process instead. Signed-off-by: Marc-André Lureau Signed-off-by: Cole Robinson --- src/qemu/qemu_command.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 49652a8565..8bef103f68 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4683,9 +4683,11 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, virBufferAsprintf(&buf, ",id=%s", video->info.alias); - if (video->accel && video->accel->accel3d == VIR_TRISTATE_SWITCH_ON) { - virBufferAsprintf(&buf, ",virgl=%s", - virTristateSwitchTypeToString(video->accel->accel3d)); + if (video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO && !video->vhostuser) { + if (video->accel && video->accel->accel3d == VIR_TRISTATE_SWITCH_ON) { + virBufferAsprintf(&buf, ",virgl=%s", + virTristateSwitchTypeToString(video->accel->accel3d)); + } } if (video->type == VIR_DOMAIN_VIDEO_TYPE_QXL) {