qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] qtest: ask endianness of the target in qtest


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH v2] qtest: ask endianness of the target in qtest_init()
Date: Fri, 7 Oct 2016 12:57:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0


On 07/10/2016 12:48, Greg Kurz wrote:
> On Fri,  7 Oct 2016 12:14:27 +0200
> Laurent Vivier <address@hidden> wrote:
> 
>> The target endianness is not deduced anymore from
>> the architecture name but asked directly to the guest,
>> using a new qtest command: "endianness". As it can't
>> change (this is the value of TARGET_WORDS_BIGENDIAN),
>> we store it to not have to ask every time we want to
>> know if we have to byte-swap a value.
>>
>> Signed-off-by: Laurent Vivier <address@hidden>
>> CC: Greg Kurz <address@hidden>
>> CC: David Gibson <address@hidden>
>> CC: Peter Maydell <address@hidden>
>> ---
>> v2:
>> - move the "endianness" command to a function and
>>   don't move the qtest_init()/qtest_quit() functions
>>
> 
> Not speaking about the current discussion on TARGET_WORDS_BIGENDIAN,
> I guess a consensus could be that this only makes sense when testing
> legacy virtio. People should not be tempted to use this anywhere else
> actually.

I can rename target_big_endian() into qvirtio_is_big_endian() on the
test side (and put it in libqos/virtio.h).

I'd like to keep the qtest_big_endian() as it returns
TARGET_WORDS_BIGENDIAN, and qvirtio_is_big_endian() will depend also on
virtio-1.0 or not.

Laurent



reply via email to

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