Patchwork [06/12] arch_init: add save_local_setup to savevm_ram_handlers

login
register
mail settings
Submitter Lei Li
Date July 25, 2013, 8:18 p.m.
Message ID <1374783499-2550-7-git-send-email-lilei@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/261948/
State New
Headers show

Comments

Lei Li - July 25, 2013, 8:18 p.m.
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
---
 arch_init.c                 |    1 +
 include/migration/vmstate.h |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
mrhines@linux.vnet.ibm.com - Aug. 2, 2013, 7:43 p.m.
On 07/25/2013 04:18 PM, Lei Li wrote:
> Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
> ---
>   arch_init.c                 |    1 +
>   include/migration/vmstate.h |    2 ++
>   2 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch_init.c b/arch_init.c
> index 7eeb52f..5c25005 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -973,6 +973,7 @@ SaveVMHandlers savevm_ram_handlers = {
>       .save_live_iterate = ram_save_iterate,
>       .save_live_complete = ram_save_complete,
>       .save_live_pending = ram_save_pending,
> +    .save_local_setup = ram_save_local,
>       .load_state = ram_load,
>       .cancel = ram_migration_cancel,
>   };
> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
> index acf847b..c534254 100644
> --- a/include/migration/vmstate.h
> +++ b/include/migration/vmstate.h
> @@ -53,6 +53,8 @@ typedef struct SaveVMHandlers {
>       int (*save_live_setup)(QEMUFile *f, void *opaque);
>       uint64_t (*save_live_pending)(QEMUFile *f, void *opaque, uint64_t max_size);
>
> +    int (*save_local_setup)(QEMUFile *f, void *opaque);
> +
>       LoadStateHandler *load_state;
>   } SaveVMHandlers;
>

save_page() should be good enough for you - it has more parameters too 
.... see last email....

- Michael

Patch

diff --git a/arch_init.c b/arch_init.c
index 7eeb52f..5c25005 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -973,6 +973,7 @@  SaveVMHandlers savevm_ram_handlers = {
     .save_live_iterate = ram_save_iterate,
     .save_live_complete = ram_save_complete,
     .save_live_pending = ram_save_pending,
+    .save_local_setup = ram_save_local,
     .load_state = ram_load,
     .cancel = ram_migration_cancel,
 };
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index acf847b..c534254 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -53,6 +53,8 @@  typedef struct SaveVMHandlers {
     int (*save_live_setup)(QEMUFile *f, void *opaque);
     uint64_t (*save_live_pending)(QEMUFile *f, void *opaque, uint64_t max_size);
 
+    int (*save_local_setup)(QEMUFile *f, void *opaque);
+
     LoadStateHandler *load_state;
 } SaveVMHandlers;