Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/snapshot.h
Show All 37 Lines | |||||
#ifndef _BHYVE_SNAPSHOT_ | #ifndef _BHYVE_SNAPSHOT_ | ||||
#define _BHYVE_SNAPSHOT_ | #define _BHYVE_SNAPSHOT_ | ||||
#include <machine/vmm_snapshot.h> | #include <machine/vmm_snapshot.h> | ||||
#include <libxo/xo.h> | #include <libxo/xo.h> | ||||
#include <ucl.h> | #include <ucl.h> | ||||
#define BHYVE_RUN_DIR "/var/run/bhyve/" | #define BHYVE_RUN_DIR "/var/run/bhyve/" | ||||
#define MAX_SNAPSHOT_VMNAME 100 | #define MAX_SNAPSHOT_FILENAME NAME_MAX | ||||
struct vmctx; | struct vmctx; | ||||
struct restore_state { | struct restore_state { | ||||
int kdata_fd; | int kdata_fd; | ||||
int vmmem_fd; | int vmmem_fd; | ||||
void *kdata_map; | void *kdata_map; | ||||
size_t kdata_len; | size_t kdata_len; | ||||
size_t vmmem_len; | size_t vmmem_len; | ||||
struct ucl_parser *meta_parser; | struct ucl_parser *meta_parser; | ||||
ucl_object_t *meta_root_obj; | ucl_object_t *meta_root_obj; | ||||
}; | }; | ||||
enum ipc_opcode { | enum ipc_opcode { | ||||
START_CHECKPOINT, | START_CHECKPOINT, | ||||
START_SUSPEND, | START_SUSPEND, | ||||
}; | }; | ||||
struct checkpoint_op { | struct checkpoint_op { | ||||
unsigned int op; | unsigned int op; | ||||
char snapshot_filename[MAX_SNAPSHOT_VMNAME]; | char snapshot_filename[MAX_SNAPSHOT_FILENAME]; | ||||
}; | }; | ||||
struct checkpoint_thread_info { | struct checkpoint_thread_info { | ||||
struct vmctx *ctx; | struct vmctx *ctx; | ||||
int socket_fd; | int socket_fd; | ||||
}; | }; | ||||
typedef int (*vm_snapshot_dev_cb)(struct vm_snapshot_meta *); | typedef int (*vm_snapshot_dev_cb)(struct vm_snapshot_meta *); | ||||
Show All 40 Lines |