From nobody Sat Feb 7 04:40:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1579907566; cv=none; d=zohomail.com; s=zohoarc; b=ROHE8e3rYIBsNIpTuSkK1pWpDnwG+ve/fOtd3E0LRC9IIazl+HjJoxPvY3r09r/sfYnLyX+lLuWU1IA/MvhH9+EaDcC84t6xBnQ+C4oIkkqn3vdk3ZgPkZfE4GmLF83K0QCQmvroXzBUM1QrjssgaUyVzj6iylGgLRGSLh1Yqzc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579907566; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=qb6I/mheTt8O7TaMLEvoLcd3gt2pS81GqX2BMXWIOAU=; b=Am+i88tk4m3xHqGhqoMbtROSYAps+jFYR+pj4uZBKdh9V9qG8eOXAtAnW3PP6wG8KSz5NZSd0lzOHgoY7xxdgLUG2FlSvcjcNpBlpfCPuw4AOtQqXodq3jXmdk3h8a6j7HIdQcDr6YnMEOJnOOk4KEmgEQWw9oO3X2IBjDJTTBY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1579907566933369.5295228322602; Fri, 24 Jan 2020 15:12:46 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-39-HnXWvRhBOKayLk4PMSF7sQ-1; Fri, 24 Jan 2020 18:12:43 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id EB149107ACC5; Fri, 24 Jan 2020 23:12:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B04518681F; Fri, 24 Jan 2020 23:12:34 +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 A94768595B; Fri, 24 Jan 2020 23:12: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 00ONCTrN003671 for ; Fri, 24 Jan 2020 18:12:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id C1F0F8DC28; Fri, 24 Jan 2020 23:12:29 +0000 (UTC) Received: from himantopus.redhat.com (ovpn-117-113.phx2.redhat.com [10.3.117.113]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8E1238DC26 for ; Fri, 24 Jan 2020 23:12:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579907565; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qb6I/mheTt8O7TaMLEvoLcd3gt2pS81GqX2BMXWIOAU=; b=D8UxprZpOvInW5zwJA0/ZLTP4yO8m/IG61xMSrubqPOTw9U4VDo6GyfI5TRCe3ZMIunjYm 8y4sm2f0UKxdYAB3qP51QBrigqCbLkmir9d/aDPd2MojdijiD4rjbBKODqFMbeXFIGLu7D vDLYuO29cmEC3KGz6e9jYPmdA+qy7Xo= From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: explicitly disable virgl when requested Date: Fri, 24 Jan 2020 17:12:26 -0600 Message-Id: <20200124231226.29326-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com 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.15 X-MC-Unique: HnXWvRhBOKayLk4PMSF7sQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" If a domain is configured to have an egl-headless display and a virtio video device, virgl will be enabled automatically within the guest, even if the video device is configured with accel3d=3D'no'. In this case we should explicitly pass 'virgl=3Doff' to qemu. See https://bugzilla.redhat.com/show_bug.cgi?id=3D1791236 for more information. Signed-off-by: Jonathon Jongsma Reviewed-by: Michal Privoznik and pushed. Even --- src/qemu/qemu_command.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 46680fd829..3378413ee1 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4429,7 +4429,10 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, =20 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) { + if (video->accel && + virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_VIRGL) && + (video->accel->accel3d =3D=3D VIR_TRISTATE_SWITCH_ON || + video->accel->accel3d =3D=3D VIR_TRISTATE_SWITCH_OFF)) { virBufferAsprintf(&buf, ",virgl=3D%s", virTristateSwitchTypeToString(video->accel->= accel3d)); } --=20 2.21.0