diff options
Diffstat (limited to 'sys/amd64/vmm/vmm_dev.c')
-rw-r--r-- | sys/amd64/vmm/vmm_dev.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/amd64/vmm/vmm_dev.c b/sys/amd64/vmm/vmm_dev.c index 9818f300efece..e47b7081b7957 100644 --- a/sys/amd64/vmm/vmm_dev.c +++ b/sys/amd64/vmm/vmm_dev.c @@ -31,6 +31,8 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include "opt_bhyve_snapshot.h" + #include <sys/param.h> #include <sys/kernel.h> #include <sys/jail.h> @@ -53,8 +55,9 @@ __FBSDID("$FreeBSD$"); #include <machine/vmparam.h> #include <machine/vmm.h> -#include <machine/vmm_instruction_emul.h> #include <machine/vmm_dev.h> +#include <machine/vmm_instruction_emul.h> +#include <machine/vmm_snapshot.h> #include "vmm_lapic.h" #include "vmm_stat.h" @@ -381,6 +384,9 @@ vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, struct vm_cpu_topology *topology; uint64_t *regvals; int *regnums; +#ifdef BHYVE_SNAPSHOT + struct vm_snapshot_meta *snapshot_meta; +#endif error = vmm_priv_check(curthread->td_ucred); if (error) @@ -784,6 +790,15 @@ vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, &topology->threads, &topology->maxcpus); error = 0; break; +#ifdef BHYVE_SNAPSHOT + case VM_SNAPSHOT_REQ: + snapshot_meta = (struct vm_snapshot_meta *)data; + error = vm_snapshot_req(sc->vm, snapshot_meta); + break; + case VM_RESTORE_TIME: + error = vm_restore_time(sc->vm); + break; +#endif default: error = ENOTTY; break; |