virtio-blk: fix cross-endianness targets
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 25 Jan 2011 10:55:14 +0000 (11:55 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 29 Jan 2011 14:08:14 +0000 (15:08 +0100)
commit92e3c2a39e95576dd215b063e493069c67ffaab8
treea2a7ee86a1a90d2689cf5229dc2d6244f57c8038
parent44b15bc5c65ab6b3103f508504e4adf8ee9902d7
virtio-blk: fix cross-endianness targets

virtio-blk doesn't work on cross-endian configuration, as endianness is
not handled correctly.

This patch adds missing endianness conversions to make virtio-blk
working. Tested on the following configurations:
- i386 guest on x86_64 host
- ppc guest on x86_64 host
- i386 guest on mips host
- ppc guest on mips host

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/virtio-blk.c