Add virtio-mmio support

Registered by Michael Hope

This blueprint has been superseded. See the newer blueprint "Add virtio-mmio" for updated plans.

virtio is standard for network and mass storage drivers where the guest knows it is running in a virtual environment, cooperates with the hypervisor, and gives generally better performance.

Pawel Moll has posted kernel patches which allow a Linux ARM kernel to probe for a virtio transport at a memory location specified by a device tree blob, which allows us to get around the irritating problem of virtio being dependent on PCI and PCI generally not being present on ARM devboards. See (and followup mail for the spec).

We should implement the QEMU end of this to (a) provide a publicly available concrete implementation of the model end of things and (b) make virtio actually work usefully for us.

Blueprint information

Michael Hope
Peter Maydell
Series goal:
Accepted for trunk
Milestone target:
milestone icon backlog
Started by
Peter Maydell
Completed by
Peter Maydell

Related branches



Judging from a couple of other non-PCI virtio transports in the qemu source code, this is <500 lines of code so should not be too hard to do. I have a test kernel from Pawel with the virtio hardwired in so we don't need to do the device tree bits immediately.

I now have a prototype which works for virtio-blk. However it looks like to get this upstream we will have to do some refactoring of the existing virtio code to make it a proper QEMU bus.


Work Items

Work items:
Design API for virtio qbus: TODO
Refactor core virtio layer to use this qbus: TODO
Reimplement virtio-pci to use qbus: TODO
Reimplement prototype virtio-mmio to use qbus: TODO
Test reimplemented virtio-pci: TODO
Test all the virtio-mmio plugins: TODO
Add back-compatibility command line/save restore layers: TODO
Post patches upstream: TODO
Implement any required fixes found in upstream review: TODO

This blueprint contains Public information 
Everyone can see this information.