add minimal virtio support for devtree virtio-mmio
Support the bare minimum of virtio to enable access to the virtio-mmio
config space of a device. Currently this implementation must use a
device tree to find the device.
Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
---
v7:
- s/alloc/calloc/
- split into virtio.[ch] and virtio-mmio.[ch] [Paolo Bonzini]
- dump virtio_bind_busses table [Paolo Bonzini]
v6:
- switch to using alloc()
- s/vmdev/vm_dev/ to be consistent with kernel naming
- check for virtio magic in vm_dt_match
v5:
- use same virtio struct names as kernel
- no need to alloc a new virtio_config_ops for each virtio device
- use ioremap
v4:
- split from the virtio-testdev patch
- search a table to "discover" that the device must be DT/virtio-mmio,
which doesn't change anything, but looks less hacky than comments
saying the device must be DT/virtio-mmio...
- manage own pool of virtio-mmio pre-allocated device structures in
order to avoid needing access to the heap
4 files changed