diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2026-02-19 14:39:12 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2026-02-19 17:16:15 +0000 |
| commit | bc7862bc916c3b81bcdc374e5144ab2f5bf62b19 (patch) | |
| tree | 6799ac1837f9bd3c5092938ae502c0fa2dd037f3 /sys/dev/vmm | |
| parent | d26c8ae527bbf2cc3da98c0857f634f162622752 (diff) | |
Diffstat (limited to 'sys/dev/vmm')
| -rw-r--r-- | sys/dev/vmm/vmm_dev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c index 0e5477745db5..ed8e5b2e0777 100644 --- a/sys/dev/vmm/vmm_dev.c +++ b/sys/dev/vmm/vmm_dev.c @@ -8,6 +8,8 @@ #include <sys/param.h> #include <sys/conf.h> +#define EXTERR_CATEGORY EXTERR_CAT_VMM +#include <sys/exterrvar.h> #include <sys/fcntl.h> #include <sys/ioccom.h> #include <sys/jail.h> @@ -1010,7 +1012,8 @@ vmmdev_create(const char *name, uint32_t flags, struct ucred *cred) if ((flags & VMMCTL_CREATE_DESTROY_ON_CLOSE) == 0 && (error = priv_check_cred(cred, PRIV_VMM_CREATE)) != 0) { sx_xunlock(&vmmdev_mtx); - return (error); + return (EXTERROR(error, + "An unprivileged user must run VMs in monitor mode")); } if (!chgvmmcnt(cred->cr_ruidinfo, 1, vm_maxvmms)) { |
