[AI Generated] BugFix: Skip MSR Hyper-V platform-id test on arm64 (rdmsr/msr-tools is x86-only)#4561
Merged
LiliDeng merged 1 commit intoJun 29, 2026
Conversation
rdmsr/msr-tools and the x86 msr driver are x86-only. The Hyper-V guest OS id register exists on arm64 but is read via the hypercall interface, not rdmsr, so this rdmsr-based test cannot run there. Detect arm64 early and skip with an accurate reason instead of failing later on the (impossible) msr-tools install, which previously wasted ~100s on retry loops and produced a misleading skip message. Also drop the arm64 register entry that falsely implied rdmsr could read it.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Msr.verify_hyperv_platform_id test to correctly handle arm64 guests where rdmsr/msr-tools (and the underlying x86 MSR mechanism) are not available, avoiding wasted retries and providing an accurate skip reason.
Changes:
- Skip
verify_hyperv_platform_idearly onCpuArchitecture.ARM64with a precise explanation (hypercall-based register access required). - Remove the arm64 entry from the
HV_REGISTER_GUEST_OSIDrdmsr-offset map and preserve the arm64 register value as a comment for future hypercall-based work.
LiliDeng
approved these changes
Jun 29, 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.
Problem
Msr.verify_hyperv_platform_idreads the Hyper-V guest OS id register usingrdmsr(frommsr-tools, backed by the x86msrchar-device driver). All three are x86-only. On arm64 there is nordmsrinstruction,msr-toolsis not packaged (E: Unable to locate package msr-tools), and themsrdriver does not exist.Previously the test still attempted to install
msr-toolson arm64, looped on retries (~100s wasted), and finally skipped with a misleading message. The arch map also contained an arm64 entry (0x00090002) that falsely impliedrdmsrcould read it — but that value is a Hyper-V synthetic register identifier read via the hypercall interface (HvGetVpRegisters), not an x86 MSR number.Fix
Lscpu.get_architecture()) and skip with an accurate reason, before anymsr-toolsinstall attempt.HV_REGISTER_GUEST_OSID(the rdmsr offset map).Validation
Ran
Msr.verify_hyperv_platform_idon a real arm64 VM (Standard_D2pds_v5, Ubuntu 22.04 arm64, hardware_platformaarch64):MSR platform-id test uses rdmsr/msr-tools (x86-only); on arm64 the register is read via hypercall, not rdmsr.msr-toolsretry-loop lines (was ~12 before the fix).No behavior change on x86 — the test runs exactly as before.