]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Use command line to properly check for spice support
authorJim Fehlig <jfehlig@suse.com>
Wed, 31 Aug 2022 23:10:55 +0000 (17:10 -0600)
committerJim Fehlig <jfehlig@suse.com>
Fri, 14 Oct 2022 22:10:11 +0000 (16:10 -0600)
domcapabilities reports spice graphics support even against a minimal
qemu installation without spice modules. Checking for 'query-spice'
in the list of qmp commands supported by qemu is not sufficient to
determine spice support. Checking the command line produces acurrate
results.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_capabilities.c

index 5a664ec628370b17b429b5fc5bcc2b32c7e5c2fa..40da6f1b50d6cd28503dc9f3a472126e0ac3744b 100644 (file)
@@ -1205,7 +1205,6 @@ struct virQEMUCapsStringFlags {
 
 
 struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
-    { "query-spice", QEMU_CAPS_SPICE },
     { "query-vnc", QEMU_CAPS_VNC },
     { "rtc-reset-reinjection", QEMU_CAPS_RTC_RESET_REINJECTION },
     { "query-hotpluggable-cpus", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS },
@@ -3264,6 +3263,7 @@ struct virQEMUCapsCommandLineProps {
 static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = {
     { "fsdev", "multidevs", QEMU_CAPS_FSDEV_MULTIDEVS },
     { "sandbox", NULL, QEMU_CAPS_SECCOMP_SANDBOX },
+    { "spice", NULL, QEMU_CAPS_SPICE },
     { "spice", "gl", QEMU_CAPS_SPICE_GL },
     { "spice", "rendernode", QEMU_CAPS_SPICE_RENDERNODE },
     { "vnc", "power-control", QEMU_CAPS_VNC_POWER_CONTROL },