[PATCH V2 3/3] qemu: Use command line to properly check for spice support

Michal Prívozník mprivozn at redhat.com
Thu Oct 13 15:46:24 UTC 2022


On 10/13/22 01:24, Jim Fehlig wrote:
> 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 at suse.com>
> ---
>  src/qemu/qemu_capabilities.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 98849daf4c..e40b5c6c00 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -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 },
> @@ -3265,6 +3264,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 },


How is the qemu compiled? Because I tried --disable-spice and libvirt
correctly did NOT set this capability. Then I tried
--disable-spice-protocol and either with or without your patch the
capability was set. I'm using current git master though, so could this
be why I don't see any difference?

Michal



More information about the libvir-list mailing list