X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fos_debug.c;h=f821415696780efb494578813dc93f9d10ef3d14;hp=97cdabc30cd5ec8e293e0d5f1f94e34f5f94efcb;hb=5d1bbcc86de011e3f0d115b6f10fd8645cdf855e;hpb=a9a6c3664c8fdbdb9841a55d1a2fca7f4fa8f5de diff --git a/palacios/src/devices/os_debug.c b/palacios/src/devices/os_debug.c index 97cdabc..f821415 100644 --- a/palacios/src/devices/os_debug.c +++ b/palacios/src/devices/os_debug.c @@ -89,11 +89,36 @@ static int debug_free(struct debug_state * state) { return 0; }; +#ifdef V3_CONFIG_CHECKPOINT +static int debug_save(struct v3_chkpt_ctx * ctx, void * private_data) { + struct debug_state * dbg = (struct debug_state *)private_data; + + V3_CHKPT_STD_SAVE(ctx, dbg->debug_buf); + V3_CHKPT_STD_SAVE(ctx, dbg->debug_offset); + + return 0; +} + + +static int debug_load(struct v3_chkpt_ctx * ctx, void * private_data) { + struct debug_state * dbg = (struct debug_state *)private_data; + + V3_CHKPT_STD_LOAD(ctx, dbg->debug_buf); + V3_CHKPT_STD_LOAD(ctx, dbg->debug_offset); + + return 0; +} + +#endif static struct v3_device_ops dev_ops = { .free = (int (*)(void *))debug_free, +#ifdef V3_CONFIG_CHECKPOINT + .save = debug_save, + .load = debug_load +#endif };