Skip to content

1.8: virt_mshv_vtl: Fixup handling of higher VTL permissions when emulating instructions (#4056) - #4123

Merged
Steven Malis (smalis-msft) merged 1 commit into
microsoft:release/1.8.2607from
smalis-msft:backport-1.8-pr4056
Aug 4, 2026
Merged

1.8: virt_mshv_vtl: Fixup handling of higher VTL permissions when emulating instructions (#4056)#4123
Steven Malis (smalis-msft) merged 1 commit into
microsoft:release/1.8.2607from
smalis-msft:backport-1.8-pr4056

Conversation

@smalis-msft

Copy link
Copy Markdown
Contributor

Backport of #4056 to release/1.8.2607.

The cherry-pick of aa5b33f applied cleanly onto release/1.8.2607 with 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).

…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)
Copilot AI review requested due to automatic review settings July 31, 2026 17:18
@smalis-msft
Steven Malis (smalis-msft) requested a review from a team as a code owner July 31, 2026 17:18
@smalis-msft Steven Malis (smalis-msft) added the release_1.8.2607 Targets the release/1.8.2607 branch. label Jul 31, 2026
@smalis-msft
Steven Malis (smalis-msft) enabled auto-merge (squash) July 31, 2026 17:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: bool signal through the aarch64 emulator physical-memory read path and use it to validate TranslateMode::Execute vs TranslateMode::Read.
  • Ensure &mut T’s Cpu::read_instruction forwarding calls the underlying read_instruction (not read_memory), preserving execute-vs-data semantics.
  • In virt_mshv_vtl x64/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.

@smalis-msft
Steven Malis (smalis-msft) merged commit 856664c into microsoft:release/1.8.2607 Aug 4, 2026
94 checks passed
@smalis-msft
Steven Malis (smalis-msft) deleted the backport-1.8-pr4056 branch August 4, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_1.8.2607 Targets the release/1.8.2607 branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants