Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-09 Thread David Gibson
On Fri, Oct 07, 2016 at 10:39:09AM +0100, Peter Maydell wrote: > On 7 October 2016 at 00:55, David Gibson wrote: > > It is an improvement. But I still think if we're relying on the > > ill-defined "target endianness" we're already doing something wrong. > > Target endianness is not ill-defined.

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-09 Thread David Gibson
On Fri, Oct 07, 2016 at 12:10:07PM +0200, Greg Kurz wrote: > On Fri, 7 Oct 2016 10:39:09 +0100 > Peter Maydell wrote: > > > On 7 October 2016 at 00:55, David Gibson > > wrote: > > > It is an improvement. But I still think if we're relying on the > > > ill-defined "target endianness" we're alre

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-07 Thread Greg Kurz
On Fri, 7 Oct 2016 10:39:09 +0100 Peter Maydell wrote: > On 7 October 2016 at 00:55, David Gibson wrote: > > It is an improvement. But I still think if we're relying on the > > ill-defined "target endianness" we're already doing something wrong. > > Target endianness is not ill-defined. It's

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-07 Thread Greg Kurz
On Fri, 7 Oct 2016 10:36:58 +0100 Peter Maydell wrote: > On 7 October 2016 at 08:31, Greg Kurz wrote: > > On Fri, 7 Oct 2016 09:10:14 +0200 > > Laurent Vivier wrote: > > > >> On 06/10/2016 22:45, Peter Maydell wrote: > >> > On 6 October 2016 at 11:56, Laurent Vivier wrote: > >> >> +/

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-07 Thread Peter Maydell
On 7 October 2016 at 00:55, David Gibson wrote: > It is an improvement. But I still think if we're relying on the > ill-defined "target endianness" we're already doing something wrong. Target endianness is not ill-defined. It's a clear and constant property of the bus the CPU is plugged into. It

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-07 Thread Peter Maydell
On 7 October 2016 at 08:31, Greg Kurz wrote: > On Fri, 7 Oct 2016 09:10:14 +0200 > Laurent Vivier wrote: > >> On 06/10/2016 22:45, Peter Maydell wrote: >> > On 6 October 2016 at 11:56, Laurent Vivier wrote: >> >> +/* ask endianness of the target */ >> >> + >> >> +qtest_sendf(s, "endianne

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-07 Thread Greg Kurz
On Fri, 7 Oct 2016 09:10:14 +0200 Laurent Vivier wrote: > On 06/10/2016 22:45, Peter Maydell wrote: > > On 6 October 2016 at 11:56, Laurent Vivier wrote: > >> The target endianness is not deduced anymore from > >> the architecture name but asked directly to the guest, > >> using a new qtest co

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-07 Thread Greg Kurz
On Fri, 7 Oct 2016 10:55:29 +1100 David Gibson wrote: > On Thu, Oct 06, 2016 at 10:46:22PM +0200, Greg Kurz wrote: > > On Thu, 6 Oct 2016 20:56:58 +0200 > > Laurent Vivier wrote: > > > > > The target endianness is not deduced anymore from > > > the architecture name but asked directly to the

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-07 Thread Laurent Vivier
On 06/10/2016 22:45, Peter Maydell wrote: > On 6 October 2016 at 11:56, Laurent Vivier 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 TAR

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-06 Thread David Gibson
On Thu, Oct 06, 2016 at 10:46:22PM +0200, Greg Kurz wrote: > On Thu, 6 Oct 2016 20:56:58 +0200 > Laurent Vivier 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 > > c

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-06 Thread Greg Kurz
On Thu, 6 Oct 2016 20:56:58 +0200 Laurent Vivier 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

Re: [Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-06 Thread Peter Maydell
On 6 October 2016 at 11:56, Laurent Vivier 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

[Qemu-devel] [PATCH] qtest: ask endianness of the target in qtest_init()

2016-10-06 Thread Laurent Vivier
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 val