All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Laurent Vivier <lvivier@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH v2] qtest: ask endianness of the target in qtest_init()
Date: Fri, 7 Oct 2016 14:45:42 +0200	[thread overview]
Message-ID: <20161007144542.118082e2@bahia> (raw)
In-Reply-To: <CAFEAcA9o+8RWR9oOeCoeBHCEoHAWro6teNmFxfyxw15tPHbp=Q@mail.gmail.com>

On Fri, 7 Oct 2016 13:31:10 +0100
Peter Maydell <peter.maydell@linaro.org> wrote:

> On 7 October 2016 at 13:27, Greg Kurz <groug@kaod.org> wrote:
> > Indeed but my suggestion is to open code this in qvirtio_is_big_endian(),
> > and even rename QTestState::big_endian to virtio_big_endian to make it
> > really obvious it should not be used elsewhere.
> >
> > I now remember this is what I was resolutely suggested to do in
> > include/qom/cpu.h at the time we started to support ppc64le:
> >
> >     bool (*virtio_is_big_endian)(CPUState *cpu);  
> 
> Not really the same thing though -- virtio_is_big_endian
> in QEMU is indeed used only in virtio, because it makes
> dubious use of the internals of the CPU state. The
> equivalent of this proposed qtest function is the #define
> TARGET_BIG_ENDIAN, which is global to all of QEMU and
> reasonably widely used (because it's not a property of
> the CPU's internals).
> 

Indeed but is it expected to be used in other tests than
virtio ?

$ git grep qtest_big_endian tests/
tests/libqos/virtio-pci.c:    if (qtest_big_endian()) {
tests/libqtest.c:bool qtest_big_endian(void)
tests/libqtest.h: * qtest_big_endian:
tests/libqtest.h:bool qtest_big_endian(void);
tests/virtio-blk-test.c:    if (qtest_big_endian() != host_endian) {

> thanks
> -- PMM

Cheers.

--
Greg

  reply	other threads:[~2016-10-07 12:45 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 10:14 [Qemu-devel] [PATCH v2] qtest: ask endianness of the target in qtest_init() Laurent Vivier
2016-10-07 10:48 ` Greg Kurz
2016-10-07 10:57   ` Laurent Vivier
2016-10-07 12:27     ` Greg Kurz
2016-10-07 12:31       ` Peter Maydell
2016-10-07 12:45         ` Greg Kurz [this message]
2016-10-07 12:52           ` Peter Maydell
2016-10-07 12:56             ` Laurent Vivier
2016-10-07 13:08               ` Greg Kurz
2016-10-10  4:55   ` David Gibson
2016-10-10  9:18     ` Peter Maydell
2016-10-10 13:39       ` David Gibson
2016-10-10 14:10         ` Peter Maydell
2016-10-11  1:24           ` David Gibson
2016-10-11  3:56             ` David Gibson
2016-10-11  8:55             ` Peter Maydell
2016-10-11  9:56               ` David Gibson
2016-10-10  4:52 ` David Gibson

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=20161007144542.118082e2@bahia \
    --to=groug@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=lvivier@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.