summaryrefslogtreecommitdiff
path: root/usr/src/cmd/bhyve/spinup_ap.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/bhyve/spinup_ap.c')
-rw-r--r--usr/src/cmd/bhyve/spinup_ap.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/usr/src/cmd/bhyve/spinup_ap.c b/usr/src/cmd/bhyve/spinup_ap.c
index ecdd05694c..80caafe78e 100644
--- a/usr/src/cmd/bhyve/spinup_ap.c
+++ b/usr/src/cmd/bhyve/spinup_ap.c
@@ -27,6 +27,18 @@
*
* $FreeBSD$
*/
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ *
+ * Copyright 2020 Oxide Computer Company
+ */
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -89,6 +101,7 @@ spinup_ap(struct vmctx *ctx, int vcpu, int newcpu, uint64_t rip)
fbsdrun_set_capabilities(ctx, newcpu);
+#ifdef __FreeBSD__
/*
* Enable the 'unrestricted guest' mode for 'newcpu'.
*
@@ -97,6 +110,9 @@ spinup_ap(struct vmctx *ctx, int vcpu, int newcpu, uint64_t rip)
*/
error = vm_set_capability(ctx, newcpu, VM_CAP_UNRESTRICTED_GUEST, 1);
assert(error == 0);
+#else
+ /* Unrestricted Guest is always enabled on illumos */
+#endif
spinup_ap_realmode(ctx, newcpu, &rip);