summaryrefslogtreecommitdiff
path: root/usr/src/lib/libvmmapi/common/vmmapi.c
diff options
context:
space:
mode:
authorPatrick Mooney <pmooney@pfmooney.com>2020-07-18 19:49:51 +0000
committerPatrick Mooney <pmooney@oxide.computer>2020-08-20 19:19:51 +0000
commite0c0d44e917080841514d0dd031a696c74e8c435 (patch)
tree232fc454b760fd2fdced128fec0e84b065e4f025 /usr/src/lib/libvmmapi/common/vmmapi.c
parent76f19f5fdc974fe5be5c82a556e43a4df93f1de1 (diff)
downloadillumos-joyent-e0c0d44e917080841514d0dd031a696c74e8c435.tar.gz
12989 improve interface boundary for bhyve MMIO
12990 improve interface boundary for bhyve ins/outs 12991 bhyve vlapic should SIPI more carefully Reviewed by: Mike Zeller <mike.zeller@joyent.com> Reviewed by: Joshua M. Clulow <josh@sysmgr.org> Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Diffstat (limited to 'usr/src/lib/libvmmapi/common/vmmapi.c')
-rw-r--r--usr/src/lib/libvmmapi/common/vmmapi.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/usr/src/lib/libvmmapi/common/vmmapi.c b/usr/src/lib/libvmmapi/common/vmmapi.c
index 7d3446a845..6d5145431e 100644
--- a/usr/src/lib/libvmmapi/common/vmmapi.c
+++ b/usr/src/lib/libvmmapi/common/vmmapi.c
@@ -772,17 +772,16 @@ vm_get_register_set(struct vmctx *ctx, int vcpu, unsigned int count,
}
int
-vm_run(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit)
+vm_run(struct vmctx *ctx, int vcpu, const struct vm_entry *vm_entry,
+ struct vm_exit *vm_exit)
{
- int error;
- struct vm_run vmrun;
+ struct vm_entry entry;
- bzero(&vmrun, sizeof(vmrun));
- vmrun.cpuid = vcpu;
+ bcopy(vm_entry, &entry, sizeof (entry));
+ entry.cpuid = vcpu;
+ entry.exit_data = vm_exit;
- error = ioctl(ctx->fd, VM_RUN, &vmrun);
- bcopy(&vmrun.vm_exit, vmexit, sizeof(struct vm_exit));
- return (error);
+ return (ioctl(ctx->fd, VM_RUN, &entry));
}
int