Page MenuHomeFreeBSD

bhyveload: support guest rebooting from the loader
ClosedPublic

Authored by kevans on Jan 4 2024, 2:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 25, 3:05 PM
Unknown Object (File)
Thu, May 9, 10:58 PM
Unknown Object (File)
Thu, May 9, 10:58 PM
Unknown Object (File)
Thu, May 9, 2:24 PM
Unknown Object (File)
Tue, May 7, 11:34 PM
Unknown Object (File)
Mar 19 2024, 7:00 AM
Unknown Object (File)
Mar 19 2024, 7:00 AM
Unknown Object (File)
Mar 19 2024, 6:59 AM
Subscribers

Details

Summary

userboot has a EXIT_REBOOT code that it uses when the 'reboot' loader
command is executed. Use that and longjmp back to reinit the VM
entirely with a reboot request. This fixes the 'reboot' option in the
loader menu to actually reboot rather than shutdown the VM.

The JMP_* constants are introduced to keep track of why we're doing a
longjmp, though they aren't currently used. We'll notably still do a
complete reload of the interpreter to give the rebooted VM that new
loader smell. It just seemed forward thinking to just keep track of the
different setjmp points.

While we're here, we don't actually need to keep the fd we passed to
fdlopen(3), so let's avoid leaking it.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable