qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/19] migration: They are called vmstate_foo, m


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH 02/19] migration: They are called vmstate_foo, move them to vmstate.c
Date: Tue, 18 Apr 2017 19:40:22 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

* Juan Quintela (address@hidden) wrote:
> Signed-off-by: Juan Quintela <address@hidden>
> ---
>  migration/savevm.c  | 17 -----------------
>  migration/vmstate.c | 16 ++++++++++++++++
>  2 files changed, 16 insertions(+), 17 deletions(-)

OK, but it's a little odd, savevm.c still has the vmstate_register_with_alias_id
and vmstate-unregister,  so this is just the simple ram cases.

Reviewed-by: Dr. David Alan Gilbert <address@hidden>

> diff --git a/migration/savevm.c b/migration/savevm.c
> index cc9c086..c47b209 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -45,7 +45,6 @@
>  #include "qemu/sockets.h"
>  #include "qemu/queue.h"
>  #include "sysemu/cpus.h"
> -#include "exec/memory.h"
>  #include "qmp-commands.h"
>  #include "trace.h"
>  #include "qemu/bitops.h"
> @@ -2465,19 +2464,3 @@ void hmp_info_snapshots(Monitor *mon, const QDict 
> *qdict)
>      g_free(global_snapshots);
>  
>  }
> -
> -void vmstate_register_ram(MemoryRegion *mr, DeviceState *dev)
> -{
> -    qemu_ram_set_idstr(mr->ram_block,
> -                       memory_region_name(mr), dev);
> -}
> -
> -void vmstate_unregister_ram(MemoryRegion *mr, DeviceState *dev)
> -{
> -    qemu_ram_unset_idstr(mr->ram_block);
> -}
> -
> -void vmstate_register_ram_global(MemoryRegion *mr)
> -{
> -    vmstate_register_ram(mr, NULL);
> -}
> diff --git a/migration/vmstate.c b/migration/vmstate.c
> index 8a71349..174c490 100644
> --- a/migration/vmstate.c
> +++ b/migration/vmstate.c
> @@ -1,5 +1,6 @@
>  #include "qemu/osdep.h"
>  #include "qemu-common.h"
> +#include "exec/memory.h"
>  #include "migration/migration.h"
>  #include "migration/qemu-file.h"
>  #include "migration/vmstate.h"
> @@ -1127,3 +1128,18 @@ bool vmstate_device_is_migratable(const 
> VMStateDescription *vmsd)
>      return true;
>  }
>  
> +void vmstate_register_ram(MemoryRegion *mr, DeviceState *dev)
> +{
> +    qemu_ram_set_idstr(mr->ram_block,
> +                       memory_region_name(mr), dev);
> +}
> +
> +void vmstate_unregister_ram(MemoryRegion *mr, DeviceState *dev)
> +{
> +    qemu_ram_unset_idstr(mr->ram_block);
> +}
> +
> +void vmstate_register_ram_global(MemoryRegion *mr)
> +{
> +    vmstate_register_ram(mr, NULL);
> +}
> -- 
> 2.9.3
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]