On Mon, 16 Nov 2026 at 16:31, Pierrick Bouvier
<[email protected]> wrote:
>
> On 11/16/2026 2:00 AM, Peter Maydell wrote:
> > On Mon, 16 Nov 2026 at 08:53, Philippe Mathieu-Daudé
> > <[email protected]> wrote:
> >>
> >> On 13/11/26 19:55, Peter Maydell wrote:
> >>> 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?
> >
> > Mostly because what we have today works, and the idea of "the
> > target ABI is known at compile-time" is quite deeply embedded in the
> > way the linux-user code is written (both in terms of ifdefs and
> > also C types being defined appropriately for one specific ABI).
> >
>
> The last part is what we had for system mode, and precisely what we have
> been able to eliminate while working on the single-binary.

Yes, but it's taken a lot of work to get to that point. For
system mode we had some clear reasons why that work was
necessary and worthwhile. For user-mode it's less clear to me.
Keeping the zoo of MIPS ABIs under control seems the most
promising reason.

For aarch64 in particular I would prefer to deprecate-and-drop
big-endian support (probably starting with the deprecation for
12.0, rather than pushing it into 11.2), since the kernel just
did that in 7.4.

thanks
-- PMM

Reply via email to