microVM: align guest-visible virtio feature bits with the architecture guide

Chiusa
#569 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@ppenna ci sta già lavorando.

Dal 2/11/2026.

  • #1189 di @ppenna — integrata

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start by comparing the feature masks in openvmm_defs/src/microvm.rs (filesystem and block masks) and dispatch/microvm.rs (console fallback mask) with the bit table in the issue, and check the ACCESS_PLATFORM handling in the virtio transport core.rs and the SIZE flag in virtio_console/src/lib.rs. Then read sections 3.3, 3.4.2, 3.5.1, and 3.6.1 of the architecture guide in doc/design/. The issue leaves the choice open, so confirm with maintainers which option to take before editing. Done means the masks and the guide agree and a check compares each device's features to its documented mask.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

The architecture guide in doc/design/ describes the guest-visible feature set of each microVM device. The network device advertises an exact mask (section 3.5.1). Each block role offers "a fixed capability set" (section 3.4.2). The host filesystem device offers split rings with indirect descriptors and event-index suppression (section 3.6.1), and the consoles are single-port virtio-console devices with two split queues (section 3.3). Feature masks are part of the versioned machine contract (section 1.5).

The guest sees two feature bits that the guide does not describe:

  • VIRTIO_F_ACCESS_PLATFORM (bit 33) on both block roles, the host filesystem device, and both consoles.
  • VIRTIO_CONSOLE_F_SIZE (bit 0) on both consoles.

Found while auditing the implementation against the architecture guide.

Where it happens

OpenVMM links are pinned to the gitlink nanvix/openvmm@c6d97c5.

The resulting guest-visible feature bits are:

Device Bits
distro block 2, 5, 6, 9, 10, 28, 29, 32, 33
scratch block 2, 6, 9, 10, 28, 29, 32, 33
Host filesystem 28, 29, 32, 33
Boot and control consoles 0, 28, 29, 32, 33
Network 5, 32

The machine has no IOMMU, so ACCESS_PLATFORM translates nothing, but the guest negotiates it, and snapshots record the feature masks.

Options

  • Remove the bits from the microVM masks. This changes the machine contract, so existing snapshots no longer restore.
  • Document ACCESS_PLATFORM and the console SIZE feature in sections 3.3, 3.4.2, and 3.6.1, and give each device class an exact mask, as section 3.5.1 does.

Tasks

  • Choose an option, then change the masks in nanvix/openvmm and promote the pin, or update the architecture guide.
  • Add a check that compares each microVM device's guest-visible features with its documented mask.
Lingua principale
Rust
Stelle
758
Fork
48
Merge medio
16h 57m
PR unite (30g)
441

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/nvx

Tutte le issue di microsoft/nvx

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.