Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102142835
D28410.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28410.diff
View Options
diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h
--- a/lib/libvmmapi/vmmapi.h
+++ b/lib/libvmmapi/vmmapi.h
@@ -255,19 +255,6 @@
/*
* Save and restore
*/
-
-#define MAX_SNAPSHOT_VMNAME 100
-
-enum checkpoint_opcodes {
- START_CHECKPOINT = 0,
- START_SUSPEND = 1,
-};
-
-struct checkpoint_op {
- unsigned int op;
- char snapshot_filename[MAX_SNAPSHOT_VMNAME];
-};
-
int vm_snapshot_req(struct vm_snapshot_meta *meta);
int vm_restore_time(struct vmctx *ctx);
diff --git a/usr.sbin/bhyve/snapshot.h b/usr.sbin/bhyve/snapshot.h
--- a/usr.sbin/bhyve/snapshot.h
+++ b/usr.sbin/bhyve/snapshot.h
@@ -42,6 +42,8 @@
#include <libxo/xo.h>
#include <ucl.h>
+#define MAX_SNAPSHOT_VMNAME 100
+
struct vmctx;
struct restore_state {
@@ -57,6 +59,16 @@
ucl_object_t *meta_root_obj;
};
+enum checkpoint_opcodes {
+ START_CHECKPOINT = 0,
+ START_SUSPEND = 1,
+};
+
+struct checkpoint_op {
+ unsigned int op;
+ char snapshot_filename[MAX_SNAPSHOT_VMNAME];
+};
+
struct checkpoint_thread_info {
struct vmctx *ctx;
int socket_fd;
diff --git a/usr.sbin/bhyvectl/Makefile b/usr.sbin/bhyvectl/Makefile
--- a/usr.sbin/bhyvectl/Makefile
+++ b/usr.sbin/bhyvectl/Makefile
@@ -18,6 +18,10 @@
.if ${MK_BHYVE_SNAPSHOT} != "no"
CFLAGS+= -DBHYVE_SNAPSHOT
+
+# usr.sbin/bhyve/snapshot.h needs ucl header
+CFLAGS+= -I${SRCTOP}/contrib/libucl/include
+CFLAGS+= -I${SRCTOP}/usr.sbin/bhyve
.endif
.include <bsd.prog.mk>
diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c
--- a/usr.sbin/bhyvectl/bhyvectl.c
+++ b/usr.sbin/bhyvectl/bhyvectl.c
@@ -63,6 +63,10 @@
#include "amd/vmcb.h"
#include "intel/vmcs.h"
+#ifdef BHYVE_SNAPSHOT
+#include "snapshot.h"
+#endif
+
#define MB (1UL << 20)
#define GB (1UL << 30)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 3:50 AM (21 h, 49 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14533311
Default Alt Text
D28410.diff (1 KB)
Attached To
Mode
D28410: libvmm: clean up vmmapi.h
Attached
Detach File
Event Timeline
Log In to Comment