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: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] fw_cfg: fix endianness in fw_cfg_data_mem_read() / _write()
Date: Wed, 31 Dec 2014 18:56:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0


On 31/12/2014 18:04, Laszlo Ersek wrote:
> 
> *If* it prints the number that the guest CPU sees immediately when it
> performs the wide read, then it should print 0x0000000032cb0046, on both
> big and little endian hosts; assuming a little endian guest.

Yes.

Paolo

> Namely, the fw_cfg (sub)string in question is [0x46, 0x00, 0xcb, 0x32].
> The device is big endian, and the register accessor function should
> return the 0x4600cb32 host value in qemu. The guest CPU should see the
> same byte array [0x46, 0x00, 0xcb, 0x32], whose direct interpretation in
> the little endian guest is 0x32cb0046.



reply via email to

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