qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH, RFC 3/4] Implement byte swapped MMIO type


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH, RFC 3/4] Implement byte swapped MMIO type
Date: Wed, 26 May 2010 19:22:25 +0000

On Tue, May 25, 2010 at 7:45 PM, Igor Kovalenko
<address@hidden> wrote:
> On Mon, May 24, 2010 at 12:34 AM, Blue Swirl <address@hidden> wrote:
>> BROKEN
>>
>> Signed-off-by: Blue Swirl <address@hidden>
>> ---
>>  cpu-common.h       |    3 +-
>>  softmmu_template.h |   69 
>> ++++++++++++++++++++++++++++++++++++++++++++++------
>>  2 files changed, 63 insertions(+), 9 deletions(-)
>
> Changes to io_read and io_write seem to have issue with considering
> wrong value bits, you should check physaddr instead since index is cut
> off physaddr.

Thanks, good catch!

> It's probably a good idea to instead do a byteswap at __ld*/__st*
> level (a bit higher level than in your change.)
> These two sets are directly entered from runtime, and this way you
> need only two templates changed.
> Not sure if it is a good idea to handle unaligned accesses.

That's the difficulty with the __ld/__st case. I think an unaligned
word load on a byte swapped bus would consist of two loads, so there
should be two swaps as well. Perhaps the unaligned access code should
be changed to this way instead of current series of byte loads.



reply via email to

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