1.8: virt_mshv_vtl: Fixup handling of higher VTL permissions when emulating instructions (#4056) - #4123
Merged
Steven Malis (smalis-msft) merged 1 commit intoAug 4, 2026
Conversation
…g instructions (microsoft#4056) A bunch of small fixes to permission handling: * Skip unmapped GPAs (they'll GP later) * Check for execute permissions correctly on ARM (cherry picked from commit aa5b33f)
Steven Malis (smalis-msft)
enabled auto-merge (squash)
July 31, 2026 17:20
Contributor
There was a problem hiding this comment.
Pull request overview
This backport aligns release/1.8.2607 with upstream PR #4056 by correcting how instruction emulation distinguishes execute vs data reads when enforcing higher-VTL permissions, and by avoiding VTL-permission hypercalls for unmapped/out-of-range GPAs.
Changes:
- Propagate an
exec: boolsignal through the aarch64 emulator physical-memory read path and use it to validateTranslateMode::ExecutevsTranslateMode::Read. - Ensure
&mut T’sCpu::read_instructionforwarding calls the underlyingread_instruction(notread_memory), preserving execute-vs-data semantics. - In
virt_mshv_vtlx64/arm64 emulation support, skip VTL permission checks for GPAs that are not mapped lower-VTL RAM to prevent whole-hypercall failures on unmapped/out-of-range GPAs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vmm_core/virt_support_aarch64emu/src/emulate.rs | Treat instruction fetches as execute reads when enforcing VTL access during emulation. |
| vm/aarch64/aarch64emu/tests/load_store.rs | Update test CPU implementation signature to match new exec parameter. |
| vm/aarch64/aarch64emu/src/emulator.rs | Thread exec through emulator physical-memory reads and update call sites. |
| vm/aarch64/aarch64emu/src/cpu.rs | Extend Cpu::read_physical_memory with exec and fix read_instruction forwarding. |
| openhcl/virt_mshv_vtl/src/processor/mshv/x64.rs | Skip VTL permission hypercall for non-lower-VTL-RAM GPAs during execute checks. |
| openhcl/virt_mshv_vtl/src/processor/mshv/arm64.rs | Same as x64: avoid hypercall failure on unmapped/out-of-range GPAs. |
Matt LaFayette (Kurjanowicz) (mattkur)
approved these changes
Aug 4, 2026
Steven Malis (smalis-msft)
merged commit Aug 4, 2026
856664c
into
microsoft:release/1.8.2607
94 checks passed
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.
Backport of #4056 to
release/1.8.2607.The cherry-pick of aa5b33f applied cleanly onto
release/1.8.2607with no conflicts and no manual edits.Original PR: #4056
This backport PR was created by an AI agent (GitHub Copilot) on behalf of Steven Malis (@smalis-msft).