diff options
| author | Neel Natu <neel@FreeBSD.org> | 2014-04-28 22:06:40 +0000 |
|---|---|---|
| committer | Neel Natu <neel@FreeBSD.org> | 2014-04-28 22:06:40 +0000 |
| commit | f0fdcfe247c3927f40b1612388f9a35973d56728 (patch) | |
| tree | 2a5755c72feac26b7524cca10dc7e5475e332ee8 /lib/libvmmapi | |
| parent | 70b7e330c6da51d24f6719e06bec3c5cee4f8f25 (diff) | |
Notes
Diffstat (limited to 'lib/libvmmapi')
| -rw-r--r-- | lib/libvmmapi/vmmapi.c | 7 | ||||
| -rw-r--r-- | lib/libvmmapi/vmmapi.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index 60d3105db2063..4a7f852c6ffc0 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -343,10 +343,13 @@ vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *vmexit) } int -vm_suspend(struct vmctx *ctx) +vm_suspend(struct vmctx *ctx, enum vm_suspend_how how) { + struct vm_suspend vmsuspend; - return (ioctl(ctx->fd, VM_SUSPEND, 0)); + bzero(&vmsuspend, sizeof(vmsuspend)); + vmsuspend.how = how; + return (ioctl(ctx->fd, VM_SUSPEND, &vmsuspend)); } static int diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h index ed63fb20259e3..2a2ca6b7f9dca 100644 --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -61,7 +61,7 @@ int vm_set_register(struct vmctx *ctx, int vcpu, int reg, uint64_t val); int vm_get_register(struct vmctx *ctx, int vcpu, int reg, uint64_t *retval); int vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *ret_vmexit); -int vm_suspend(struct vmctx *ctx); +int vm_suspend(struct vmctx *ctx, enum vm_suspend_how how); int vm_apicid2vcpu(struct vmctx *ctx, int apicid); int vm_inject_exception(struct vmctx *ctx, int vcpu, int vec); int vm_inject_exception2(struct vmctx *ctx, int vcpu, int vec, int errcode); |
