qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio
Date: Tue, 15 Apr 2014 15:39:35 +0100

On 15 April 2014 14:22, Greg Kurz <address@hidden> wrote:
> On Tue, 15 Apr 2014 13:35:03 +0200
> Alexander Graf <address@hidden> wrote:
>> That would defeat the purpose - the reason to have the helper inlined is
>> to remove the conditional branch for x86.
>>
>
> Sure but on the other hand, Peter does not like the idea of moving virtio
> to compiled-per-target... these look like contradictory requests to me... :-\
> Unless I have missed something, we have to settle whether we favor 
> building/testing
> time or performance of non-{powerpc,arm} targets to have legacy virtio 
> supporting
> LE powerpc and BE arm...

To repeat my remarks from IRC: this weirdo endianness behaviour
was a dumb spec decision, and dumb spec decisions have to be
paid for. virtio 1.0 should fix this, so we can just suggest
that anybody who really cares about performance down to avoiding
conditional branches should switch to that, right?

My suggestion was that:
 * virtio_is_big_endian should be a CPU object method
 * PPC (and eventually ARM) implement this by checking whatever
   the state flag is
 * base class implementation returns true/false based on
   TARGET_WORDS_BIGENDIAN
 * virtio devices call this method on current_cpu when the
   guest first touches/resets the virtio device, and cache
   the result

thanks
-- PMM



reply via email to

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