On 13/11/26 19:55, Peter Maydell wrote:
On Fri, 13 Nov 2026 at 18:39, Richard Henderson
<[email protected]> wrote:

On 11/12/26 11:08, Philippe Mathieu-Daudé wrote:
Since v1:
- add ./configure error msg
- cover ARM32

This series lets qemu-aarch64 run both little- and big-endian
ELF binaries, retaining qemu-aarch64_be as a compatibility alias.

Why would we want to do this?  qemu-aarch64_be exists, but is
essentially unused.  It's certainly not supported by upstream Linux.

I know the kernel just dropped big-endian kernel support
recently, but did that also extend to userspace ?

(We should check with the kernel and gcc folks about
whether/when it makes sense to deprecate qemu-aarch64_be.)

Having runtime selection of endianness seems silly within that context.

As a more general question, is this something we would want
for architectures where both endiannesses are relevant (e.g.
mips, ppc64)? At the moment we consistently for all targets
handle big vs little endian as "it's a separate target with
its own executable". That's convenient because you can at
compile time hardwire in things like variations in struct
layout between the two. We could switch to doing that kind
of thing at runtime, but what is the benefit we're aiming
for by doing that?

I did the other conversions (Microblaze, Xtensa, PPC, MIPS, SH4)
and wanted to test the water first where this would get more attention,
with the series involving less changes.

My motivation is MIPS where we currently have 6 binaries and I'd like
to add binaries to cover more ABIs without having a combinatory
explosion and have 18 linux-user MIPS binaries. With this approach I
reduced the current MIPS set to 3 binaries and add 2 more, ending with
5 covering more ABIs instead of currently 6.

In order to get there I need the few core changes introduced in this
series, which affect all user binaries. I have the idea ARM users are
the first ones interested by no performance change thus is where
I started the benchmark to prove this approach have no impact in emulation.

The TargetInfo structure change (one initializer LTO-protected and
all accessors via read-only exposed structure) is also what Richard
was very keen to have (page size support planned) instead of the
current approach.

I'm thus returning the question as: why would we not want to do this?

Regards,

Phil.

Reply via email to