Skip to content

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

Closed

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions