[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case
From: |
Laszlo Ersek |
Subject: |
Re: [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case |
Date: |
Fri, 26 Apr 2019 18:53:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 04/25/19 10:15, Gerd Hoffmann wrote:
> On Wed, Apr 24, 2019 at 09:16:56AM +0800, Li Qiang wrote:
>> Thomas Huth <address@hidden> 于2019年4月24日周三 上午12:29写道:
>>
>>> Is this endianess-safe? Or do you need to byteswap reboot_timeout if the
>>> host and guest endianess does not match?
>>
>> Good question!
>>
>> IIUC, the qemu fw_cfg store the 'file' entry data just in byte stream.
>
> No. Integers are defined to be little endian. See fw_cfg_add_i64() for
> example, there is an explicit cpu_to_le64() call for that.
Endianness may be defined on a case-by-case basis (i.e. if you introduce
a new named fw_cfg file, you can make its contents whatever you like);
however, the integer-adding/modifying helper functions do express a
preference for endianness. Search "include/hw/nvram/fw_cfg.h" for "endian".
Thanks
Laszlo
- [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case, (continued)
- [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case, Li Qiang, 2019/04/20
- Re: [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case, Thomas Huth, 2019/04/23
- Re: [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case, Gerd Hoffmann, 2019/04/25
- Re: [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case, Li Qiang, 2019/04/25
- Re: [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case, Philippe Mathieu-Daudé, 2019/04/25
- Re: [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case, Laszlo Ersek, 2019/04/26
- Re: [Qemu-devel] [PATCH 3/4] tests: fw_cfg: add reboot_timeout test case,
Laszlo Ersek <=
[Qemu-devel] [PATCH 4/4] tests: fw_cfg: add splash time test case, Li Qiang, 2019/04/20
[Qemu-devel] [PATCH 2/4] tests: fw_cfg: add a function to get the fw_cfg file, Li Qiang, 2019/04/20