From nobody Fri May 3 16:34:09 2024 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=1623114975; cv=none; d=zohomail.com; s=zohoarc; b=fpRG1yT7YdqxogHwXKgS+UQqKMgbLaX1vrlomexTrhWF2JhrZESSMGEIOt2euP/dsSt+fRrA3h187UDcTeY0g+kaWPdmScTc6uw+baYK1pfsWC5nF3LdjOGogitf36oGlrN40uAPfEbObDdnOWhRuF/7Tmr06qDJO8ifJH2qBjI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623114975; 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=i4G6qfRCBeT6YuAl/2i7TjyaX2j28GCtklSvtlLsQJs=; b=BiMvNwBdxM/7kctY3hl1tKcF7veoBB80VuHmnBgTkFmge7Sev9tex6rHaaFEskUvEqnJo+mjK5rdz97gZ9Dm1ZBTjaej2jYTQnOM9Rj3Xl/nv5Cj7LK2CY+tXeAarTBYxPvryx3ohznHiWRhZDk9GFdUeYrEKOshzI9hydNOxWg= 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 1623114975625389.7423402687091; Mon, 7 Jun 2021 18:16:15 -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-191-cJh_RfiuMpOM7EU1CogsyA-1; Mon, 07 Jun 2021 21:16:13 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7EBE4801B12; Tue, 8 Jun 2021 01:16:07 +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 5E0F360CC9; Tue, 8 Jun 2021 01:16:07 +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 06DDD1801268; Tue, 8 Jun 2021 01:16:07 +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 1581Fo8E003618 for ; Mon, 7 Jun 2021 21:15:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 887685D75A; Tue, 8 Jun 2021 01:15:50 +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 4E0075D6DC; Tue, 8 Jun 2021 01:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623114974; 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=i4G6qfRCBeT6YuAl/2i7TjyaX2j28GCtklSvtlLsQJs=; b=OSHTKazJtyoYjOlG4Dpj8nhxh7ZO0RfkGFYNWThwm/OLijxv8n4Tqe1wEVRTTUzmxXbjjW JMlplHiHBKxPn4syLuS2iQAL1h/NI+YxjFlhuyoHGPt4ofe+Kmcljt6JMC0ZbBO1dxAND3 vkMl+rv0ckBvsJ+OrbU6WBVqszhgjy8= X-MC-Unique: cJh_RfiuMpOM7EU1CogsyA-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH 1/5] qemu_capabilities: Add QEMU_CAPS_VIRTIO_GPU_GL_PCI Date: Tue, 8 Jun 2021 09:15:34 +0800 Message-Id: <20210608011538.153968-2-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.12 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" This flag will be used for the device virtio-gpu-gl-pci which is introduced since QEMU 6.1. Signed-off-by: Han Han --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + 3 files changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 75dd01f06e..6df1b89aa0 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -630,6 +630,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "compat-deprecated", "acpi-index", "input-linux", + "virtio-gpu-gl-pci", ); =20 =20 @@ -1349,6 +1350,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "virtio-pmem-pci", QEMU_CAPS_DEVICE_VIRTIO_PMEM_PCI }, { "vhost-user-blk", QEMU_CAPS_DEVICE_VHOST_USER_BLK }, { "input-linux", QEMU_CAPS_INPUT_LINUX }, + { "virtio-gpu-gl-pci", QEMU_CAPS_VIRTIO_GPU_GL_PCI }, }; =20 =20 diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 94f2fad05a..d6430babce 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -610,6 +610,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_COMPAT_DEPRECATED, /* -compat deprecated-(input|output) is s= upported */ QEMU_CAPS_ACPI_INDEX, /* PCI device 'acpi-index' property */ QEMU_CAPS_INPUT_LINUX, /* -object input-linux */ + QEMU_CAPS_VIRTIO_GPU_GL_PCI, /* -device virtio-gpu-gl-pci */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.1.0.x86_64.xml index 4df3200219..56d8534f7f 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -254,6 +254,7 @@ + 6000050 0 43100243 --=20 2.31.1 From nobody Fri May 3 16:34:09 2024 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=1623114965; cv=none; d=zohomail.com; s=zohoarc; b=SHJ9pkMfERx+yZatW7MEzTxBwZtgN5Mk5Njzy+1EL9ZApcyMyzNceIG9ZlL7pF2L5U7ixgdjlKNow5digap6QRpHm1CZXyLO/L0zeRIDzpV4pUKlcg1H6eRVt6hQxy9KuSbbsr1wgqg1fUAyx2l9DdYKZ2E3RIY5PZ+SVzAm9D4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623114965; 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=IbHHY1bxUGyJFAOFitfq8oR4of84VmeFye0jttKD/xE=; b=jLMgdxXxEG+b4/qiyu+P9DvpF0koW03zmFVMxZ/oFvvXisvaIU/dBZ94vNRCNA5nWT0cl6UKYnydweSbyn6/E41fv8vuOyci0rQVgxjX09jNeFwNtEewOM7So+1swa4VsLCRQanJ2SXO6ddBQB0xUVIs26z+9c4FrtwV7mwQGEU= 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 1623114965167920.697811353427; Mon, 7 Jun 2021 18:16:05 -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-503-e7JxcGYzMD2ECJkKjPFBqA-1; Mon, 07 Jun 2021 21:16:01 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B8C62100748B; Tue, 8 Jun 2021 01:15:55 +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 5880F100760F; Tue, 8 Jun 2021 01:15:55 +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 55B471801265; Tue, 8 Jun 2021 01:15:53 +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 1581FqIw003628 for ; Mon, 7 Jun 2021 21:15:52 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5B14E5D764; Tue, 8 Jun 2021 01:15:52 +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 280285D6DC; Tue, 8 Jun 2021 01:15:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623114964; 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=IbHHY1bxUGyJFAOFitfq8oR4of84VmeFye0jttKD/xE=; b=acJutI9DXWpNu8sTDszZJTA7V2xZybf3VxmZLY0GBbf+5W8DHjOX+SacQUIdBd0H/TQ6Qo fS9/Uo3B6pso9x9jUWlVMm1OsWuFqE+y+LyDAtbH5sRAKhOJmXMMYOBUMd0Aw7hYwuUQO1 38z6/4ToB4LhN9YBQlZEqMgTL/97ZdM= X-MC-Unique: e7JxcGYzMD2ECJkKjPFBqA-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH 2/5] qemu: Adapt to virtio-gpu-gl-pci device when available Date: Tue, 8 Jun 2021 09:15:35 +0800 Message-Id: <20210608011538.153968-3-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.84 on 10.5.11.22 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 add virtio-gpu-gl-pci device to replace the virgl property of virtio-gpu-pci device. Adapt to that change. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1967356 Signed-off-by: Han Han --- src/qemu/qemu_command.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 4ed82ed570..a79e96a121 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -546,7 +546,11 @@ qemuBuildVirtioDevStr(virBuffer *buf, return -1; } =20 - virBufferAsprintf(buf, "%s-%s", baseName, implName); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_GL_PCI) && + STREQ(baseName, "virtio-gpu")) + virBufferAsprintf(buf, "%s-gl-%s", baseName, implName); + else + virBufferAsprintf(buf, "%s-%s", baseName, implName); =20 switch (devtype) { case VIR_DOMAIN_DEVICE_DISK: @@ -4242,6 +4246,7 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, video->type =3D=3D VIR_DOMAIN_VIDEO_TYPE_VIRTIO) { if (video->accel && virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_VIRGL) && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_GL_PCI) && (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 From nobody Fri May 3 16:34:09 2024 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=1623114980; cv=none; d=zohomail.com; s=zohoarc; b=nZ9Zzd9iRx6QMSoGT7WLmAMiGO4eEBjrRIw0loLCsVtL5kYuMEH75q5xyhAZ3KiaWdItDAMXBpBBFMe37ardnT+gQ7jV1ab4eSM9qbXB7uEHn0Ij/6wVUVeBoitkVyXH4pUTfSH462EVPMxhOXxN216bc9j8YeGXaEw/MO2iuh0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623114980; 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=nNL7DZwpZb7zrGejRJQIHT5XuUF6xgak3fatOHV8/wc=; b=LAISmolBvCtFEX8OVH7WMTczS+FVk4NtnH/4TU5E0kmAKtsXko//KnjYzIpUxI+/cKuEJAqAEoF7ZNtu/3pYzLqL5m32O4zqvBb2RniNQMTx8MM5fyHFdMO8YBI+xm8WDpD6V5b7GapRPRztnlpjQI13nMoo95L51mIPBo5OWkg= 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 1623114980752534.4853704556408; Mon, 7 Jun 2021 18:16:20 -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-555-2ujM1ATvPSWt485-V-QgWg-1; Mon, 07 Jun 2021 21:16:17 -0400 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 D6AC7801B35; Tue, 8 Jun 2021 01:16:10 +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 A03E25D76F; Tue, 8 Jun 2021 01:16:10 +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 5F1F844A5C; Tue, 8 Jun 2021 01:16:10 +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 1581FsvF003634 for ; Mon, 7 Jun 2021 21:15:54 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2C0BC5D75A; Tue, 8 Jun 2021 01:15:54 +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 022285D6DC; Tue, 8 Jun 2021 01:15:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623114979; 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=nNL7DZwpZb7zrGejRJQIHT5XuUF6xgak3fatOHV8/wc=; b=JfRkhS4u5YGwoZ+SXrTMW5fXGto0oLyQx4JPHIu1+z1FMKTiwQaFeS0xdS1IL4iinZQkGL 1AzRZIlmcWaeWwBFH3EfWgJIMtLkNDtAax3g7lB4OlSDIVGR7FodWTT9Yf1fI7aJFsTwyv GfQ3RATb3JcK3V76sWsZBnwOVaPyWZc= X-MC-Unique: 2ujM1ATvPSWt485-V-QgWg-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH 3/5] qemu_capabilities: Add QEMU_CAPS_VIRTIO_VGA_GL Date: Tue, 8 Jun 2021 09:15:36 +0800 Message-Id: <20210608011538.153968-4-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.15 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" It will be used for virtio-vga-gl device later. Signed-off-by: Han Han --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 + 3 files changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 6df1b89aa0..2b9ab9af60 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -631,6 +631,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "acpi-index", "input-linux", "virtio-gpu-gl-pci", + "virtio-vga-gl", ); =20 =20 @@ -1351,6 +1352,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "vhost-user-blk", QEMU_CAPS_DEVICE_VHOST_USER_BLK }, { "input-linux", QEMU_CAPS_INPUT_LINUX }, { "virtio-gpu-gl-pci", QEMU_CAPS_VIRTIO_GPU_GL_PCI }, + { "virtio-vga-gl", QEMU_CAPS_VIRTIO_VGA_GL }, }; =20 =20 diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index d6430babce..eac3e099b1 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -611,6 +611,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_ACPI_INDEX, /* PCI device 'acpi-index' property */ QEMU_CAPS_INPUT_LINUX, /* -object input-linux */ QEMU_CAPS_VIRTIO_GPU_GL_PCI, /* -device virtio-gpu-gl-pci */ + QEMU_CAPS_VIRTIO_VGA_GL, /* -device virtio-vga-gl */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.1.0.x86_64.xml index 56d8534f7f..695492d566 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -255,6 +255,7 @@ + 6000050 0 43100243 --=20 2.31.1 From nobody Fri May 3 16:34:09 2024 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 From nobody Fri May 3 16:34:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1623115024; cv=none; d=zohomail.com; s=zohoarc; b=eF5kO2MMIXY0jLozK87vVxKGcpcazPifXyzgct3m0uscP7uJk/9rsPDf7bmwBx1xdi3oKvfQjsAE1T4NdUXqVUo6a98BGcqMJC+sCmTq6VTppFzEd3uX1j+rieUerwfbpzNlcYHX/zIQs7KmhbaxMY2E7GgVgvfrhdEzjx1s49w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623115024; 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=Lxr/wiyHbbBXvTbMjj7nfrhQR1OHup0p37ToeU3giZo=; b=UhccxqGQiYI8N3rzNueZmhvo0G8PfCLlzcdOY1epZMtjJH/5CiOQQ/5OmpJxu09C66FEbCXjqpu2C8bxNbPG9QpHKysw6JDRcDgFeoqn0sXh9w3yJCAxrinsnGChaWh5+g/GYjShiTuiAxnY/NKXJ2TobMKpt/HQoMfv8ObMEEo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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 [170.10.133.124]) by mx.zohomail.com with SMTPS id 162311502401770.06735762575761; Mon, 7 Jun 2021 18:17:04 -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-426-rKrXkM7dMCae9u7_8uVV9g-1; Mon, 07 Jun 2021 21:16:11 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6FD2964157; Tue, 8 Jun 2021 01:16:07 +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 41EBD1A26A; Tue, 8 Jun 2021 01:16:07 +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 0987344A5A; Tue, 8 Jun 2021 01:16:07 +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 1581Fvqj003656 for ; Mon, 7 Jun 2021 21:15:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id C3AC25D764; Tue, 8 Jun 2021 01:15:57 +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 9D8735D6DC; Tue, 8 Jun 2021 01:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623115022; 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=Lxr/wiyHbbBXvTbMjj7nfrhQR1OHup0p37ToeU3giZo=; b=Z1bfTgzcEuoc/Gs80c65qAScW4t+wmSXq8SzJ/7G2OLA092Ci37xIrMQmcLpIwKeCFLoud UymWj2rv/HdJF8cYyXdRif46n1cRXEVBMBJmA5XV/6Y4Q2rcM26Ts75FTyK2fLliQd6GBx 2CayVvantzu6Xp6lbT7Fi5/B1O80L4k= X-MC-Unique: rKrXkM7dMCae9u7_8uVV9g-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH 5/5] tests: Tests for virtio-vga-gl and virtio-gpu-gl-pci device Date: Tue, 8 Jun 2021 09:15:38 +0800 Message-Id: <20210608011538.153968-6-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.84 on 10.5.11.23 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" Signed-off-by: Han Han --- .../video-virtio-vga-gpu-gl.args | 29 +++++++++++++ .../video-virtio-vga-gpu-gl.xml | 34 +++++++++++++++ tests/qemuxml2argvtest.c | 6 +++ .../video-virtio-vga-gpu-gl.xml | 43 +++++++++++++++++++ tests/qemuxml2xmltest.c | 6 +++ 5 files changed, 118 insertions(+) create mode 100644 tests/qemuxml2argvdata/video-virtio-vga-gpu-gl.args create mode 100644 tests/qemuxml2argvdata/video-virtio-vga-gpu-gl.xml create mode 100644 tests/qemuxml2xmloutdata/video-virtio-vga-gpu-gl.xml diff --git a/tests/qemuxml2argvdata/video-virtio-vga-gpu-gl.args b/tests/qe= muxml2argvdata/video-virtio-vga-gpu-gl.args new file mode 100644 index 0000000000..72e04f3c3e --- /dev/null +++ b/tests/qemuxml2argvdata/video-virtio-vga-gpu-gl.args @@ -0,0 +1,29 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name QEMUGuest1 \ +-S \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 1024 \ +-realtime mlock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-usb \ +-device virtio-vga-gl,id=3Dvideo0,bus=3Dpci.0,addr=3D0x2 \ +-device virtio-gpu-gl-pci,id=3Dvideo1,bus=3Dpci.0,addr=3D0x4 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/video-virtio-vga-gpu-gl.xml b/tests/qem= uxml2argvdata/video-virtio-vga-gpu-gl.xml new file mode 100644 index 0000000000..40e68fc458 --- /dev/null +++ b/tests/qemuxml2argvdata/video-virtio-vga-gpu-gl.xml @@ -0,0 +1,34 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 1048576 + 1048576 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f9ec81eb8e..99fe7ac115 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2501,6 +2501,12 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_GPU, QEMU_CAPS_DEVICE_VIRTIO_VGA, QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS); + DO_TEST("video-virtio-vga-gpu-gl", + QEMU_CAPS_DEVICE_VIRTIO_GPU, + QEMU_CAPS_DEVICE_VIRTIO_VGA, + QEMU_CAPS_VIRTIO_GPU_VIRGL, + QEMU_CAPS_VIRTIO_GPU_GL_PCI, + QEMU_CAPS_VIRTIO_VGA_GL); DO_TEST_CAPS_LATEST("video-bochs-display-device"); DO_TEST_CAPS_LATEST("video-ramfb-display-device"); DO_TEST_CAPS_LATEST_PARSE_ERROR("video-ramfb-display-device-pci-addres= s"); diff --git a/tests/qemuxml2xmloutdata/video-virtio-vga-gpu-gl.xml b/tests/q= emuxml2xmloutdata/video-virtio-vga-gpu-gl.xml new file mode 100644 index 0000000000..618d70c635 --- /dev/null +++ b/tests/qemuxml2xmloutdata/video-virtio-vga-gpu-gl.xml @@ -0,0 +1,43 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 1048576 + 1048576 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + + +