nvx-rs: print zero CPUID fields in `nvx-time-probe clock` as C's `%#x` does
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Start with the nvx-time-probe clock subcommand and the print_cpuid function, where the summary line and eax.max_leaf are formatted with {:#x}. Check alternate_hex_width_10, the existing helper for %#010x, to see how the zero-without-prefix formatting is done. The issue depends on a helper proposed in #589, so confirm whether that is merged before adding it. Done means zero prints as 0, nonzero values keep 0x, and a regression test for a CPU without the hypervisor bit matches the C program's output.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
nvx-time-probe clock prints the hypervisor's CPUID fields with Rust's {:#x}, which prints zero as 0x0, where the C program's %#x printed 0. The summary line's hv_max_leaf, hv_features_eax, and hv_features_edx are all zero when the hypervisor bit is clear, and its feature fields are zero under a hypervisor whose leaves end before 0x40000003. The cpuid.0x40000000 line's eax.max_leaf is likewise zero for a hypervisor whose leaf reads zero. Each such valid run differs from the C program's byte-exact output.
Found in the #550 review. The port has differed since its first revision, and #550 leaves the fix to this issue. #589 is the same difference in the MSR values.
Proposal
Print these fields with the helper for C's %#x that #589 proposes, which prints zero without the prefix, as alternate_hex_width_10 already does for %#010x.
Tasks
- Print zero as
0in the summary line'shv_max_leaf,hv_features_eax, andhv_features_edx, and in theeax.max_leafthatprint_cpuidprints, keeping0xbefore nonzero values. - Add a regression for the zero-valued summary of a CPU without the hypervisor bit, with the C program's output as the expected result.
- Ngôn ngữ chính
- Python
- Star
- 380
- Fork
- 24
- Merge trung bình
- 13 giờ 18 phút
- Pull request đã merge (30 ngày)
- 292
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/nvx
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Track sandbox live share bugs: the time ABI bind hides or breaks shares at /run targetsCó thể đã có người làm @jay23606 đã nhận 1 ngày trước. Đang mởbug-hunt confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/nvx
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
aws-samples/sample-per-model-bedrock#295 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
pyrevitlabs/pyRevit#3792 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
zephyrproject-rtos/reqmgmt#177 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
polarsource/polar#15580 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[开源推荐] Windows 系统维护工具箱,支持后台任务队列Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
521xueweihan/HelloGitHub#4011 ·