Repository navigation
guest: match C hexadecimal output for zero clock values - #631
Merged
Pedro Henrique Penna (ppenna) merged 1 commit intoOct 20, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The localized formatting changes address both issues with targeted regression coverage and no identified defects.
No open issues 🎉
What changed in this PR
Fixes #589 and #590 by matching C’s alternate hexadecimal formatting in nvx-time-probe clock.
Changes:
- Prints zero MSR and hypervisor CPUID values as
0, preserving0xfor nonzero values. - Adds regressions for zero, nonzero, maximum values, and distinct feature registers.
| File | Description |
|---|---|
| nvx-rs/src/guest/time_probe/clock.rs | Shares C-compatible hexadecimal formatting across affected output paths and adds regression tests. |
Review effort: Balanced
Author
|
@microsoft-github-policy-service agree |
Zerui Ge (gezerui888)
marked this pull request as ready for review
October 20, 2026 09:33
Pedro Henrique Penna (ppenna)
approved these changes
Oct 20, 2026
Pedro Henrique Penna (ppenna)
enabled auto-merge
October 20, 2026 14:08
Pedro Henrique Penna (ppenna)
merged commit Oct 20, 2026
776aa38
into
microsoft:dev
55 checks passed
This was referenced Oct 20, 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.
Fixes #589
Fixes #590
nvx-time-probe clockprinted zero MSR values and hypervisor CPUID fields as0x0. The C tool uses%#x, which prints zero as0. This change prints zero as0and keeps the0xprefix for nonzero values. The CPUID max leaf and summary fields now use the same rule.Validation