qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness
Date: Fri, 7 Oct 2016 09:44:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


On 07/10/2016 01:34, David Gibson wrote:

>> On 06/10/2016 17:41, Peter Maydell wrote:
>>> Speaking of the right place to do things, perhaps we should
>>> reimplement qtest_big_endian() in libqtest.c to send a query
>>> to the QEMU-under-test to ask it what TARGET_BIG_ENDIAN says,
>>> rather than hardcoding a big list of architectures...
>>
>> Yes, it's a good idea.
> 
> I disagree.
> 
> TARGET_BIG_ENDIAN is simply not well defined - we should avoid using
> it at all.

I think it is at least better to send a query to ask the endianness of
the guest instead of using some guessing on the test application side.

For the moment, we can use TARGET_WORDS_BIGENDIAN, because this is
simple and its purpose. TARGET_WORDS_BIGENDIAN defines the default
endianness of the guest.

But I don't think we can't use something else: in the case of POWER, for
instance, the endianness can be changed, but the processor is always big
endian by default at reset, and in the case of qtest, the processor is
never started (or in some special cases, never exits from the firmware,
which always runs in big endian mode), so the endianness will always
stay to the one given by TARGET_WORDS_BIGENDIAN.

Thanks,
Laurent



reply via email to

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