From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
qemu-devel@nongnu.org, balaton@eik.bme.hu,
"Rob Landley" <rob@landley.net>,
"Bernhard Beschow" <shentey@gmail.com>,
"Thomas Huth" <thuth@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>
Subject: Re: [PATCH] hw/mips/gt64xxx_pci: Don't endian-swap GT_PCI0_CFGADDR
Date: Tue, 28 Mar 2023 19:02:29 +0200 [thread overview]
Message-ID: <edea2619-8fe9-638e-cfa0-684123f7ee99@linaro.org> (raw)
In-Reply-To: <20230320165821.GA4064187@dev-arch.thelio-3990X>
On 20/3/23 17:58, Nathan Chancellor wrote:
> On Wed, Mar 08, 2023 at 12:33:38AM +0100, Philippe Mathieu-Daudé wrote:
>> On 23/2/23 17:19, Jiaxun Yang wrote:
>>> 145e2198d749 ("hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE
>>> MemoryRegionOps") converted CFGADDR/CFGDATA registers to use PCI_HOST_BRIDGE's
>>> accessor facility and enabled byte swap for both CFGADDR/CFGDATA register.
>>>
>>> However CFGADDR as a ISD internal register is not controled by MByteSwap
>>> bit, it follows endian of all other ISD register, which means it ties to
>>> little endian.
>>>
>>> Move mapping of CFGADDR out of gt64120_update_pci_cfgdata_mapping to disable
>>> endian-swapping.
>>>
>>> This should fix some recent reports about poweroff hang.
>>>
>>> Fixes: 145e2198d749 ("hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps")
>>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>>> ---
>>> hw/pci-host/gt64120.c | 18 ++++++------------
>>> 1 file changed, 6 insertions(+), 12 deletions(-)
>>
>> So this works on little-endian hosts, but fails on
>> big-endian ones :(
>>
>> I.e. on Linux we have early_console_write() -> prom_putchar()
>> looping:
>>
>> IN: prom_putchar
>> 0x8010fab8: lbu v0,0(v1)
>> 0x8010fabc: andi v0,v0,0x20
>> 0x8010fac0: beqz v0,0x8010fab8
>> 0x8010fac4: andi v0,a0,0xff
>>
>> gt64120: Illegal register read reg:0x3fc size:4 value:0x00000000
>> gt64120: Illegal register read reg:0x3fc size:4 value:0x00000000
>> gt64120: Illegal register read reg:0x3fc size:4 value:0x00000000
>> gt64120: Illegal register read reg:0x3fc size:4 value:0x00000000
>> gt64120: Illegal register read reg:0x3fc size:4 value:0x00000000
>> ...
>>
>
> Is there going to be a new version of this patch or a different solution
> to the poweroff hang then? I am still seeing that with tip of tree QEMU
> and I see 8.0.0-rc0 has been tagged; I would hate for this to end up in
> a release version.
I couldn't work a fix, however I ran our (new) tests on merge
commit 3db29dcac2 which is before the offending commit 145e2198d749,
and they fail. So I suppose Malta on big-endian host is badly broken
since quite some time. Thus clearly nobody tests/runs Malta there.
Is it worth fixing old bugs nobody hit / reported?
Should we stop wasting CI resources testing MIPS on big-endian hosts?
Meanwhile, queuing this again.
next prev parent reply other threads:[~2023-03-28 17:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 16:19 [PATCH] hw/mips/gt64xxx_pci: Don't endian-swap GT_PCI0_CFGADDR Jiaxun Yang
2023-02-23 21:57 ` Philippe Mathieu-Daudé
2023-02-24 16:49 ` Nathan Chancellor
2023-02-25 19:42 ` Philippe Mathieu-Daudé
2023-03-07 23:33 ` Philippe Mathieu-Daudé
2023-03-20 16:58 ` Nathan Chancellor
2023-03-28 17:02 ` Philippe Mathieu-Daudé [this message]
2023-03-29 8:55 ` Thomas Huth
2023-03-29 16:33 ` Rob Landley
2023-03-29 16:09 ` Rob Landley
2023-03-29 16:07 ` Philippe Mathieu-Daudé
2023-03-29 16:48 ` Rob Landley
2023-03-29 17:23 ` Philippe Mathieu-Daudé
2023-03-30 13:12 ` Rob Landley
2023-03-30 13:14 ` Thomas Huth
2023-03-30 10:09 ` Thomas Huth
2023-03-30 14:27 ` Philippe Mathieu-Daudé
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=edea2619-8fe9-638e-cfa0-684123f7ee99@linaro.org \
--to=philmd@linaro.org \
--cc=balaton@eik.bme.hu \
--cc=berrange@redhat.com \
--cc=jiaxun.yang@flygoat.com \
--cc=nathan@kernel.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rob@landley.net \
--cc=shentey@gmail.com \
--cc=thuth@redhat.com \
/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).