Page MenuHomeFreeBSD

bhyve: Some fwctl simplifications.
ClosedPublic

Authored by jhb on Aug 1 2023, 8:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 18 2024, 6:21 PM
Unknown Object (File)
May 4 2024, 7:56 PM
Unknown Object (File)
May 4 2024, 1:23 PM
Unknown Object (File)
Feb 20 2024, 7:16 AM
Unknown Object (File)
Jan 11 2024, 8:32 AM
Unknown Object (File)
Dec 20 2023, 8:00 AM
Unknown Object (File)
Dec 12 2023, 12:13 AM
Unknown Object (File)
Oct 24 2023, 11:07 PM

Details

Summary
  • Collapse IDENT_SEND/IDENT_WAIT states down to a single state.
  • Remove unused 'len' argument to op_data callback. The value passed in (total amount of remaining data to receive) didn't seem very useful and no op_data implementations used it.

Diff Detail

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

Event Timeline

jhb requested review of this revision.Aug 1 2023, 8:26 PM
markj added inline comments.
usr.sbin/bhyve/fwctl.c
476 ↗(On Diff #125451)

So after this change, guests don't have to explicitly reset the state machine before reading the signature, but doing so is harmless. Ok, that seems fine.

This revision is now accepted and ready to land.Aug 4 2023, 2:08 PM
usr.sbin/bhyve/fwctl.c
476 ↗(On Diff #125451)

Humm, well, I hadn't quite realized that behavior change, but yes, I do think it's fine.

corvink added a subscriber: corvink.

IMHO, we should get rid of fwctl. It was broken for years (https://github.com/freebsd/freebsd-src/commit/8ec366ec6c943550a011effe50bc73e3875f8ead) and nobody noticed it. So, there can't be any users.

Additionally, fwcfg serves the same use case and is a common standard.

usr.sbin/bhyve/fwctl.c
476 ↗(On Diff #125451)

Reading the signature without resetting the state machine only works for the first io read at boot up. So guests shouldn't rely on that behaviour!

This revision was automatically updated to reflect the committed changes.