From patchwork Sun May 8 17:49:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 67320 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1245912qge; Sun, 8 May 2016 10:52:19 -0700 (PDT) X-Received: by 10.28.41.65 with SMTP id p62mr6916721wmp.15.1462729939164; Sun, 08 May 2016 10:52:19 -0700 (PDT) Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com. [209.132.183.24]) by mx.google.com with ESMTPS id b203si21795195wma.5.2016.05.08.10.52.18 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 08 May 2016 10:52:19 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u48HnOTh006669; Sun, 8 May 2016 13:49:24 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u48HnDdb010802 for ; Sun, 8 May 2016 13:49:13 -0400 Received: from colepc.redhat.com (ovpn-113-25.phx2.redhat.com [10.3.113.25]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u48HnA6o030897; Sun, 8 May 2016 13:49:13 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Sun, 8 May 2016 13:49:08 -0400 Message-Id: <0a3a71c3820cffa0087592a95900aed86a954449.1462729517.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/5] domaincaps: Report graphics spiceGL 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: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com Reports a tristate enum value for acceptable video model=virtio . Wire it up for qemu too. 'no' is always a valid value, so we unconditionally report it. --- docs/formatdomaincaps.html.in | 9 +++++++++ src/conf/domain_capabilities.c | 1 + src/conf/domain_capabilities.h | 2 ++ src/qemu/qemu_capabilities.c | 4 ++++ tests/domaincapsschemadata/domaincaps-full.xml | 5 +++++ tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml | 3 +++ tests/domaincapsschemadata/domaincaps-qemu_2.6.0-1.xml | 4 ++++ tests/domaincapsschemadata/domaincaps-qemu_2.6.0-2.xml | 3 +++ tests/domaincapsschemadata/domaincaps-qemu_2.6.0-3.xml | 3 +++ tests/domaincapsschemadata/domaincaps-qemu_2.6.0-4.xml | 3 +++ tests/domaincapsschemadata/domaincaps-qemu_2.6.0-5.xml | 3 +++ tests/domaincapstest.c | 1 + 12 files changed, 41 insertions(+) -- 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in index c424107..b87a45a 100644 --- a/docs/formatdomaincaps.html.in +++ b/docs/formatdomaincaps.html.in @@ -268,6 +268,10 @@ <value>qxl</value> <value>virtio</value> </enum> + <enum name='virtioAccel3D'> + <value>yes</value> + <value>no</value> + </enum> </video> ... </devices> @@ -278,6 +282,11 @@
modelType
Options for the type attribute of the <video><model> element.
+ +
spiceGL
+
Options for the accel3D attribute of the + <video><model type='virtio'/><acceleration/> + element.
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 344955c..b5715d4 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -266,6 +266,7 @@ virDomainCapsDeviceVideoFormat(virBufferPtr buf, FORMAT_PROLOGUE(video); ENUM_PROCESS(video, modelType, virDomainVideoTypeToString); + ENUM_PROCESS(video, virtioAccel3D, virTristateBoolTypeToString); FORMAT_EPILOGUE(video); } diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index 916dba0..0501e99 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -82,6 +82,8 @@ typedef virDomainCapsDeviceVideo *virDomainCapsDeviceVideoPtr; struct _virDomainCapsDeviceVideo { bool supported; virDomainCapsEnum modelType; /* virDomainVideoType */ + virDomainCapsEnum virtioAccel3D; /* tristate for type=virtio + */ }; typedef struct _virDomainCapsDeviceHostdev virDomainCapsDeviceHostdev; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f228f4f..511faee 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4208,6 +4208,10 @@ virQEMUCapsFillDomainDeviceVideoCaps(virQEMUCapsPtr qemuCaps, if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU)) VIR_DOMAIN_CAPS_ENUM_SET(dev->modelType, VIR_DOMAIN_VIDEO_TYPE_VIRTIO); + VIR_DOMAIN_CAPS_ENUM_SET(dev->virtioAccel3D, VIR_TRISTATE_BOOL_NO); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU_VIRGL)) + VIR_DOMAIN_CAPS_ENUM_SET(dev->virtioAccel3D, VIR_TRISTATE_BOOL_YES); + return 0; } diff --git a/tests/domaincapsschemadata/domaincaps-full.xml b/tests/domaincapsschemadata/domaincaps-full.xml index 4eb5637..568f452 100644 --- a/tests/domaincapsschemadata/domaincaps-full.xml +++ b/tests/domaincapsschemadata/domaincaps-full.xml @@ -64,6 +64,11 @@ parallels virtio + + default + yes + no + diff --git a/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml b/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml index 6213297..f287a22 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml @@ -51,6 +51,9 @@ vmvga qxl + + no + diff --git a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-1.xml b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-1.xml index 2a1477f..7182b3d 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-1.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-1.xml @@ -53,6 +53,10 @@ qxl virtio + + yes + no + diff --git a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-2.xml b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-2.xml index 4349998..64d4c03 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-2.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-2.xml @@ -49,6 +49,9 @@ qxl virtio + + no + diff --git a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-3.xml b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-3.xml index 27173c4..c019ac4 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-3.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-3.xml @@ -49,6 +49,9 @@ qxl virtio + + no + diff --git a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-4.xml b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-4.xml index d7d81b5..539545b 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-4.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-4.xml @@ -49,6 +49,9 @@ qxl virtio + + no + diff --git a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-5.xml b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-5.xml index 51c5615..454233f 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-5.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_2.6.0-5.xml @@ -47,6 +47,9 @@ qxl virtio + + no + diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 1b62781..ba34a08 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -87,6 +87,7 @@ fillAllCaps(virDomainCapsPtr domCaps) video->supported = true; SET_ALL_BITS(video->modelType); + SET_ALL_BITS(video->virtioAccel3D); hostdev->supported = true; SET_ALL_BITS(hostdev->mode);