summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/libvmmapi/common/mapfile-vers3
-rw-r--r--usr/src/lib/libvmmapi/common/vmmapi.c8
-rw-r--r--usr/src/lib/libvmmapi/common/vmmapi.h3
3 files changed, 12 insertions, 2 deletions
diff --git a/usr/src/lib/libvmmapi/common/mapfile-vers b/usr/src/lib/libvmmapi/common/mapfile-vers
index be0a055490..e6468c36fb 100644
--- a/usr/src/lib/libvmmapi/common/mapfile-vers
+++ b/usr/src/lib/libvmmapi/common/mapfile-vers
@@ -11,7 +11,7 @@
#
# Copyright 2013 Pluribus Networks Inc.
-# Copyright 2019 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
# Copyright 2020 Oxide Computer Company
#
@@ -37,6 +37,7 @@ SYMBOL_VERSION ILLUMOSprivate {
vm_activate_cpu;
vm_active_cpus;
vm_apicid2vcpu;
+ vm_arc_resv;
vm_assign_pptdev;
vm_capability_name2type;
vm_capability_type2name;
diff --git a/usr/src/lib/libvmmapi/common/vmmapi.c b/usr/src/lib/libvmmapi/common/vmmapi.c
index fcb098a74f..0d084b9cd5 100644
--- a/usr/src/lib/libvmmapi/common/vmmapi.c
+++ b/usr/src/lib/libvmmapi/common/vmmapi.c
@@ -1909,6 +1909,14 @@ vm_set_run_state(struct vmctx *ctx, int vcpu, enum vcpu_run_state state,
return (0);
}
+int
+vm_arc_resv(struct vmctx *ctx, size_t len)
+{
+ if (ioctl(ctx->fd, VM_ARC_RESV, (uint64_t)len) != 0) {
+ return (errno);
+ }
+ return (0);
+}
#endif /* __FreeBSD__ */
#ifdef __FreeBSD__
diff --git a/usr/src/lib/libvmmapi/common/vmmapi.h b/usr/src/lib/libvmmapi/common/vmmapi.h
index 72e43a4e3d..cad555e498 100644
--- a/usr/src/lib/libvmmapi/common/vmmapi.h
+++ b/usr/src/lib/libvmmapi/common/vmmapi.h
@@ -38,7 +38,7 @@
* http://www.illumos.org/license/CDDL.
*
* Copyright 2015 Pluribus Networks Inc.
- * Copyright 2019 Joyent, Inc.
+ * Copyright 2020 Joyent, Inc.
* Copyright 2020 Oxide Computer Company
*/
@@ -310,6 +310,7 @@ int vm_get_run_state(struct vmctx *ctx, int vcpu, enum vcpu_run_state *state,
uint8_t *sipi_vector);
int vm_set_run_state(struct vmctx *ctx, int vcpu, enum vcpu_run_state state,
uint8_t sipi_vector);
+int vm_arc_resv(struct vmctx *ctx, size_t);
#endif /* __FreeBSD__ */
#ifdef __FreeBSD__