Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/snapshot.h
Show All 39 Lines | |||||
#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_FILENAME PATH_MAX | #define MAX_SNAPSHOT_FILENAME PATH_MAX | ||||
#ifndef JSON_SNAPSHPT_V2 | |||||
#define JSON_SNAPSHOT_V2 | |||||
#endif | |||||
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; | ||||
Show All 15 Lines | |||||
struct vm_snapshot_dev_info { | struct vm_snapshot_dev_info { | ||||
const char *dev_name; /* device name */ | const char *dev_name; /* device name */ | ||||
vm_snapshot_dev_cb snapshot_cb; /* callback for device snapshot */ | vm_snapshot_dev_cb snapshot_cb; /* callback for device snapshot */ | ||||
vm_pause_dev_cb pause_cb; /* callback for device pause */ | vm_pause_dev_cb pause_cb; /* callback for device pause */ | ||||
vm_resume_dev_cb resume_cb; /* callback for device resume */ | vm_resume_dev_cb resume_cb; /* callback for device resume */ | ||||
}; | }; | ||||
#ifdef JSON_SNAPSHOT_V2 | |||||
struct vm_snapshot_kern_info { | struct vm_snapshot_kern_info { | ||||
const char *struct_name; /* kernel structure name*/ | const char *struct_name; /* kernel structure name*/ | ||||
enum snapshot_req req; /* request type */ | enum snapshot_req req; /* request type */ | ||||
vm_snapshot_dev_cb snapshot_cb; /* callback for device snapshot */ | |||||
}; | }; | ||||
#else | |||||
struct vm_snapshot_kern_info { | |||||
const char *struct_name; /* kernel structure name*/ | |||||
enum snapshot_req req; /* request type */ | |||||
}; | |||||
#endif | |||||
void destroy_restore_state(struct restore_state *rstate); | void destroy_restore_state(struct restore_state *rstate); | ||||
const char *lookup_vmname(struct restore_state *rstate); | const char *lookup_vmname(struct restore_state *rstate); | ||||
int lookup_memflags(struct restore_state *rstate); | int lookup_memflags(struct restore_state *rstate); | ||||
size_t lookup_memsize(struct restore_state *rstate); | size_t lookup_memsize(struct restore_state *rstate); | ||||
int lookup_guest_ncpus(struct restore_state *rstate); | int lookup_guest_ncpus(struct restore_state *rstate); | ||||
Show All 19 Lines |