firmware_uefi: Allow inspect or ohcldiag to reprocess UEFI logs with an increased log level#2802
Merged
maheeraeron merged 13 commits intomicrosoft:mainfrom Feb 28, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the UEFI diagnostics inspection capability by allowing dynamic log level overrides at runtime. The UEFI diagnostics buffer contains all logs up to the VERBOSE level, but by default only ERROR and WARN logs are projected. This change enables users to reprocess the buffer with increased verbosity (INFO or VERBOSE) via the inspect interface without requiring a restart.
Changes:
- Added
log_level_override: Option<LogLevel>parameter to diagnostics processing methods - Enhanced inspect_mut handler to accept "default", "info", or "full" values for runtime log level control
- Updated all existing call sites to pass
None, preserving default behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
vm/devices/firmware/firmware_uefi/src/service/diagnostics/mod.rs |
Added log_level_override parameter to both DiagnosticsServices::process_diagnostics and UefiDevice::process_diagnostics methods with documentation updates |
vm/devices/firmware/firmware_uefi/src/lib.rs |
Enhanced inspect_mut handler to parse log level values ("default"/"info"/"full") and updated all call sites to pass None for the new parameter |
vm/devices/firmware/firmware_uefi/fuzz/fuzz_diagnostics.rs |
Updated fuzz test to pass None for the new log_level_override parameter |
maheeraeron
commented
Feb 13, 2026
maheeraeron
commented
Feb 13, 2026
maheeraeron
commented
Feb 13, 2026
maheeraeron
commented
Feb 19, 2026
maheeraeron
commented
Feb 25, 2026
chris-oo
previously approved these changes
Feb 27, 2026
chris-oo
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhances the inspect_mut on the UefiDevice such that you can now provide a log level to reprocess the UEFI diagnostics buffer with more verbosity. You can also choose to output this through tracing or stdout. The stdout option is used when issuing this same command through ohcldiag.
This works because the in-memory buffer for UEFI logs technically contains all logs up to the VERBOSE level.
By default we only project ERROR and WARN logs, but now we can get INFO and VERBOSE logs at runtime via inspect or ohcldiag.
Furthermore, this PR also makes it so that when a watchdog timeout fires, we spit out INFO logs with no ratelimit