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) {
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;
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");
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;i<vm->num_cores;i++) {
//v3_invalidate_nested_addr_range(&(vm->cores[i]),0,vm->mem_size-1);
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;