Native server activation and supervision¶
The native supervisor starts userspace servers, grants their capabilities, and manages their lifecycle. The kernel enforces those capabilities and provides task and IPC mechanisms. The existing boot supervisor and its recovery paths are described in Service lifecycle and failure.
Required and optional servers¶
The build declares required services for each boot profile and computes their dependency closure. The selected root filesystem can change which servers are required. The boot archive supplies the resident images. The supervisor starts each dependency group in provider order and waits for each provider’s readiness before starting a dependent.
The RISC-V UEFI profile requires VM, VirtIO block, GPT, the selected root
filesystem, msdosfs for the ESP, and VFS. The profile also makes inet
and virtio-net resident by default. Configure
--native-network-required=n to manage these two servers as one optional
activation group on the native filesystem. Both server names address
that group for lifecycle changes and identify individual instances in
status output. Optional server images are readable by root and have no
execute permission for native applications.
Required services are kept running. Their immutable recovery images and the resources needed to restart them stay resident so recovery can proceed while the pager, VFS, or storage chain is unavailable. The supervisor owns their replacement and rejects ordinary administrative requests to stop or disable them. Replacing the required set is a boot-profile change.
Optional services are installed on the native filesystem. Their executables, address spaces, and private buffers are brought into use when started. An optional service can start during boot after its dependencies are ready, on an explicit administrative request, or on the first authorized use when demand activation is enabled. A profile can supply default activation policies for installed optional services. The administrator can override those defaults through the system’s persistent activation configuration.
Administration¶
serverctl addresses registered native servers by name through the
supervisor’s process IPC endpoint. The supervisor identifies the sender
using the endpoint badge. Status is available to authenticated processes.
Start, stop, and restart require effective UID 0, and policy changes
require write access to root’s configuration file. The FreeBSD service(8) command
is the interface to rc.d scripts. An rc.d script can request
native server operations through serverctl.
serverctl listandserverctl status NAMEreport whether a server is required, its activation policy, and its current state.serverctl start NAMErequests an instance and waits for readiness.serverctl stop NAMEdrains the current instance.serverctl restart NAMEcompletes the stop before starting a replacement.serverctl debug NAMElets root attach the resident serial agent to a running instance on RV64. It temporarily reserves the console and defers supervision under the bounded Live userspace debugging lease.serverctl enable NAMEselects automatic startup at boot.serverctl enable --on-demand NAMEselects demand startup.serverctl disable NAMEreturns the server to manual activation. These policy commands determine future activation. Starting or stopping a running instance is a separate operation. Policy changes on the development disk require--native-root-writable=y. The/etc/serverctl.conffile stores the network group’s policy. A missing file defaults to manual activation.
VFS serializes a network stop with descriptor creation. It refuses the stop while a live socket refers to the current instance, including a descriptor in transit. Otherwise it removes the route before the supervisor retires the servers. The kernel resets the device while its DMA pages are still pinned. Retirement revokes endpoints, completes remaining calls with an error, and releases the task mappings and transfer pages. Subsequent starts receive fresh capabilities.
Demand startup and branded zones¶
Resolve and authorize the request against the registered service and its activation policy before allocating an instance. Concurrent requests for the same instance share a startup attempt and wait for readiness, subject to a deadline. Startup failure releases the instance’s partial resources and reports the failure to the waiting callers. For networking, a socket request that finds the VFS route unbound can request activation after returning from VFS. The supervisor serializes these calls and attaches the route only after startup succeeds. It retains a failure for subsequent demand calls until an administrator requests a fresh start or the supervisor observes a policy change. Socket operations continue through the established VFS route.
When launching a foreign executable, the loader selects the brand and zone and checks the launch policy. It can request a demand-started personality for that zone if the administrator has enabled it. The supervisor publishes the ready personality endpoint before the loader starts the foreign process. With manual activation, the administrator starts the personality before launching its applications. See Foreign executable and application ABIs for personality selection and syscall dispatch.
See also