| bc7862bc | 19-Feb-2026 |
Mark Johnston <markj@FreeBSD.org> |
vmm: Start using exterror
For now, just describe the error where an unprivileged user attempts to run a VM without DESTROY_ON_CLOSE semantics, i.e., monitor mode.
Reviewed by: bnovkov MFC after: 2
vmm: Start using exterror
For now, just describe the error where an unprivileged user attempts to run a VM without DESTROY_ON_CLOSE semantics, i.e., monitor mode.
Reviewed by: bnovkov MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54743
show more ...
|
| af099eaa | 19-Feb-2026 |
Mark Johnston <markj@FreeBSD.org> |
vmm: Enable unprivileged bhyve
- Add the vmm group. - Let /dev/vmmctl belong to the vmm group by default, and give group write permissions. - When creating a VM's device files, make them owned by
vmm: Enable unprivileged bhyve
- Add the vmm group. - Let /dev/vmmctl belong to the vmm group by default, and give group write permissions. - When creating a VM's device files, make them owned by the creating process' effective UID.
Reviewed by: bnovkov MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54741
show more ...
|
| 2d0564b9 | 03-Feb-2026 |
Mark Johnston <markj@FreeBSD.org> |
vmm: Remove an unneeded NULL pointer check
sc->vm is unconditionally dereferenced earlier in this function. No functional change intended.
Reviewed by: bnovkov MFC after: 1 week Differential Revis
vmm: Remove an unneeded NULL pointer check
sc->vm is unconditionally dereferenced earlier in this function. No functional change intended.
Reviewed by: bnovkov MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55069
show more ...
|
| 0aaa95ae | 09-Jan-2026 |
Mark Johnston <markj@FreeBSD.org> |
vmm: Add an include to vmm_ktr.h for vm_name()
Required when KTR is configured.
Remove the pcpu.h include while here, as it seems to be unneeded.
Reported by: Jenkins Fixes: 5f13d6b60740 ("vmm: M
vmm: Add an include to vmm_ktr.h for vm_name()
Required when KTR is configured.
Remove the pcpu.h include while here, as it seems to be unneeded.
Reported by: Jenkins Fixes: 5f13d6b60740 ("vmm: Move common accessors and vm_eventinfo into sys/dev/vmm")
show more ...
|
| 5f13d6b6 | 08-Jan-2026 |
Mark Johnston <markj@FreeBSD.org> |
vmm: Move common accessors and vm_eventinfo into sys/dev/vmm
Now that struct vm and struct vcpu are defined in headers, provide inline accessors. We could just remove the accessors outright, but th
vmm: Move common accessors and vm_eventinfo into sys/dev/vmm
Now that struct vm and struct vcpu are defined in headers, provide inline accessors. We could just remove the accessors outright, but they don't hurt and it would result in unneeded churn.
As a part of this, consolidate definitions related to struct vm_eventinfo as well. I'm not sure if struct vm_eventinfo is really needed anymore, now that vmmops_run implementations can directly access vm and vcpu fields, but this can be resolved later.
No functional change intended.
MFC after: 2 months Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53586
show more ...
|
| bd16bac2 | 06-Nov-2025 |
Bojan Novković <bnovkov@FreeBSD.org> |
vmm: Add ability to destroy VMs on close
This change adds the ability to tie a virtual machine's lifecycle to a /dev/vmmctl file descriptor. A user can request `vmmctl` to destroy a virtual machine
vmm: Add ability to destroy VMs on close
This change adds the ability to tie a virtual machine's lifecycle to a /dev/vmmctl file descriptor. A user can request `vmmctl` to destroy a virtual machine on close using the `VMMCTL_CREATE_DESTROY_ON_CLOSE` flag when creating the virtual machine. `vmmctl` tracks such virtual machines in per-descriptor lists.
Differential Revision: https://reviews.freebsd.org/D53729 Reviewed by: markj Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. MFC after: 3 months
show more ...
|
| 7377c87e | 04-Nov-2025 |
Mark Johnston <markj@FreeBSD.org> |
vmm: Consolidate VM name length checking
vm_create() is only called from one place. Rather than having similar checks everywhere, move them to vmmdev_create().
We can safely assume that the name i
vmm: Consolidate VM name length checking
vm_create() is only called from one place. Rather than having similar checks everywhere, move them to vmmdev_create().
We can safely assume that the name is nul-terminated, the vmmctl ioctl handler and the legacy sysctl handler ensure this. So, don't bother with strnlen().
Finally, make sure that the name buffers are the same size on all platforms. VM_MAX_NAMELEN is supposed to be the maximum, not including the nul terminator.
Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53422
show more ...
|
| e7580744 | 04-Nov-2025 |
Mark Johnston <markj@FreeBSD.org> |
vmm: Move the module load handler to vmm_dev.c
Move the vmm_initialized check out of vm_create() and into the legacy sysctl handler. If vmm_initialized is false, /dev/vmmctl will not be available a
vmm: Move the module load handler to vmm_dev.c
Move the vmm_initialized check out of vm_create() and into the legacy sysctl handler. If vmm_initialized is false, /dev/vmmctl will not be available and so cannot be used to create VMs.
Introduce new MD vmm_modinit() and vmm_modcleanup() routines which handle MD (de)initialization.
No functional change intended.
Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53421
show more ...
|
| e11768e9 | 21-Oct-2025 |
Mark Johnston <markj@FreeBSD.org> |
vmm: Add PRIV_DRIVER checks for passthru ioctls
In preparation for allowing non-root users to create and access bhyve VMs, add privilege checks for ioctls which operate on passthru devices.
Reviewe
vmm: Add PRIV_DRIVER checks for passthru ioctls
In preparation for allowing non-root users to create and access bhyve VMs, add privilege checks for ioctls which operate on passthru devices.
Reviewed by: corvink MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D53144
show more ...
|