qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Greg Kurz" <groug@kaod.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Cédric Le Goater" <clg@kaod.org>
Subject: Re: [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness
Date: Fri, 7 Oct 2016 09:44:57 +0200	[thread overview]
Message-ID: <7943b517-7e89-4a42-f057-48785105b660@redhat.com> (raw)
In-Reply-To: <20161006233434.GD18490@umbus.fritz.box>



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	other threads:[~2016-10-07  7:45 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04 12:17 [Qemu-devel] [PATCH] qtest: add read/write accessors with a specific endianness Cédric Le Goater
2016-10-04 12:36 ` Peter Maydell
2016-10-04 14:04   ` Laurent Vivier
2016-10-04 14:07   ` Cédric Le Goater
2016-10-04 17:15   ` Paolo Bonzini
2016-10-04 23:43   ` David Gibson
2016-10-05  5:59     ` Cédric Le Goater
2016-10-05 12:31     ` Peter Maydell
2016-10-05 13:49       ` Cédric Le Goater
2016-10-05 13:53         ` Peter Maydell
2016-10-05 14:00           ` Cédric Le Goater
2016-10-05 14:20             ` Peter Maydell
2016-10-05 17:17               ` Cédric Le Goater
2016-10-05 17:32                 ` Peter Maydell
2016-10-06  3:45               ` David Gibson
2016-10-06  7:23                 ` Paolo Bonzini
2016-10-06  8:37                   ` David Gibson
2016-10-06  9:40                     ` Paolo Bonzini
2016-10-06 10:44                       ` Cédric Le Goater
2016-10-06 10:47                 ` Peter Maydell
2016-10-06 23:09                   ` David Gibson
2016-10-06  3:40         ` David Gibson
2016-10-06  3:38       ` David Gibson
2016-10-06  6:10         ` David Gibson
2016-10-06 11:03         ` Peter Maydell
2016-10-06 14:11           ` Greg Kurz
2016-10-06 15:36             ` Paolo Bonzini
2016-10-06 15:41               ` Peter Maydell
2016-10-06 15:59                 ` Laurent Vivier
2016-10-06 23:34                   ` David Gibson
2016-10-07  7:44                     ` Laurent Vivier [this message]
2016-10-06 15:44               ` Cédric Le Goater
2016-10-06 15:45                 ` Paolo Bonzini
2016-10-06 23:43               ` David Gibson
2016-10-06 23:31             ` David Gibson
2016-10-06 23:31           ` David Gibson
2016-10-07  9:52             ` Peter Maydell
2016-10-04 23:26 ` David Gibson
2016-10-05  5:36   ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7943b517-7e89-4a42-f057-48785105b660@redhat.com \
    --to=lvivier@redhat.com \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).