Skip to content

firmware_uefi: EfiDiagnostics flush on inspect_mut #1755

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

maheeraeron
Copy link
Contributor

@maheeraeron maheeraeron commented Jul 23, 2025

This PR focuses on allowing EfiDiagnostics to force flush through InspectMut.

We will only print EfiDiagnostics to our tracing facilities ONLY IF WE WRITE to the inspect_diagnostics field to true in UefiDevice.

To trigger this, use inspect like so:

openvmm> inspect -u true vm/uefi/process_diagnostics

@maheeraeron maheeraeron force-pushed the user/maheeraeron/efidiagnostics-inspect branch from e00f9fa to 8c402d0 Compare July 23, 2025 18:31
@maheeraeron
Copy link
Contributor Author

Current state of inspect usage:

openvmm> inspect vm/uefi
{
    address: 0x30,
    command_set: "x64",
    dependencies: "vmtime,lines/gpe0",
    dependents: "chipset",
    process_diagnostics: "Use: inspect -u 1 vm/uefi/process_diagnostics",
    service: _,
    unit_state: "running",
    use_mmio: false,
}
openvmm> inspect vm/uefi/process_diagnostics
"Use: inspect -u 1 vm/uefi/process_diagnostics"
openvmm> inspect -u 1 vm/uefi/process_diagnostics
  74.517116809s  INFO firmware_uefi::service::diagnostics:  EFI log entry debug_level=LOAD+ERROR ticks=0xea9fa phase=PEI_CORE log_message="PcdPeim.efi"
  74.517258083s  INFO firmware_uefi::service::diagnostics:  EFI log entry debug_level=LOAD+ERROR ticks=0xead4e phase=PEI_CORE log_message="ResetSystemPei.efi"
 [...more UEFI logs...]
  74.522973465s  INFO firmware_uefi::service::diagnostics:  processed EFI log entries triggered_by="inspect" entries_processed=0x67 bytes_read=0x1f88
"attempted to process diagnostics"

This last case is weird... did I do something wrong? I wonder if this is because -u recursively applies to child nodes too?

openvmm> inspect -u 1 vm/uefi
  80.758912712s  INFO firmware_uefi::service::diagnostics:  EFI log entry debug_level=LOAD+ERROR ticks=0xea9fa phase=PEI_CORE log_message="PcdPeim.efi"
  80.758997101s  INFO firmware_uefi::service::diagnostics:  EFI log entry debug_level=LOAD+ERROR ticks=0xead4e phase=PEI_CORE log_message="ResetSystemPei.efi"
 [...more UEFI logs...]
  80.765001391s  INFO firmware_uefi::service::diagnostics:  processed EFI log entries triggered_by="inspect" entries_processed=0x67 bytes_read=0x1f88
error: unresolved

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.

2 participants