[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/2] spice: detect if qemu can disable file transfer



On Tue, Jan 07, 2014 at 08:04:32PM +0100, Francesco Romani wrote:
> spice-server offers an API to disable file transfer messages
> on the agent channel between the client and the guest.
> This is supported in qemu through the disable-agent-file-xfer option.

Looks good to me, ACK.

Christophe

> 
> This detects if QEMU supports this option, and add
> a capability if does.
> ---
>  src/qemu/qemu_capabilities.c                  | 5 ++++-
>  src/qemu/qemu_capabilities.h                  | 1 +
>  tests/qemucapabilitiesdata/caps_1.6.0-1.caps  | 1 +
>  tests/qemucapabilitiesdata/caps_1.6.50-1.caps | 1 +
>  4 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 0538115..c3f2e65 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -247,6 +247,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
>                "boot-strict", /* 160 */
>                "pvpanic",
>                "enable-fips",
> +              "spice-file-xfer-disable"
>      );
>  
>  struct _virQEMUCaps {
> @@ -2565,8 +2566,10 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
>      if (qemuCaps->version >= 1003001)
>          virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_WEBSOCKET);
>  
> -    if (qemuCaps->version >= 1006000)
> +    if (qemuCaps->version >= 1006000) {
>          virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
> +        virQEMUCapsSet(qemuCaps, QEMU_CAPS_SPICE_FILE_XFER_DISABLE);
> +    }
>  
>      if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
>          goto cleanup;
> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
> index efb3f43..23dccce 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -201,6 +201,7 @@ enum virQEMUCapsFlags {
>      QEMU_CAPS_BOOT_STRICT        = 160, /* -boot strict */
>      QEMU_CAPS_DEVICE_PANIC       = 161, /* -device pvpanic */
>      QEMU_CAPS_ENABLE_FIPS        = 162, /* -enable-fips */
> +    QEMU_CAPS_SPICE_FILE_XFER_DISABLE = 163, /* -spice disable-agent-file-xfer */
>  
>      QEMU_CAPS_LAST,                   /* this must always be the last item */
>  };
> diff --git a/tests/qemucapabilitiesdata/caps_1.6.0-1.caps b/tests/qemucapabilitiesdata/caps_1.6.0-1.caps
> index 2d50cf9..61542a8 100644
> --- a/tests/qemucapabilitiesdata/caps_1.6.0-1.caps
> +++ b/tests/qemucapabilitiesdata/caps_1.6.0-1.caps
> @@ -139,4 +139,5 @@
>      <flag name='pvpanic'/>
>      <flag name='reboot-timeout'/>
>      <flag name='enable-fips'/>
> +    <flag name='spice-file-xfer-disable'/>
>    </qemuCaps>
> diff --git a/tests/qemucapabilitiesdata/caps_1.6.50-1.caps b/tests/qemucapabilitiesdata/caps_1.6.50-1.caps
> index ba64177..8ce17aa 100644
> --- a/tests/qemucapabilitiesdata/caps_1.6.50-1.caps
> +++ b/tests/qemucapabilitiesdata/caps_1.6.50-1.caps
> @@ -137,4 +137,5 @@
>      <flag name='boot-strict'/>
>      <flag name='pvpanic'/>
>      <flag name='reboot-timeout'/>
> +    <flag name='spice-file-xfer-disable'/>
>    </qemuCaps>
> -- 
> 1.8.4.2
> 
> --
> libvir-list mailing list
> libvir-list redhat com
> https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: pgpMvXyVmzKtD.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]