Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

microVM: refuse device buffers outside the e820 RAM ranges

Open
#554 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
linux

Research direction

Start with the "Memory layout" section of doc/design/cold-boot.md and section 2.3 of the architecture guide in #529 to learn the e820 RAM, MMIO aperture and reserved-range rules. The device work is in OpenVMM under the nanvix/openvmm submodule, in the virtio queue descriptor path or the guest-memory view given to microVM devices. Done means descriptors whose buffers cross the aperture or a reserved range, such as the page at 0x30000 or the ISA hole, are refused with a defined error completion or device reset, and OpenVMM tests cover those three cases.

Written by the indexing model from the issue text.

Description

Summary

The microVM memory layout requires that loader writes and DMA ranges fit wholly inside a RAM range and never cross the MMIO aperture or a reserved boot structure (section 2.3 of the architecture guide in doc/design/). The Linux direct loader meets this for its own writes. Device DMA does not: OpenVMM gives each microVM virtio device the whole guest memory, so a descriptor fails only when its buffer leaves guest RAM, for example in the MMIO aperture. A guest can point a device buffer at a range that the e820 map reserves inside RAM, such as the shared virtio interrupt-status page at 0x30000, which the devices themselves update, or the ISA hole.

The guest can already write those pages directly, so this does not weaken isolation between the guest and the host. The devices only enforce less than the layout states.

Intended behavior

Every buffer of a microVM virtio device lies wholly inside a RAM range of the e820 map. The device refuses a descriptor whose buffer crosses the MMIO aperture or a reserved range, such as the shared interrupt-status page, instead of reading or writing it.

Tasks

  • Give the microVM virtio devices a guest-memory view, or a descriptor check in the virtio queue, that admits only the e820 RAM ranges, in OpenVMM in the nanvix/openvmm submodule, and promote the pin.
  • Define how a device reports a refused buffer: an error completion where its protocol has one, or marking the device as needing reset.
  • Add OpenVMM coverage for buffers in the interrupt-status page, in the ISA hole, and across the aperture.
  • Note the enforcement in section 2.3 of the architecture guide.
Dominant language
Python
Stars
408
Forks
28
Avg merge
13h 18m
Merged PRs (30d)
292

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/nvx

All issues in microsoft/nvx

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.