Page MenuHomeFreeBSD

bhyve: Generalize the IPC thread
ClosedPublic

Authored by bnovkov on Jan 11 2026, 1:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 27, 1:48 PM
Unknown Object (File)
Thu, Aug 27, 1:47 PM
Unknown Object (File)
Wed, Aug 26, 11:37 AM
Unknown Object (File)
Wed, Aug 26, 11:30 AM
Unknown Object (File)
Sun, Aug 23, 2:47 PM
Unknown Object (File)
Fri, Aug 14, 7:23 PM
Unknown Object (File)
Fri, Aug 14, 4:01 PM
Unknown Object (File)
Fri, Aug 14, 4:01 PM

Details

Summary

Move the code for the snapshotting IPC thread into a separate file
and define macros for adding new IPC commands.
No functional change intended.

Diff Detail

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

Event Timeline

only suggestions, not a request

usr.sbin/bhyve/ipc.c
61–75

what do you think about each ipc command constructing their own nvlist as a reply?

and then let handle_message() destroy the passed in nvl list?

there are two different class errors that can occur here, one is that the requested command is not supported and the second class is the handler encountered an error...might be worth being able to differentiate between those two different types of errors...only mentioning, your decision

99–111

looking at the suggested edit...then handle_message() would be responsible for destroying nvl and constructing the reply message.

Address @rew 's comments - change IPC command return type to nvlist_t.

bnovkov added inline comments.
usr.sbin/bhyve/ipc.c
61–75

Yeah, having the handler return a "reply" object makes more sense than reusing the one passed as an argument.
Thank you for the suggestion!

  • constify command nvlist_t argument
  • adapt vm_do_checkpoint to use the new return type
This revision was not accepted when it landed; it landed in state Needs Review.Sun, Aug 23, 12:03 PM
This revision was automatically updated to reflect the committed changes.