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: Thu, 6 Oct 2016 17:59:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


On 06/10/2016 17:41, Peter Maydell wrote:
> On 6 October 2016 at 16:36, Paolo Bonzini <address@hidden> wrote:
>>
>>
>> On 06/10/2016 16:11, Greg Kurz wrote:
>>> FWIW, Cedric had another proposal which apparently went unnoticed:
>>>
>>> <address@hidden>
>>>
>>> The idea is to add an optional endianness argument to the read*/write*
>>> commands in the qtest protocol:
>>> - libqtest then provides explicit _le and _be APIs
>>> - no extra byteswap is performed on the test program side: qtest
>>>   actually handles that and does exactly 1 or 0 byteswap.
>>> - it does not use memread/memwrite
>>> - the current 'guest native' API where qtest tswaps is preserved
>>>
>>
>> No, this is a worse idea, because the right place to do the swap is in
>> the "program" (libqtest) not in the "CPU" (QEMU).
> 
> 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 can do that...

Laurent



reply via email to

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