Page MenuHomeFreeBSD

D40106.diff
No OneTemporary

D40106.diff

diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -1512,7 +1512,7 @@
#ifdef BHYVE_SNAPSHOT
if (restore_file != NULL) {
fprintf(stdout, "Pausing pci devs...\r\n");
- if (vm_pause_user_devs() != 0) {
+ if (vm_pause_devices() != 0) {
fprintf(stderr, "Failed to pause PCI device state.\n");
exit(1);
}
@@ -1524,7 +1524,7 @@
}
fprintf(stdout, "Restoring pci devs...\r\n");
- if (vm_restore_user_devs(&rstate) != 0) {
+ if (vm_restore_devices(&rstate) != 0) {
fprintf(stderr, "Failed to restore PCI device state.\n");
exit(1);
}
@@ -1536,7 +1536,7 @@
}
fprintf(stdout, "Resuming pci devs...\r\n");
- if (vm_resume_user_devs() != 0) {
+ if (vm_resume_devices() != 0) {
fprintf(stderr, "Failed to resume PCI device state.\n");
exit(1);
}
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
@@ -95,9 +95,9 @@
int restore_vm_mem(struct vmctx *ctx, struct restore_state *rstate);
int vm_restore_kern_structs(struct vmctx *ctx, struct restore_state *rstate);
-int vm_restore_user_devs(struct restore_state *rstate);
-int vm_pause_user_devs(void);
-int vm_resume_user_devs(void);
+int vm_restore_devices(struct restore_state *rstate);
+int vm_pause_devices(void);
+int vm_resume_devices(void);
int get_checkpoint_msg(int conn_fd, struct vmctx *ctx);
void *checkpoint_thread(void *param);
diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c
--- a/usr.sbin/bhyve/snapshot.c
+++ b/usr.sbin/bhyve/snapshot.c
@@ -856,7 +856,7 @@
}
static int
-vm_restore_user_dev(struct restore_state *rstate,
+vm_restore_device(struct restore_state *rstate,
const struct vm_snapshot_dev_info *info)
{
void *dev_ptr;
@@ -901,15 +901,14 @@
return (0);
}
-
int
-vm_restore_user_devs(struct restore_state *rstate)
+vm_restore_devices(struct restore_state *rstate)
{
size_t i;
int ret;
for (i = 0; i < nitems(snapshot_devs); i++) {
- ret = vm_restore_user_dev(rstate, &snapshot_devs[i]);
+ ret = vm_restore_device(rstate, &snapshot_devs[i]);
if (ret != 0)
return (ret);
}
@@ -918,7 +917,7 @@
}
int
-vm_pause_user_devs(void)
+vm_pause_devices(void)
{
const struct vm_snapshot_dev_info *info;
size_t i;
@@ -938,7 +937,7 @@
}
int
-vm_resume_user_devs(void)
+vm_resume_devices(void)
{
const struct vm_snapshot_dev_info *info;
size_t i;
@@ -1090,7 +1089,7 @@
}
static int
-vm_snapshot_user_dev(const struct vm_snapshot_dev_info *info,
+vm_snapshot_device(const struct vm_snapshot_dev_info *info,
int data_fd, xo_handle_t *xop,
struct vm_snapshot_meta *meta, off_t *offset)
{
@@ -1112,7 +1111,7 @@
}
static int
-vm_snapshot_user_devs(int data_fd, xo_handle_t *xop)
+vm_snapshot_devices(int data_fd, xo_handle_t *xop)
{
int ret;
off_t offset;
@@ -1152,7 +1151,7 @@
meta->buffer.buf = meta->buffer.buf_start;
meta->buffer.buf_rem = meta->buffer.buf_size;
- ret = vm_snapshot_user_dev(&snapshot_devs[i], data_fd, xop,
+ ret = vm_snapshot_device(&snapshot_devs[i], data_fd, xop,
meta, &offset);
if (ret != 0)
goto snapshot_err;
@@ -1294,7 +1293,7 @@
vm_vcpu_pause(ctx);
- ret = vm_pause_user_devs();
+ ret = vm_pause_devices();
if (ret != 0) {
fprintf(stderr, "Could not pause devices\r\n");
error = ret;
@@ -1322,7 +1321,7 @@
goto done;
}
- ret = vm_snapshot_user_devs(kdata_fd, xop);
+ ret = vm_snapshot_devices(kdata_fd, xop);
if (ret != 0) {
fprintf(stderr, "Failed to snapshot device state.\n");
error = -1;
@@ -1337,7 +1336,7 @@
}
done:
- ret = vm_resume_user_devs();
+ ret = vm_resume_devices();
if (ret != 0)
fprintf(stderr, "Could not resume devices\r\n");
vm_vcpu_resume(ctx);

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 26, 9:10 AM (21 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12822416
Default Alt Text
D40106.diff (3 KB)

Event Timeline