Page MenuHomeFreeBSD

bhyveload: Factor global variables into a software context
AcceptedPublic

Authored by markj on Thu, Oct 8, 4:36 PM.
Tags
None
Referenced Files
F176318294: D60481.diff
Sat, Oct 17, 9:21 PM
Unknown Object (File)
Sat, Oct 17, 7:10 PM
Unknown Object (File)
Fri, Oct 16, 6:13 PM
Unknown Object (File)
Fri, Oct 16, 12:31 PM
Unknown Object (File)
Fri, Oct 16, 10:24 AM
Unknown Object (File)
Thu, Oct 15, 2:50 AM
Unknown Object (File)
Thu, Oct 15, 1:51 AM
Unknown Object (File)
Thu, Oct 15, 1:09 AM

Details

Reviewers
kevans
novel
Group Reviewers
bhyve
Summary

This will make it easier to port bhyveload's functionality into the main
bhyve executable.

No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77907
Build 74790: arc lint + arc unit

Event Timeline

markj requested review of this revision.Thu, Oct 8, 4:36 PM
wanpengqian_gmail.com added inline comments.
usr.sbin/bhyveload/bhyveload.c
594

This restores sc->term, but main() has already run cfmakeraw() on it. The old code kept a separate oldterm, so this now restores the raw settings, and the terminal is left in raw mode when bhyveload exits.

usr.sbin/bhyveload/bhyveload.c
996–998

loader_hdl is now a non-volatile local that is assigned after setjmp(), so its value is indeterminate here after longjmp(). The swap-interpreter and reboot paths may dlclose() garbage.

markj marked 2 inline comments as done.

Address review comments

usr.sbin/bhyveload/bhyveload.c
872

should it be void * volatile instead, i.e. volatile pointer rather than pointer to volatile data as it is now?

Fix the qualifier on loader_hdl.

This revision is now accepted and ready to land.Tue, Oct 13, 1:38 PM