qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] fw_cfg: fix endianness in fw_cfg_data_mem_read(


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] fw_cfg: fix endianness in fw_cfg_data_mem_read() / _write()
Date: Wed, 31 Dec 2014 17:29:25 +0000

On 31 December 2014 at 16:23, Paolo Bonzini <address@hidden> wrote:
> $ arm-softmmu/qemu-system-arm -M virt -machine accel=qtest \
>              -qtest stdio -uuid 4600cb32-38ec-4b2f-8acb-81c6ea54f2d8
> writew 0x9020008 0x0200
> readl 0x9020000
>
> The readl should return "OK 0x000000004600cb32".

On BE ppc64 host I get:
OK 0x0000000032cb0046
with or without Laszlo's patch.

On LE x86-64 host I get
OK 0x000000004600cb32
without the patch, and
OK 0x0000000032cb0046
with it.

So I think that the patch is good (in that it removes a host-endian
dependency which we should not have) and your intuition for the
correct result is possibly not so good :-)

-- PMM



reply via email to

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