diff options
author | Patrick Mooney <pmooney@pfmooney.com> | 2021-08-16 21:04:25 +0000 |
---|---|---|
committer | Patrick Mooney <pmooney@oxide.computer> | 2021-09-28 16:17:31 +0000 |
commit | 52fac30e3e977464254b44b1dfb4717fb8d2fbde (patch) | |
tree | 5e0175c25bbd9ac3fcaa7e52cc1bcaafac4ab70c /usr/src/lib/libvmmapi/common/vmmapi.c | |
parent | bf0dcd3f9893153e708295693e9015919b00112b (diff) | |
download | illumos-joyent-52fac30e3e977464254b44b1dfb4717fb8d2fbde.tar.gz |
14024 bhyve vm_suspend should be more flexible
Reviewed by: Dan Cross <cross@oxidecomputer.com>
Reviewed by: Luqman Aden <luqman@oxide.computer>
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib/libvmmapi/common/vmmapi.c')
-rw-r--r-- | usr/src/lib/libvmmapi/common/vmmapi.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/usr/src/lib/libvmmapi/common/vmmapi.c b/usr/src/lib/libvmmapi/common/vmmapi.c index ec27949a43..c074d999c6 100644 --- a/usr/src/lib/libvmmapi/common/vmmapi.c +++ b/usr/src/lib/libvmmapi/common/vmmapi.c @@ -822,12 +822,24 @@ vm_suspend(struct vmctx *ctx, enum vm_suspend_how how) return (ioctl(ctx->fd, VM_SUSPEND, &vmsuspend)); } +#ifndef __FreeBSD__ +int +vm_reinit(struct vmctx *ctx, uint64_t flags) +{ + struct vm_reinit reinit = { + .flags = flags + }; + + return (ioctl(ctx->fd, VM_REINIT, &reinit)); +} +#else int vm_reinit(struct vmctx *ctx) { return (ioctl(ctx->fd, VM_REINIT, 0)); } +#endif int vm_inject_exception(struct vmctx *ctx, int vcpu, int vector, int errcode_valid, |