All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Nathan Chancellor" <nathan@kernel.org>
Cc: "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	qemu-devel@nongnu.org, balaton@eik.bme.hu,
	"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: Thu, 30 Mar 2023 08:12:54 -0500	[thread overview]
Message-ID: <c8fd4b42-7c7b-8e65-5fe6-ed7d02644725@landley.net> (raw)
In-Reply-To: <cf1deca3-49ef-06a3-0f20-92c25968ae7d@linaro.org>

On 3/29/23 12:23, Philippe Mathieu-Daudé wrote:
> On 29/3/23 18:48, Rob Landley wrote:
>>>> Works fine for me. Somebody said it was the wrong fix but I don't remember why...
>>>
>>> This is a correct /partial/ fix. With this patch, Malta works on little
>>> endian hosts. No luck with big-endian hosts, but this was broken
>>> previous to 3db29dcac2 rework, so apparently not a big deal ¯\_(ツ)_/¯
>> 
>> No, big endian worked for me with that patch?
>> 
>> The build in my $PATH is QEMU emulator version 7.2.50
>> (v7.2.0-873-g65cc5ccf06-dirty) with that patch, and if you wget
>> https://landley.net/toybox/downloads/binaries/mkroot/0.8.9/mips.tgz and
>> ./run-emulator.sh in there, the virtual net can wget http://site (the sample
> 
> Oh, we are having some QEMU semantic confusion here...
> 
> You are testing a QEMU big-endian *guest* (or "target") in this example.
> 
> I presume you are testing on a little-endian *host* (x86_64, aarch64,
> ppc64el or mips64el).

Ah, yes.

I have not tried running qemu on a big endian host system in forever, but there
are some IBM people with great interest in supporting every possible thing on
s390x. Elizabeth Joseph would be one and would know a bunch more:

https://floss.social/@pleia2/110095815201601529

>> image hasn't got https:// support enabled because I didn't include the build
>> dependency), and the virtual disk works (if you do "./run-emulator.sh -hda
>> blah.img" anyway, the test wrapper I mentioned creates a squashfs image for it
>> to mount)). Without the patch I don't even get a PCI bus. Running "file
>> /bin/toybox" says MSB, and the mipsel image is the little endian one anyway. I
> 
> Here you describe the little-endian MIPS *target* image.

Which was broken without that patch, yes. So that's why the fix was "partial"...

>> also test s390x (which is big endian 64 bit), but I don't think this needed a
>> patch? (Hadn't been broken last I checked?)
> 
> Here you describe big-endian s390x *target* image.

I don't have s390x hardware to run it on. I do have an sh2eb board but it's
nommu and only has 128 megs of ram, so running qemu on it would be... unlikely.

> I expect if you run your test with QEMU v7.2.0-873-g65cc5ccf06-dirty
> on any big-endian *host* (like a s390x), the test fails.

I don't have powerpc mac hardware, which seems the easiest way to get such a
test system.

(Well, ok, the EASY way would be to feed qemu-system-s390x a couple gigs of ram
and then build and run qemu within qemu. While I do have a native toolchain for
s390x, qemu's grown an insane dependency stack these days that would be a pain
to bootstrap under a musl beyond-linux-from-scratch environment...)

Rob


  reply	other threads:[~2023-03-30 12:59 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é
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 [this message]
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=c8fd4b42-7c7b-8e65-5fe6-ed7d02644725@landley.net \
    --to=rob@landley.net \
    --cc=balaton@eik.bme.hu \
    --cc=berrange@redhat.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=nathan@kernel.org \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --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 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.