qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Avoid CPU endian memory accesses in devices


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH] Avoid CPU endian memory accesses in devices
Date: Fri, 15 Jul 2011 22:56:45 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8

On 07/15/2011 10:02 PM, Blue Swirl wrote:
On Fri, Jul 15, 2011 at 12:56 AM, Alexander Graf<address@hidden>  wrote:



Am 14.07.2011 um 21:34 schrieb Blue Swirl<address@hidden>:

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<address@hidden>
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]