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
An application running inside the virtual machine can exit with an error status when it fails or crashes. We should start exposing this exit status to be readable by the host after the machine is halted, so the host is able to determine if the guest machine finished its application with success or failure.
Possible solutions
We need to edit our init script so it captures the exit status of the application and saves this exit status in a machine CSR before halting. The first obvious solution would be creating a new poweroff utility that halts the machine while saving the exit status.
Linux accepts a string when the reboot syscall is invoked with: LINUX_REBOOT_CMD_RESTART2, could be a way to extract the status code of applications.
It would need a patch to arch/riscv/kernel/reset.c:machine_restart to remove the infinite loop and pass something useful down to sbi_shutdown.
Context
An application running inside the virtual machine can exit with an error status when it fails or crashes. We should start exposing this exit status to be readable by the host after the machine is halted, so the host is able to determine if the guest machine finished its application with success or failure.
Possible solutions
We need to edit our init script so it captures the exit status of the application and saves this exit status in a machine CSR before halting. The first obvious solution would be creating a new
poweroff
utility that halts the machine while saving the exit status.The text was updated successfully, but these errors were encountered: