Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize fw_cfg emulation #705

Merged
merged 1 commit into from
May 29, 2024
Merged

Conversation

pfmooney
Copy link
Collaborator

Being one of the early parts of the prototypical Propolis, the fw_cfg emulation was rather unpolished, and lacked the ability for entries to be added or removed after instance initialization.

This change should improve it on several fronts:

  • Entries can be added and/or removed during runtime
  • Association of any RamFB device is more flexible and can also be modified during runtime
  • fw_cfg entries are properly migrated, instead of requiring identical population on the destination instance.
  • A modicum of test coverage is present

@pfmooney
Copy link
Collaborator Author

Commit message should be updated to reflect that it fixes #667 prior to integration

@hawkw
Copy link
Member

hawkw commented May 17, 2024

The PHD failures are indicating that this revision is no longer migration-compatible with the current master (868cc54), e.g. https://buildomat.eng.oxide.computer/wg/0/artefact/01HY1B2G1MBMNS2Y6RH8T63Z20/qtyE43kKLA8xzLElWCD5i3Fo09EHpgiUiGhpKqQ3lQCUGZvX/01HY1B31RXBGEN3Q2GNQSEZK48/01HY1FB7BFBER6KPMCQWKJBRG0/phd-runner.log?format=x-bunyan#L378. Is that expected, or should it work?

@pfmooney
Copy link
Collaborator Author

The PHD failures are indicating that this revision is no longer migration-compatible with the current master (868cc54), e.g. https://buildomat.eng.oxide.computer/wg/0/artefact/01HY1B2G1MBMNS2Y6RH8T63Z20/qtyE43kKLA8xzLElWCD5i3Fo09EHpgiUiGhpKqQ3lQCUGZvX/01HY1B31RXBGEN3Q2GNQSEZK48/01HY1FB7BFBER6KPMCQWKJBRG0/phd-runner.log?format=x-bunyan#L378. Is that expected, or should it work?

It is expected. The migration payload is substantially different

@hawkw
Copy link
Member

hawkw commented May 17, 2024

Thanks, that's what I had figured but I thought it was worth double-checking.

I kind of wonder if we want to run just the migration-compatibility tests in a separate buildomat job from the other PHD tests, so that we can more clearly distinguish between test failures that indicate a commit broke something, and commits which introduce incompatible migration payload changes...

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this looks good to me --- I wasn't very familiar with the previous code, but I've tried to review the new code to the best of my ability. I had a few small nitpicks and questions, but no major issues; the question about enforcing ASCII-only strings is the only thing I'm actually concerned about and it's not a problem with the present code.

lib/propolis/src/hw/qemu/fwcfg.rs Outdated Show resolved Hide resolved
lib/propolis/src/hw/qemu/fwcfg.rs Show resolved Hide resolved
lib/propolis/src/hw/qemu/fwcfg.rs Outdated Show resolved Hide resolved
lib/propolis/src/hw/qemu/fwcfg.rs Show resolved Hide resolved
lib/propolis/src/hw/qemu/fwcfg.rs Outdated Show resolved Hide resolved
lib/propolis/src/hw/qemu/fwcfg.rs Show resolved Hide resolved
Being one of the early parts of the prototypical Propolis, the fw_cfg
emulation was rather unpolished, and lacked the ability for entries to
be added or removed after instance initialization.

This change should improve it on several fronts:
- Entries can be added and/or removed during runtime
- Association of any RamFB device is more flexible and can also be
  modified during runtime
- fw_cfg entries are properly migrated, instead of requiring identical
  population on the destination instance.
- A modicum of test coverage is present
@pfmooney pfmooney merged commit 3c0f998 into oxidecomputer:master May 29, 2024
9 of 10 checks passed
@pfmooney pfmooney deleted the modernize-fwcfg branch May 29, 2024 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants