Skip to content

[RFC] VIRTIO support in Zephyr #86561

Open
Open
@fkokosinski

Description

@fkokosinski

Introduction

This RFC introduces VIRTIO[1] support in Zephyr RTOS along with the roadmap of future improvements.

Problem description

VIRTIO is a communication protocol designed for paravirtualized devices interfacing. Adding support for VIRTIO in Zephyr allows Zephyr to use a wider array of devices in a virtualized environment. VIRTIO does virtualization in a more efficient way compared to emulating physical devices by leveraging the fact that VIRTIO employs mechanisms, such as laying structures efficiently in memory, to speed up the virtualization process.

Proposed change

Introduction of VIRTIO drivers, and drivers for virtualized VIRTIO-based devices.

Detailed RFC

Proposed change (Detailed)

  • Define VIRTIO API that will allow operation on VIRTIO devices, such as:
    • Device initialization
    • Feature flags/bits negotiation
    • Accessing virtqueues
    • Accessing device-specific data
  • Implement drivers for VIRTIO-based devices methods using the VIRTIO API for transfer methods that are as of date supported in Zephyr: PCI and MMIO
  • Implement drivers for specific VIRTIO-based devices, such as a filesystem device, a network device etc.

Roadmap

Dependencies/Limitations

Some of the VIRTIO device classes may not yet have suitable existing Zephyr APIs. Those APIs would have to be introduced along with them. The full list of device types can be found in chapter 5 of the VIRTIO specification.

Concerns and Unresolved Questions

Not all non-mandatory VIRTIO features are as of date supported in QEMU

References

[1] Virtual I/O Device (VIRTIO) Version 1.3

Metadata

Metadata

Assignees

Labels

RFCRequest For Comments: want input from the community

Type

Projects

Status

No status

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions