Page MenuHomeFreeBSD

bhyve: Some fwctl simplifications.
ClosedPublic

Authored by jhb on Aug 1 2023, 8:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 8, 5:39 AM
Unknown Object (File)
Sun, Jun 29, 9:21 PM
Unknown Object (File)
Sun, Jun 29, 12:30 AM
Unknown Object (File)
Tue, Jun 24, 8:56 PM
Unknown Object (File)
Mon, Jun 16, 3:37 AM
Unknown Object (File)
Jun 11 2025, 1:53 PM
Unknown Object (File)
Apr 22 2025, 7:47 AM
Unknown Object (File)
Apr 21 2025, 11:37 AM

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 Skipped
Unit
Tests Skipped
Build Status
Buildable 52943
Build 49834: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Aug 1 2023, 8:26 PM
markj added inline comments.
usr.sbin/bhyve/fwctl.c
476

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

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

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.