Message ID | 0a3a71c3820cffa0087592a95900aed86a954449.1462729517.git.crobinso@redhat.com |
---|---|
State | New |
Headers | show |
On 05/09/2016 05:27 AM, Michal Privoznik wrote: > On 08.05.2016 19:49, Cole Robinson wrote: >> Reports a tristate enum value for acceptable video model=virtio >> <acceleration accel3d=XXX/>. >> >> 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(+) >> >> 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 @@ >> <dt><code>modelType</code></dt> >> <dd>Options for the <code>type</code> attribute of the >> <video><model> element.</dd> >> + >> + <dt><code>spiceGL</code></dt> > > Copy paste error. This should have been virtioAccel3D. This is more or > less the same problem (maybe too strong term though) that I've raised in > 3/5. Just accel3D perhaps? Otherwise the code looks good. Fixed locally (and the subject... not sure how that happened) I've pushed patches 1, 2, and 4 since you ACKd and they don't seem controversial. Thanks! - Cole -- 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 @@ <dt><code>modelType</code></dt> <dd>Options for the <code>type</code> attribute of the <video><model> element.</dd> + + <dt><code>spiceGL</code></dt> + <dd>Options for the <code>accel3D</code> attribute of the + <video><model type='virtio'/><acceleration/> + element.</dd> </dl> 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 + <acceleration accel3d=X/> */ }; 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 @@ <value>parallels</value> <value>virtio</value> </enum> + <enum name='virtioAccel3D'> + <value>default</value> + <value>yes</value> + <value>no</value> + </enum> </video> <hostdev supported='yes'> <enum name='mode'> 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 @@ <value>vmvga</value> <value>qxl</value> </enum> + <enum name='virtioAccel3D'> + <value>no</value> + </enum> </video> <hostdev supported='yes'> <enum name='mode'> 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 @@ <value>qxl</value> <value>virtio</value> </enum> + <enum name='virtioAccel3D'> + <value>yes</value> + <value>no</value> + </enum> </video> <hostdev supported='yes'> <enum name='mode'> 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 @@ <value>qxl</value> <value>virtio</value> </enum> + <enum name='virtioAccel3D'> + <value>no</value> + </enum> </video> <hostdev supported='yes'> <enum name='mode'> 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 @@ <value>qxl</value> <value>virtio</value> </enum> + <enum name='virtioAccel3D'> + <value>no</value> + </enum> </video> <hostdev supported='yes'> <enum name='mode'> 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 @@ <value>qxl</value> <value>virtio</value> </enum> + <enum name='virtioAccel3D'> + <value>no</value> + </enum> </video> <hostdev supported='yes'> <enum name='mode'> 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 @@ <value>qxl</value> <value>virtio</value> </enum> + <enum name='virtioAccel3D'> + <value>no</value> + </enum> </video> <hostdev supported='yes'> <enum name='mode'> 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);