From: David Gibson <david@gibson.dropbear.id.au>
To: Greg Kurz <groug@kaod.org>
Cc: Laurent Vivier <lvivier@redhat.com>,
qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v2] qtest: ask endianness of the target in qtest_init()
Date: Mon, 10 Oct 2016 15:55:52 +1100 [thread overview]
Message-ID: <20161010045552.GC22498@umbus.fritz.box> (raw)
In-Reply-To: <20161007124849.7c867d79@bahia>
[-- Attachment #1: Type: text/plain, Size: 1829 bytes --]
On Fri, Oct 07, 2016 at 12:48:49PM +0200, Greg Kurz wrote:
> On Fri, 7 Oct 2016 12:14:27 +0200
> Laurent Vivier <lvivier@redhat.com> 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 <lvivier@redhat.com>
> > CC: Greg Kurz <groug@kaod.org>
> > CC: David Gibson <david@gibson.dropbear.id.au>
> > CC: Peter Maydell <peter.maydell@linaro.org>
> > ---
> > 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 agree in principle.
However right now - until we get fixed-endianness qtest accessors of
some sort - this test is more or less necessary to make most tests
cross platform correct (except PCI, see below). That's because the
testcase will generally know the endianness of the hardware it's
testing, but has to compensate for the endianness that the
readw/writew primitives will use along the way.
For PCI we side steo this, because the PCI read/write wrappers are
already target specific, and include unconditional swaps to
compoensate for the "guest endianness".
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-10-10 5:59 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
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 [this message]
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=20161010045552.GC22498@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--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.