diff options
| author | Neel Natu <neel@FreeBSD.org> | 2014-03-26 23:34:27 +0000 |
|---|---|---|
| committer | Neel Natu <neel@FreeBSD.org> | 2014-03-26 23:34:27 +0000 |
| commit | b15a09c05e35120a6ab7fef28229e0c45c105ff6 (patch) | |
| tree | 26d2d3b3da3f94b1b7988cb043cec70d34999f99 /lib/libvmmapi | |
| parent | 743c072a09a2ddef7ca4889cc6ce06f562260248 (diff) | |
Notes
Diffstat (limited to 'lib/libvmmapi')
| -rw-r--r-- | lib/libvmmapi/vmmapi.c | 7 | ||||
| -rw-r--r-- | lib/libvmmapi/vmmapi.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index 22b536a104ee..60d3105db206 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -342,6 +342,13 @@ vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *vmexit) return (error); } +int +vm_suspend(struct vmctx *ctx) +{ + + return (ioctl(ctx->fd, VM_SUSPEND, 0)); +} + static int vm_inject_exception_real(struct vmctx *ctx, int vcpu, int vector, int error_code, int error_code_valid) diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h index 085af94a00d9..ce150d8c3d5e 100644 --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -61,6 +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_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); |
