Page MenuHomeFreeBSD

bhyveload: Factor global variables into a software context
Needs ReviewPublic

Authored by markj on Thu, Oct 8, 4:36 PM.
Tags
None
Referenced Files
F175495958: D60481.id189075.diff
Sun, Oct 11, 6:25 AM
F175489090: D60481.id189368.diff
Sun, Oct 11, 5:31 AM
F175474179: D60481.id189238.diff
Sun, Oct 11, 3:14 AM
F175473282: D60481.id189368.diff
Sun, Oct 11, 3:03 AM
F175459789: D60481.id189238.diff
Sun, Oct 11, 12:45 AM
F175398489: D60481.diff
Sat, Oct 10, 2:02 PM
Unknown Object (File)
Sat, Oct 10, 10:57 AM
Unknown Object (File)
Sat, Oct 10, 3:30 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 77965
Build 74848: 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.