From patchwork Sun May 8 17:49:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 67321 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1245993qge; Sun, 8 May 2016 10:52:35 -0700 (PDT) X-Received: by 10.140.28.135 with SMTP id 7mr31255191qgz.72.1462729955297; Sun, 08 May 2016 10:52:35 -0700 (PDT) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id z106si16266497qge.18.2016.05.08.10.52.34 (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 08 May 2016 10:52:35 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 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 mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u48Ho1Tw014664; Sun, 8 May 2016 13:50:01 -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 u48HnC6V010784 for ; Sun, 8 May 2016 13:49:12 -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 u48HnA6m030897; Sun, 8 May 2016 13:49:12 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Sun, 8 May 2016 13:49:06 -0400 Message-Id: <2bd768bf0279c507cf0686827cc598ef74603179.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 3/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 graphics type=spice . Wire it up for qemu too. 'no' is always a valid value, so we unconditionally report it. --- docs/formatdomaincaps.html.in | 8 ++++++++ src/conf/domain_capabilities.c | 1 + src/conf/domain_capabilities.h | 1 + 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, 39 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 d5a8414..c424107 100644 --- a/docs/formatdomaincaps.html.in +++ b/docs/formatdomaincaps.html.in @@ -231,6 +231,10 @@ <value>vnc</value> <value>spice</value> </enum> + <enum name='spiceGL'> + <value>yes</value> + <value>no</value> + </enum> </graphics> ... </devices> @@ -241,6 +245,10 @@
type
Options for the type attribute of the <graphics/> element.
+ +
spiceGL
+
Options for the enable attribute of the + <graphics type='spice'><gl/> element.
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 1676f0e..344955c 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -253,6 +253,7 @@ virDomainCapsDeviceGraphicsFormat(virBufferPtr buf, FORMAT_PROLOGUE(graphics); ENUM_PROCESS(graphics, type, virDomainGraphicsTypeToString); + ENUM_PROCESS(graphics, spiceGL, virTristateBoolTypeToString); FORMAT_EPILOGUE(graphics); } diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index d0ca009..916dba0 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -74,6 +74,7 @@ typedef virDomainCapsDeviceGraphics *virDomainCapsDeviceGraphicsPtr; struct _virDomainCapsDeviceGraphics { bool supported; virDomainCapsEnum type; /* virDomainGraphicsType */ + virDomainCapsEnum spiceGL; /* type=spice tristate */ }; typedef struct _virDomainCapsDeviceVideo virDomainCapsDeviceVideo; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 1bddf43..f228f4f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4183,6 +4183,10 @@ virQEMUCapsFillDomainDeviceGraphicsCaps(virQEMUCapsPtr qemuCaps, if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE)) VIR_DOMAIN_CAPS_ENUM_SET(dev->type, VIR_DOMAIN_GRAPHICS_TYPE_SPICE); + VIR_DOMAIN_CAPS_ENUM_SET(dev->spiceGL, VIR_TRISTATE_BOOL_NO); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE_GL)) + VIR_DOMAIN_CAPS_ENUM_SET(dev->spiceGL, VIR_TRISTATE_BOOL_YES); + return 0; } diff --git a/tests/domaincapsschemadata/domaincaps-full.xml b/tests/domaincapsschemadata/domaincaps-full.xml index 2f529ff..4eb5637 100644 --- a/tests/domaincapsschemadata/domaincaps-full.xml +++ b/tests/domaincapsschemadata/domaincaps-full.xml @@ -47,6 +47,11 @@ desktop spice + + default + yes + no +