X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_checkpoint.c;h=a67560e99351e61d89f734f3d5980d3812eaa325;hb=a5d2c00cc461b4a60a1360a2a0bba55cef467bab;hp=6bb8a7981cb09eb8e3dea8dc7aa5c3b34254b896;hpb=444896a3622e7918f81ccc7c0ac17edf90a6f7b9;p=palacios.git diff --git a/palacios/src/palacios/vmm_checkpoint.c b/palacios/src/palacios/vmm_checkpoint.c index 6bb8a79..a67560e 100644 --- a/palacios/src/palacios/vmm_checkpoint.c +++ b/palacios/src/palacios/vmm_checkpoint.c @@ -260,7 +260,7 @@ int v3_chkpt_close_ctx(struct v3_chkpt_ctx * ctx) { int v3_chkpt_save(struct v3_chkpt_ctx * ctx, char * tag, uint64_t len, void * buf) { - struct v3_chkpt * chkpt = ctx->chkpt; + struct v3_chkpt * chkpt; int rc; if (!ctx) { @@ -268,6 +268,8 @@ int v3_chkpt_save(struct v3_chkpt_ctx * ctx, char * tag, uint64_t len, void * bu return -1; } + chkpt = ctx->chkpt; + if (chkpt->current_ctx != ctx) { PrintError(VM_NONE, VCORE_NONE, "Attempt to save on context that is not the current context for the store\n"); return -1; @@ -285,13 +287,15 @@ int v3_chkpt_save(struct v3_chkpt_ctx * ctx, char * tag, uint64_t len, void * bu int v3_chkpt_load(struct v3_chkpt_ctx * ctx, char * tag, uint64_t len, void * buf) { - struct v3_chkpt * chkpt = ctx->chkpt; + struct v3_chkpt * chkpt; int rc; if (!ctx) { PrintError(VM_NONE, VCORE_NONE, "Attempt to load tag %s from null context\n",tag); return -1; } + + chkpt = ctx->chkpt; if (chkpt->current_ctx != ctx) { PrintError(VM_NONE, VCORE_NONE, "Attempt to load from context that is not the current context for the store\n"); @@ -490,7 +494,7 @@ static struct mem_migration_state *start_page_tracking(struct v3_vm_info *vm) v3_invalidate_shadow_pts(&(vm->cores[i])); } } else if (vm->cores[0].shdw_pg_mode==NESTED_PAGING) { - //v3_register_nested_paging_event_callback(vm,nested_paging_callback,m); + //v3_register_nested_paging_event_callback(vm,nested_paging_callback,m); for (i=0;inum_cores;i++) { //v3_invalidate_nested_addr_range(&(vm->cores[i]),0,vm->mem_size-1); @@ -1275,7 +1279,7 @@ int v3_chkpt_send_vm(struct v3_vm_info * vm, char * store, char * url, v3_chkpt_ int iter = 0; bool last_modpage_iteration=false; struct v3_bitmap modified_pages_to_send; - uint64_t start_time; + uint64_t start_time=0; uint64_t stop_time; int num_mod_pages=0; struct mem_migration_state *mm_state;