From nobody Tue Feb 10 04:16:13 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=1569235592; cv=none; d=zoho.com; s=zohoarc; b=A6gsAf3B/qjJJLyBFzgBwpnJk0QNqexUPTI8J3wr9Eh7vah7qCQ0Iz7NxbwVkAGHEgve7sOl0ifqsPqzwoWcRvAs0wFcQg4tYC5gzovl6JssyehNmrXgmeIP1EyF8GoUDgL16CqUmUsQM/45PkgTFURwmQ3247T4mdHCJa/zxU4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569235592; 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=c+i+fS1Fjx1dwfuGqljxLrs7p4stqCGew05QSyfMRNg=; b=T3YQ9fZPhW0NlhhMDzk53qdu2hFPEoDzNBt1vYFAzyv2UsqvjupQ+o89VJhQ9G1Ov68TTEuAwN1StTMNbigu/G/xNREgWrjbypLyRBSZFy/N1qDbsqs1hCkz71MLJgwI4hwBlqkiZHJ+3NQJPMUx/Ki4cvGBROVTA+aJ1HQTRRk= 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 1569235592183189.87739954639483; Mon, 23 Sep 2019 03:46:32 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E97FAC056808; Mon, 23 Sep 2019 10:46:30 +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 BEB5F5D713; Mon, 23 Sep 2019 10:46:30 +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 7F7C21803518; Mon, 23 Sep 2019 10:46:30 +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 x8NAkT2J025799 for ; Mon, 23 Sep 2019 06:46:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1506060600; Mon, 23 Sep 2019 10:46:29 +0000 (UTC) Received: from localhost (ovpn-112-36.ams2.redhat.com [10.36.112.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6084760933; Mon, 23 Sep 2019 10:46:20 +0000 (UTC) From: marcandre.lureau@redhat.com To: libvir-list@redhat.com Date: Mon, 23 Sep 2019 14:44:32 +0400 Message-Id: <20190923104443.17931-10-marcandre.lureau@redhat.com> In-Reply-To: <20190923104443.17931-1-marcandre.lureau@redhat.com> References: <20190923104443.17931-1-marcandre.lureau@redhat.com> 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=20Lureau?= , jtomko@redhat.com Subject: [libvirt] [PATCH v5 09/20] 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 23 Sep 2019 10:46:31 +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 Reviewed-by: Cole Robinson --- src/qemu/qemu_command.c | 9 ++++++--- tests/qemuxml2argvdata/virtio-options.args | 3 +-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 90e090c72e..3f127dad1f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4542,9 +4542,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..92bce8283c 100644 --- a/tests/qemuxml2argvdata/virtio-options.args +++ b/tests/qemuxml2argvdata/virtio-options.args @@ -49,8 +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,\ -ats=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 \ -object rng-random,id=3Dobjrng0,filename=3D/dev/random \ --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list