You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
riscv spawn: halt/reboot must HART_STOP every hart, never SRST #25
Part of the RISC-V port. Prerequisite for the first spawn boot that reaches userspace.
machine_halt(), machine_power_off() and machine_restart() in arch/riscv/kernel/reset.c end in sbi_srst_reset() (SRST extension) or legacy SBI_EXT_0_1_SHUTDOWN, both of which act on the whole machine. A spawn kernel running the stock path powers off or resets the host.
Spawn-side override (mirror of mk_spawn_reboot_init() in arch/x86/multikernel/spawn.c:1732): halt/power-off/restart = every hart calls HART_STOP; the last hart too. Never SRST, never legacy shutdown, never emergency_restart() through SRST.
Skip register_platform_power_off(sbi_shutdown) (sbi.c:151) and the sbi_srst_reboot_nb notifier when booted as a spawn.
smp_send_stop() parks other harts in wait_for_interrupt() inside the image (arch/riscv/kernel/smp.c:86), the "hart still executing the image we are about to overwrite" hazard. Route the stop handler to HART_STOP in a spawn.
panic() paths: panic_timeout reboot must also go through the override.
mk_instance_settle_halted() completion = HART_STATUS == STOPPED for every instance hart.
Test: poweroff and reboot inside a spawn leave the host running and every instance hart STOPPED.
i’m taking this as part of the #23-#26 RISC-V lifecycle and loader series. i’ll coordinate with @nickolaev and stack the work on #22 once the architecture foundation is available.
Activity
pro-utkarshM commentedon Aug 26, 2026
i’m taking this as part of the #23-#26 RISC-V lifecycle and loader series. i’ll coordinate with @nickolaev and stack the work on #22 once the architecture foundation is available.
riscv: contain multikernel spawn shutdown paths