actually, I've tested the virtio-blk, and it is working. I applied those patch to QEMU-1.0 and brought the virtio_mmio.c from Linux-3.2-rc back to Linux-linaro-2.6.38.
I also found a small bug in virito-mmio.c: virtio_mmio_write(),
Peter forgot to break in each case of switch block. After fixed the small bug, the virtio-balloon works as well.
Then, when I attempted to enable the virtio-net, the initialization part is fine, however, the QEMU crashed and printed this message:
"virtio-net header not in first element"
It happens when the front-end virtio-net is invoking virtqueue_kick() at the end of try_fill_recv(). Then, QEMU gets this message and invokes virtio_net_receive(), then the
error happens.
The parameters I passed to qemu-system-arm is qemu-system-arm XXXXXXX -netdev type=tap,id=mynet -global virtio-net-mmio.netdev=mynet I don't know this is correct or not.
Does anyone have any idea of this problem?
Or give me some directions to solve this bug?
Any comment is welcome. I really appreciate your help!!