From nobody Tue Feb 10 03:45:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1623114984; cv=none; d=zohomail.com; s=zohoarc; b=BENiBXmK+7UUGXZvelztVuK1g044L5wjzzmF8syYNxdObvCg8GbklZ2TY6aJQAD0BRrtict3W7a3zKKLmKSD2nC+XjKP3x+yTIcf7s4+WKOVrqKr2mnqYHGXqi/ktf7ZlER1OredwfI308/0u1DRtWTC+SgW6Kw+vUfEBze8D3g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623114984; 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; bh=FKiV5E9pvRqnCs0c/CwCpIh8eYCdUGh+Z8wNUiFwEz4=; b=HUFa+1Uxwx1uAEKehIlggcH77+gsMRtnxW5cJrUPKN/foVieLN0UAld1K3JJQRFk9ZDy3tsEaWrZTc5MeNc4vy878hjJAHGOj9hpc71M21dKc/G5giCoarYvXA6IjUFeIfJFOfV0XAbHtDASNaoOoDFzDqNGh5+ztwa24NNToxE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1623114984085950.3581412106624; Mon, 7 Jun 2021 18:16:24 -0700 (PDT) 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-575-M3ltT3WFPQetM76uFJDfYw-1; Mon, 07 Jun 2021 21:16:20 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D18B180FD6F; Tue, 8 Jun 2021 01:16:13 +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 20C25608BA; Tue, 8 Jun 2021 01:16:13 +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 DFAB2180C69B; Tue, 8 Jun 2021 01:16:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1581FuHv003649 for ; Mon, 7 Jun 2021 21:15:56 -0400 Received: by smtp.corp.redhat.com (Postfix) id 165395D764; Tue, 8 Jun 2021 01:15:56 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-12-110.pek2.redhat.com [10.72.12.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id D0ABE5D6DC; Tue, 8 Jun 2021 01:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623114983; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=FKiV5E9pvRqnCs0c/CwCpIh8eYCdUGh+Z8wNUiFwEz4=; b=D+pzyZyvS0fwAX93ELDSzn5eg3wZROkmz+bYiLw82Ka7lJYooS9NLlY2fmNIPRwUxpDn0O BSN+SBdfrald480KkiJsWiOaFu/Q2zCoNOF1DXMfmiasS6DcluJUkOrxZxO//tDenptzVq G0o4N2l89wWkcPvV/I7MWD/+BomcqVU= X-MC-Unique: M3ltT3WFPQetM76uFJDfYw-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH 4/5] qemu: Adapt to virtio-vga-gl device Date: Tue, 8 Jun 2021 09:15:37 +0800 Message-Id: <20210608011538.153968-5-hhan@redhat.com> In-Reply-To: <20210608011538.153968-1-hhan@redhat.com> References: <20210608011538.153968-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Han Han 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" QEMU 6.1 will replace the virgl property of virtio-vga device to virtio-vga-gl device. Adapt to that update. Resolves: https://gitlab.com/libvirt/libvirt/-/issues/167 Signed-off-by: Han Han --- src/qemu/qemu_command.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a79e96a121..c3de5baa26 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4238,6 +4238,9 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, } } else { virBufferAsprintf(&buf, "%s", model); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_VGA_GL) && + STREQ(model, "virtio-vga")) + virBufferAddLit(&buf, "-gl"); } =20 virBufferAsprintf(&buf, ",id=3D%s", video->info.alias); @@ -4247,6 +4250,7 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, if (video->accel && virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_VIRGL) && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_GL_PCI) && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_VGA_GL) && (video->accel->accel3d =3D=3D VIR_TRISTATE_SWITCH_ON || video->accel->accel3d =3D=3D VIR_TRISTATE_SWITCH_OFF)) { virBufferAsprintf(&buf, ",virgl=3D%s", --=20 2.31.1