Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


New keyed stream interface
[palacios.git] / palacios / include / palacios / vmm_checkpoint.h
index d62d98f..14af67a 100644 (file)
@@ -12,6 +12,7 @@
  * All rights reserved.
  *
  * Authors: Madhav Suresh <madhav@u.northwestern.edu>
+ *          Mark Cartwright <mcartwright@gmail.com> (live migration)
  *
  * This is free software.  You are permitted to use,
  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
@@ -23,7 +24,7 @@
 #ifdef __V3VEE__
 
 #include <palacios/vmm.h>
-#include <palacios/vm_guest.h>
+
 
 struct v3_chkpt;
 
@@ -34,18 +35,54 @@ struct v3_chkpt_ctx {
     void * store_ctx;
 };
 
+/* Temporary */
+#define  V3_CHKPT_STD_SAVE(ctx,x) v3_chkpt_save(ctx,#x,sizeof(x),&(x))
+#define  V3_CHKPT_STD_LOAD(ctx,x) v3_chkpt_load(ctx,#x,sizeof(x),&(x))
 
 
 
 int v3_chkpt_save(struct v3_chkpt_ctx * ctx, char * tag, uint64_t len, void * buf);
 int v3_chkpt_load(struct v3_chkpt_ctx * ctx, char * tag, uint64_t len, void * buf);
 
+static inline int v3_chkpt_save_64(struct v3_chkpt_ctx * ctx, char * tag, void * buf) {
+    return v3_chkpt_save(ctx, tag, 8, buf);
+}
+static inline int v3_chkpt_save_32(struct v3_chkpt_ctx * ctx, char * tag, void * buf) {
+    return v3_chkpt_save(ctx, tag, 4, buf);
+}
+static inline int v3_chkpt_save_16(struct v3_chkpt_ctx * ctx, char * tag, void * buf) {
+    return v3_chkpt_save(ctx, tag, 2, buf);
+}
+static inline int v3_chkpt_save_8(struct v3_chkpt_ctx * ctx, char * tag, void * buf) {
+    return v3_chkpt_save(ctx, tag, 1, buf);
+}
+
+static inline int v3_chkpt_load_64(struct v3_chkpt_ctx * ctx, char * tag, void * buf) {
+    return v3_chkpt_load(ctx, tag, 8, buf);
+}
+static inline int v3_chkpt_load_32(struct v3_chkpt_ctx * ctx, char * tag, void * buf) {
+    return v3_chkpt_load(ctx, tag, 4, buf);
+}
+static inline int v3_chkpt_load_16(struct v3_chkpt_ctx * ctx, char * tag, void * buf) {
+    return v3_chkpt_load(ctx, tag, 2, buf);
+}
+static inline int v3_chkpt_load_8(struct v3_chkpt_ctx * ctx, char * tag, void * buf) {
+    return v3_chkpt_load(ctx, tag, 1, buf);
+}
+
+
+
 int v3_chkpt_close_ctx(struct v3_chkpt_ctx * ctx);
 struct v3_chkpt_ctx * v3_chkpt_open_ctx(struct v3_chkpt * chkpt, struct v3_chkpt_ctx * parent, char * name);
 
 int v3_chkpt_save_vm(struct v3_vm_info * vm, char * store, char * url);
 int v3_chkpt_load_vm(struct v3_vm_info * vm, char * store, char * url);
 
+#ifdef V3_CONFIG_LIVE_MIGRATION
+int v3_chkpt_send_vm(struct v3_vm_info * vm, char * store, char * url);
+int v3_chkpt_receive_vm(struct v3_vm_info * vm, char * store, char * url);
+#endif
+
 int V3_init_checkpoint();
 int V3_deinit_checkpoint();