[Top][All Lists]

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/3] hw/ppc/ppc_boards: Don't use old

From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/3] hw/ppc/ppc_boards: Don't use old_mmio for ref405ep_fpga
Date: Thu, 2 Aug 2018 14:08:28 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 08/02/2018 01:40 PM, Peter Maydell wrote:
> On 2 August 2018 at 16:58, Philippe Mathieu-Daudé <address@hidden> wrote:
>> Hopefully this is a good case to show the bug I'm having with
>> access_with_adjusted_size().
>> I agree with your change, so:
>> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
>> However IMO little endian guest access is likely to fail.
>> The bug I'm having looks like, we have BE data is 'aabbccdd', I expect
>> 16-bit access @2 return 'ccdd' but returns 'bbaa' (IIRC).
> Behaviour here is going to depend on (a) what the TARGET_ENDIANNESS
> setting is for the system (b) whether the device is DEVICE_NATIVE_ENDIAN,
> CPU is in "little endian" or "big endian" mode (if the guest CPU
> architecture is bi-endian). I would not be surprised if device
> models which were only ever expected to work with (say) big endian
> MIPS didn't behave correctly when run with a little endian
> MIPS OS, but that's usually an error in the device model and/or
> its choice of .endianness in the memory region ops struct.
> If there's something wrong with access_with_adjusted_size(),
> I would suggest starting a different thread for that. I don't
> think these changes should alter the behaviour of this device.

Sure, I'll do when I continue to work on this.

I started my mail with "Hi Peter" but the access_with_adjusted_size()
comments were directed to the PPC reviewers, I'll reword to be more

PPC reviewers: watch out I'm hitting an issue on MIPS boards when using
bi-endian cpu in little-endian configuration, and accessing big-endian
ordered devices (usually when .valid access size is bigger than device
.impl). I don't know how to test this with PPC images.
This patch as it looks correct to me, but since now
access_with_adjusted_size() is involved, it might trigger the previous
described issue.



reply via email to

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