Page MenuHomeFreeBSD

vmm: Move the module load handler to vmm_dev.c
ClosedPublic

Authored by markj on Oct 28 2025, 8:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 21, 11:36 AM
Unknown Object (File)
Sun, Dec 21, 8:59 AM
Unknown Object (File)
Sat, Dec 20, 9:56 PM
Unknown Object (File)
Mon, Dec 15, 10:41 PM
Unknown Object (File)
Dec 9 2025, 5:07 AM
Unknown Object (File)
Dec 4 2025, 10:05 PM
Unknown Object (File)
Nov 8 2025, 4:43 PM
Unknown Object (File)
Oct 31 2025, 12:53 PM

Details

Summary

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_init() and vmm_cleanup() routines which handle MD
(de)initialization.

No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 68287
Build 65170: arc lint + arc unit

Event Timeline

markj requested review of this revision.Oct 28 2025, 8:30 PM

In the commit message do you want to vmm_init -> vmm_modinit, etc.? Generally looks fine to me though.

sys/arm64/include/vmm.h
177 ↗(On Diff #165258)

Can these prototypes go in a single place (<dev/vmm/vmm_dev.h>?)?

corvink added a subscriber: corvink.
corvink added inline comments.
sys/amd64/vmm/vmm.c
257

vmm_ipinum is already defined here.

This revision is now accepted and ready to land.Oct 30 2025, 7:45 AM
In D53421#1220311, @jhb wrote:

In the commit message do you want to vmm_init -> vmm_modinit, etc.? Generally looks fine to me though.

Fixed, thanks.

Handle review feedback:

  • Move vmm_modinit()/modcleanup() prototypes to vmm_dev.h.
  • Remove a stray definition for vmm_ipinum.
This revision now requires review to proceed.Oct 30 2025, 4:31 PM
This revision is now accepted and ready to land.Nov 3 2025, 7:15 AM
This revision was automatically updated to reflect the committed changes.