Skip to content

openvmm_core: start aarch64 Linux direct boot RAM at 1 GiB#3559

Open
jstarks wants to merge 1 commit into
microsoft:mainfrom
jstarks:1gb
Open

openvmm_core: start aarch64 Linux direct boot RAM at 1 GiB#3559
jstarks wants to merge 1 commit into
microsoft:mainfrom
jstarks:1gb

Conversation

@jstarks
Copy link
Copy Markdown
Member

@jstarks jstarks commented May 24, 2026

On aarch64, iommufd reserves the 128 MiB–129 MiB region in IOVA space for the host MSI doorbell. When openvmm places guest RAM starting at address 0, identity-mapped DMA for passthrough devices fails because iommufd cannot allocate IOVAs that overlap this reservation.

Avoid the conflict by starting RAM at 1 GiB for aarch64 Linux direct boot. This is implemented via a new ram_start_address field on MemoryLayoutInput that reserves the low GPA range so the memory layout allocator places RAM above it.

UEFI boot is not yet handled because UEFI currently requires low memory to start; this is left as future work.

On aarch64, iommufd reserves the 128 MiB–129 MiB region in IOVA space
for the host MSI doorbell. When openvmm places guest RAM starting at
address 0, identity-mapped DMA for passthrough devices fails because
iommufd cannot allocate IOVAs that overlap this reservation.

Avoid the conflict by starting RAM at 1 GiB for aarch64 Linux direct
boot. This is implemented via a new ram_start_address field on
MemoryLayoutInput that reserves the low GPA range so the memory layout
allocator places RAM above it.

UEFI boot is not yet handled because UEFI currently requires low memory
to start; this is left as future work.
Copilot AI review requested due to automatic review settings May 24, 2026 04:39
@jstarks jstarks requested a review from a team as a code owner May 24, 2026 04:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the aarch64 Linux direct-boot guest physical memory layout so guest RAM no longer starts at GPA 0, avoiding the low-address region that conflicts with iommufd’s reserved IOVA window used for the host MSI doorbell. It does this by introducing a configurable minimum RAM start address and reserving the low GPA range during layout allocation.

Changes:

  • Add ram_start_address to MemoryLayoutInput and reserve 0..ram_start_address during layout allocation so RAM is placed above it.
  • In VM initialization, set ram_start_address to 1 GiB for aarch64 Linux direct boot; keep existing behavior for other architectures / load modes.
  • Update test helper construction to include the new field.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
openvmm/openvmm_core/src/worker/memory_layout.rs Adds a ram_start_address input and reserves low GPA space so ordinary RAM is allocated above the requested minimum address.
openvmm/openvmm_core/src/worker/dispatch.rs Sets ram_start_address = 1 GiB for aarch64 Linux direct boot to avoid the iommufd-reserved low IOVA region.

Comment thread openvmm/openvmm_core/src/worker/memory_layout.rs
Comment thread openvmm/openvmm_core/src/worker/memory_layout.rs
Comment thread openvmm/openvmm_core/src/worker/dispatch.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants