Add virtio-mmio support

Registered by Michael Hope on 2011-10-11

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 https://lkml.org/lkml/2011/10/6/226 (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

Status:
Complete
Approver:
Michael Hope
Priority:
Medium
Drafter:
Peter Maydell
Direction:
Approved
Assignee:
None
Definition:
Superseded
Series goal:
Accepted for trunk
Implementation:
Started
Milestone target:
milestone icon backlog
Started by
Peter Maydell on 2011-11-01
Completed by
Peter Maydell on 2013-04-26

Related branches

Sprints

Whiteboard

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.