Skip to content

firmware_uefi: Allow inspect or ohcldiag to reprocess UEFI logs with an increased log level#2802

Merged
maheeraeron merged 13 commits intomicrosoft:mainfrom
maheeraeron:user/maheeraeron/efidiagnostics-trace-loglevel
Feb 28, 2026
Merged

firmware_uefi: Allow inspect or ohcldiag to reprocess UEFI logs with an increased log level#2802
maheeraeron merged 13 commits intomicrosoft:mainfrom
maheeraeron:user/maheeraeron/efidiagnostics-trace-loglevel

Conversation

@maheeraeron
Copy link
Contributor

@maheeraeron maheeraeron commented Feb 11, 2026

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

Copilot AI review requested due to automatic review settings February 11, 2026 23:08
@maheeraeron maheeraeron requested a review from a team as a code owner February 11, 2026 23:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@github-actions
Copy link

@maheeraeron maheeraeron changed the title firmware_uefi: Allow inspect to reprocess UEFI logs with an increased log level firmware_uefi: Allow inspect or ohcldiag to reprocess UEFI logs with an increased log level Feb 19, 2026
chris-oo
chris-oo previously approved these changes Feb 27, 2026
@maheeraeron maheeraeron merged commit dd3a530 into microsoft:main Feb 28, 2026
80 of 82 checks passed
@maheeraeron maheeraeron deleted the user/maheeraeron/efidiagnostics-trace-loglevel branch February 28, 2026 08: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.

3 participants