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: David Gibson
Subject: Re: [Qemu-devel] [PATCH v2] qtest: ask endianness of the target in qtest_init()
Date: Tue, 11 Oct 2016 00:39:54 +1100
User-agent: Mutt/1.7.0 (2016-08-17)

On Mon, Oct 10, 2016 at 10:18:40AM +0100, Peter Maydell wrote:
> On 10 October 2016 at 05:55, David Gibson <address@hidden> wrote:
> > 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.
> 
> The test case isn't testing the hardware (device), though, it's
> testing the hardware in a system. The same device in QEMU board A
> could be behind a bridge or otherwise differently wired by
> the SoC from the device in QEMU board B. The qtest setup
> doesn't instantiate a device and talk directly to it, it
> instantiates a board and talks over the same interface the
> emulated CPU would.

If your bridges change the effective endianness of your device, then
your bridge hardware design is broken.  Such boards exist but they
are, thankfully, rare.

In the overwhelming majority of cases the endianness of the device is
known independent of the guest CPU and board.

-- 
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: signature.asc
Description: PGP signature


reply via email to

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