Re: [PATCH V3 3/4] qemu capabilities: add QEMU_CAPS_SNAPSHOT_SAVE/_DELETE

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

 



On Wed, Jul 17, 2024 at 21:21:39 +0300, Nikolai Barybin via Devel wrote:
> The 'snapshot-save/delete' QMP commands were introduced in QEMU 6.0.0,
> so we add a compatible capability to check if target QEMU binary supports it.
> 
> Signed-off-by: Nikolai Barybin <nikolai.barybin@xxxxxxxxxxxxx>
> ---
>  src/qemu/qemu_capabilities.c                          | 4 ++++
>  src/qemu/qemu_capabilities.h                          | 2 ++

[...]

>  30 files changed, 62 insertions(+)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 17db563b09..951dd367b0 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -712,6 +712,8 @@ VIR_ENUM_IMPL(virQEMUCaps,
>                /* 460 */
>                "sev-snp-guest", /* QEMU_CAPS_SEV_SNP_GUEST */
>                "netdev.user", /* QEMU_CAPS_NETDEV_USER */
> +              "snapshot-save", /* QEMU_CAPS_SNAPSHOT_SAVE */
> +              "snapshot-delete", /* QEMU_CAPS_SNAPSHOT_DELETE */

Reallistically only one of them is needed as there won't be a qemu which
would have just one. I'll call it QEMU_CAPS_SNAPSHOT_INTERNAL_QMP.

>      );
>  
>  
> @@ -1232,6 +1234,8 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
>      { "query-stats", QEMU_CAPS_QUERY_STATS },
>      { "query-stats-schemas", QEMU_CAPS_QUERY_STATS_SCHEMAS },
>      { "display-reload", QEMU_CAPS_DISPLAY_RELOAD },
> +    { "snapshot-save", QEMU_CAPS_SNAPSHOT_SAVE },
> +    { "snapshot-delete", QEMU_CAPS_SNAPSHOT_DELETE },
>  };
>  
>  struct virQEMUCapsStringFlags virQEMUCapsMigration[] = {
> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
> index 910181993c..aad3fd1bf1 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -691,6 +691,8 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
>      /* 460 */
>      QEMU_CAPS_SEV_SNP_GUEST, /* -object sev-snp-guest */
>      QEMU_CAPS_NETDEV_USER, /* -netdev user */
> +    QEMU_CAPS_SNAPSHOT_SAVE, /* 'snapshot-save' qmp command is supported */
> +    QEMU_CAPS_SNAPSHOT_DELETE, /* 'snapshot-delete' qmp command is supported */
>  
>      QEMU_CAPS_LAST /* this must always be the last item */



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux