§H.12 step 2: session-slot table, session_find/session_register
src/starkernel/vm/session.c: kmalloc'd-at-boot slot table sized from stadium_max_vm_count() (mirrors stadium.c's own StadiumVMQuota, not a fixed compile-time array as originally planned -- that table was already moved off a fixed array for the same "population isn't knowable in advance" reason). session_boot_init()/session_find()/session_register() implemented for real, no stubs; session_register() zeroes identity and leaves pinned=0, matching VMIdentity's own documented default and deferring pin policy to callers. Added session.c to Makefile.starkernel's explicit source lists. No callers yet. Verified 3-arch boot to ok> (amd64/aarch64/riscv64). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
668e36bb17
commit
6d9fe3f515
+9
-2
@@ -3946,8 +3946,15 @@ work, not new invention.
|
||||
embedded)}`. Type only, no logic. No callers yet, so this acceptance run only confirms the
|
||||
header itself is syntactically clean and doesn't break the build. Verified 3-arch boot to
|
||||
`ok>` (amd64/aarch64/riscv64).
|
||||
2. `src/starkernel/vm/session.c`: fixed-size global session-slot array +
|
||||
`session_find(VMUuid)`/`session_register(...)` skeleton. No callers yet.
|
||||
2. **DONE 2026-09-03, one deviation from the original wording.** `src/starkernel/vm/session.c`
|
||||
+ `session_boot_init()`/`session_find(VMUuid)`/`session_register(...)`. Not a fixed-size
|
||||
array as originally written here — found `stadium.c`'s own `StadiumVMQuota` table had
|
||||
already been moved off a fixed array to a `kmalloc`'d-at-boot, budget-sized one (same
|
||||
"population isn't knowable in advance" reasoning), so `session.c` mirrors that current
|
||||
precedent instead: `session_boot_init()` sizes the slot table from `stadium_max_vm_count()`,
|
||||
must run after `stadium_boot_init()`. Added `session.c` to `Makefile.starkernel`'s explicit
|
||||
`LOADER_EXTRA_SRCS`/`KERNEL_EXTRA_SRCS` list (not a wildcard build). No callers yet.
|
||||
Verified 3-arch boot to `ok>`.
|
||||
3. `session_set_pinned()`/`session_is_pinned()` — the pin-authority choke point (H.2/H.10):
|
||||
writes/reads `Session.pinned`, syncs `STADIUM_FLAG_PIN` on that VM's patron cell.
|
||||
4. Rewire `stadium_birth_hera()` to register through `session_register()`/
|
||||
|
||||
Reference in New Issue
Block a user