summaryrefslogtreecommitdiffstats
path: root/lib/libvmmapi/vmmapi.c
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2014-06-07 21:36:52 +0000
committerneel <neel@FreeBSD.org>2014-06-07 21:36:52 +0000
commit80a67d54c42b7f1e683d37864b9634e252d32ef1 (patch)
tree87873f56f85dfd15e0b36f4a2e884ae8dbcb74b3 /lib/libvmmapi/vmmapi.c
parent39548e640ff6f29c6f53200627311914539728c3 (diff)
downloadFreeBSD-src-80a67d54c42b7f1e683d37864b9634e252d32ef1.zip
FreeBSD-src-80a67d54c42b7f1e683d37864b9634e252d32ef1.tar.gz
Add ioctl(VM_REINIT) to reinitialize the virtual machine state maintained
by vmm.ko. This allows the virtual machine to be restarted without having to destroy it first. Reviewed by: grehan
Diffstat (limited to 'lib/libvmmapi/vmmapi.c')
-rw-r--r--lib/libvmmapi/vmmapi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c
index 89c7825..5ce3d8e 100644
--- a/lib/libvmmapi/vmmapi.c
+++ b/lib/libvmmapi/vmmapi.c
@@ -367,6 +367,13 @@ vm_suspend(struct vmctx *ctx, enum vm_suspend_how how)
return (ioctl(ctx->fd, VM_SUSPEND, &vmsuspend));
}
+int
+vm_reinit(struct vmctx *ctx)
+{
+
+ return (ioctl(ctx->fd, VM_REINIT, 0));
+}
+
static int
vm_inject_exception_real(struct vmctx *ctx, int vcpu, int vector,
int error_code, int error_code_valid)
OpenPOWER on IntegriCloud