From nobody Mon Feb 9 17:36:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1567188236; cv=none; d=zoho.com; s=zohoarc; b=bD7h5RxE7n9vocXc+CIZC7GR46N8atv48Tz4H9QSkXu4SdlSrcFi9wIm7BYe7+x4n7d0/wcD16qHpGnzvp8Mm4E2Yu7XrPTHt4b+uq2QvbM2vijNl8bvoAGjPUJVUKgW2OZYLVt/3AnB82uapOrbairg7UiA//EQm19EFeA/5cA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567188236; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=ap8zelorlhTzwKKr24BZJ/Dxty5XmqSHIzC56v+SGRc=; b=KriUTFxZvAeRGm+YTF17iDTcivzpsOCJgi4y4jWj5bIB/OqVZb+hO93lR4HbYz/Z1+/ArWL0T1HL4iyiOLIUUbdoeC7Ct/TFoa5vQ5ZGRCM5LgKCL5SBv83I2udeoeEgriX1/Tu2ZH8LktXtI6GlOISF1hhDTVyT5WAW/KV/+KQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1567188236087922.6145022277417; Fri, 30 Aug 2019 11:03:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DA97430872DD; Fri, 30 Aug 2019 18:03:54 +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 B6DC85D9CA; Fri, 30 Aug 2019 18:03:54 +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 7AE7918034E0; Fri, 30 Aug 2019 18:03:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7UI3qOX031398 for ; Fri, 30 Aug 2019 14:03:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id E5BA660C05; Fri, 30 Aug 2019 18:03:52 +0000 (UTC) Received: from localhost (ovpn-112-53.ams2.redhat.com [10.36.112.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7FF3E60F82; Fri, 30 Aug 2019 18:03:46 +0000 (UTC) From: marcandre.lureau@redhat.com To: libvir-list@redhat.com Date: Fri, 30 Aug 2019 22:01:52 +0400 Message-Id: <20190830180202.22278-10-marcandre.lureau@redhat.com> In-Reply-To: <20190830180202.22278-1-marcandre.lureau@redhat.com> References: <20190830180202.22278-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , jtomko@redhat.com Subject: [libvirt] [PATCH v3 09/19] 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Fri, 30 Aug 2019 18:03:55 +0000 (UTC) From: Marc-Andr=C3=A9 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=C3=A9 Lureau --- src/qemu/qemu_command.c | 9 ++++++--- tests/qemuxml2argvdata/virtio-options.args | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 1ca1ecd2f0..e232406ff9 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4548,9 +4548,12 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, =20 virBufferAsprintf(&buf, ",id=3D%s", video->info.alias); =20 - if (video->accel && video->accel->accel3d =3D=3D VIR_TRISTATE_SWITCH_O= N) { - virBufferAsprintf(&buf, ",virgl=3D%s", - virTristateSwitchTypeToString(video->accel->acce= l3d)); + if (video->backend !=3D VIR_DOMAIN_VIDEO_BACKEND_TYPE_VHOSTUSER && + video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_VIRTIO) { + if (video->accel && video->accel->accel3d =3D=3D VIR_TRISTATE_SWIT= CH_ON) { + virBufferAsprintf(&buf, ",virgl=3D%s", + virTristateSwitchTypeToString(video->accel->= accel3d)); + } } =20 if (video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_QXL) { diff --git a/tests/qemuxml2argvdata/virtio-options.args b/tests/qemuxml2arg= vdata/virtio-options.args index 40f85fdaa4..69dc1c73e5 100644 --- a/tests/qemuxml2argvdata/virtio-options.args +++ b/tests/qemuxml2argvdata/virtio-options.args @@ -49,7 +49,7 @@ ats=3Don \ ats=3Don \ -device virtio-input-host-pci,id=3Dinput3,evdev=3D/dev/input/event1234,bus= =3Dpci.0,\ addr=3D0x12,iommu_platform=3Don,ats=3Don \ --device virtio-gpu-pci,id=3Dvideo0,virgl=3Don,bus=3Dpci.0,addr=3D0x2,iommu= _platform=3Don,\ +-device virtio-gpu-pci,id=3Dvideo0,bus=3Dpci.0,addr=3D0x2,iommu_platform= =3Don,\ ats=3Don \ -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0xc,iommu_plat= form=3Don,\ ats=3Don \ --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list