On 07/15/2011 10:02 PM, Blue Swirl wrote:
On Fri, Jul 15, 2011 at 12:56 AM, Alexander Graf<ag...@suse.de> wrote:
Am 14.07.2011 um 21:34 schrieb Blue Swirl<blauwir...@gmail.com>:
Don't compile virtio.c in hwlib, it depends on memory accesses
performed in CPU endianness.
Make loads and stores in CPU endianness unavailable to devices
and poison them to avoid further bugs.
Very nice :). Couldn't test execute it, but:
Acked-by: Alexander Graf<ag...@suse.de>
By the way, another way would be to change virtio to always use LE
accesses. This would need changes to KVM on PPC and s390x. Would that
be possible?
The code is already in Linux for quite a while, other OSs started
implementing it (Solaris) and the spec is pretty specific on fields
being in target endianness.
The virtio v2 spec will hopefully fix this, but that should end up in a
different module then :)
Alex