From: "Andreas Färber" <andreas.faerber@web.de>
To: "Hervé Poussineau" <hpoussin@reactos.org>,
"Alexander Graf" <agraf@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
Bruce Rogers <brogers@suse.com>
Subject: Re: [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region
Date: Mon, 07 Apr 2014 21:32:43 +0200 [thread overview]
Message-ID: <5342FD5B.1020203@web.de> (raw)
In-Reply-To: <53406704.7060705@reactos.org>
Am 05.04.2014 22:26, schrieb Hervé Poussineau:
> Hi Andreas,
>
> Le sam. 05 avril 2014 17:41:43 CEST, Andreas Färber a écrit :
>> Hi Hervé,
>>
>> Am 20.03.2014 00:36, schrieb Andreas Färber:
>>> From: Hervé Poussineau <hpoussin@reactos.org>
>>>
>>> Remove now duplicated code from prep board.
>>>
>>> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
>>> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
>>> ---
>>> hw/pci-host/prep.c | 85
>>> ++++++++++++++++++++++++++++++++++++++++++++++++
>>> hw/ppc/prep.c | 94
>>> ++----------------------------------------------------
>>> 2 files changed, 88 insertions(+), 91 deletions(-)
>>
>> I'm facing endianness-test failures in -rc1 on both openSUSE ppc/ppc64
>> and OSX ppc64 (below) as well as "broken pipe" on OSX ppc.
>>
>> $ make check-qtest-ppc V=1
>> [...]
>> /ppc/endianness/prep: **
>> ERROR:/Users/andreas/QEMU/tests/endianness-test.c:131:test_endianness:
>> assertion failed (isa_inw(test, 0xe2) == 0x8765): (0x00004321 ==
>> 0x00008765)
>> FAIL
>> [...]
>> /ppc/endianness/split/prep: **
>> ERROR:/Users/andreas/QEMU/tests/endianness-test.c:206:test_endianness_split:
>>
>> assertion failed (isa_inw(test, 0xe2) == 0x8765): (0x00004321 ==
>> 0x00008765)
>> FAIL
>> [...]
>> /ppc/endianness/combine/prep: **
>> ERROR:/Users/andreas/QEMU/tests/endianness-test.c:253:test_endianness_combine:
>>
>> assertion failed (isa_inw(test, 0xea) == 0x8765): (0x00004321 ==
>> 0x00008765)
>> FAIL
>> [...]
>> FAIL: tests/endianness-test
>>
>> On x86 everything is fine. git-bisect points to this commit.
>>
>> There is one "FIXME: handle endianness switch" in here, but I don't spot
>> such code where it's being moved from either.
>>
>> My suspect is the cpu_inw() -> ldl_p() change, but I'm unsure whether
>> the code or the test is wrong...
>
> Code removed in this commit was using DEVICE_NATIVE_ENDIAN, and then
> using cpu_inl, which does a ldl_p.
> Code added in this commit is using DEVICE_LITTLE_ENDIAN, and then is
> using ldl_p.
> So, yes, it seems that endianness of memory region does change things.
> Native endian means native endian of the guest of of the host?
>
> I also checked tests/endianness-test.c.
> The failing test is:
> isa_outl(test, 0xe0, 0x87654321);
> g_assert_cmphex(isa_inl(test, 0xe0), ==, 0x87654321);
> g_assert_cmphex(isa_inw(test, 0xe2), ==, 0x8765);
> g_assert_cmphex(isa_inw(test, 0xe0), ==, 0x4321);
> which seems perfectly valid as ISA is little-endian.
>
> However, PReP is marked as bswap= true in this file, which means that
> values are inverted before writing and after reading them.
I tested .bswap = false - that fixes ppc64 host but breaks x86_64 host.
Any further suggestions anyone?
Regards,
Andreas
> Paolo, what does it mean? It is supposed to be true for big endian
> machines, and false for little endian machines ?
>
> Hervé
next prev parent reply other threads:[~2014-04-07 19:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 23:35 [Qemu-devel] [PULL for-2.0-rc1 0/7] PReP patch queue 2014-03-20 Andreas Färber
2014-03-19 23:36 ` [Qemu-devel] [PULL for-2.0 1/7] raven: Rename intack region to pci_intack Andreas Färber
2014-03-19 23:36 ` [Qemu-devel] [PULL for-2.0 2/7] raven: Implement non-contiguous I/O region Andreas Färber
2014-04-05 15:41 ` Andreas Färber
2014-04-05 20:26 ` Hervé Poussineau
2014-04-05 20:34 ` Alexander Graf
2014-04-05 20:50 ` Hervé Poussineau
2014-04-05 23:20 ` Peter Maydell
2014-04-07 19:31 ` Paolo Bonzini
2014-04-08 14:37 ` Peter Maydell
2014-04-08 18:39 ` Paolo Bonzini
2014-04-08 18:55 ` Peter Maydell
2014-04-08 20:27 ` Paolo Bonzini
2014-04-08 20:56 ` Peter Maydell
2014-04-07 19:32 ` Andreas Färber [this message]
2014-04-07 20:40 ` Andreas Färber
2014-04-07 21:21 ` Peter Maydell
2014-03-19 23:36 ` [Qemu-devel] [PULL for-2.0 3/7] raven: Set a correct PCI I/O memory region Andreas Färber
2014-03-19 23:36 ` [Qemu-devel] [PULL for-2.0 4/7] raven: Set a correct PCI " Andreas Färber
2014-03-19 23:36 ` [Qemu-devel] [PULL for-2.0 5/7] raven: Add PCI bus mastering address space Andreas Färber
2014-03-19 23:36 ` [Qemu-devel] [PULL for-2.0 6/7] raven: Fix PCI bus accesses with size > 1 Andreas Färber
2014-03-19 23:36 ` [Qemu-devel] [PULL for-2.0 7/7] raven: Use raven_ for all function prefixes Andreas Färber
2014-03-20 0:22 ` [Qemu-devel] [PULL for-2.0-rc1 0/7] PReP patch queue 2014-03-20 Peter Maydell
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=5342FD5B.1020203@web.de \
--to=andreas.faerber@web.de \
--cc=agraf@suse.de \
--cc=brogers@suse.com \
--cc=hpoussin@reactos.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).