Expand description
Refuse to start the KVM backend under a finite address-space limit.
reverie-kvm reserves host address space for guest memory (its README,
“Host address space”): the guest memory size Hermit gives it for every
live guest process, once more while an exec validates its new image, and,
for an exited child, until the child’s host thread releases it, which can
be after the parent has gone on. RLIMIT_AS counts every reserved byte,
though only the pages a guest touches use memory. The peak therefore
follows the guest’s process tree and the host’s thread scheduling, and a
run under a finite limit stops wherever those put it: on the same command
one run completes and the next does not
(https://github.com/rrnewton/reverie/issues/1225). Hermit refuses such a
run before the guest starts instead, by name and on every run.
This is launch policy, about Hermit’s own process. It never raises the
limit, and it does not touch the guest’s view of RLIMIT_AS, which
Detcore models as before. The backend still refuses, by name, an exec
whose memory a host refuses for another reason (a limit lowered after
launch, vm.max_map_count), and the run ends on that refusal.
Structs§
- KvmAddress
Space Refusal - A named, pre-guest refusal of a finite
RLIMIT_ASon the KVM backend.
Functions§
- admit_
kvm_ address_ space - Refuses (
KvmAddressSpaceRefusal) when this process, which is about to run the KVM backend, has a finite softRLIMIT_AS; the backend would reserveguest_memory_bytesfor each guest memory.