From: Andrea Bolognani <abologna@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Alistair Francis <alistair23@gmail.com>,
qemu-devel@nongnu.org, Laurent Vivier <laurent@vivier.eu>,
David Abdurachmanov <davidlt@rivosinc.com>
Subject: Re: [PATCH] binfmt: Don't consider riscv{32, 64} part of the same family
Date: Mon, 6 Jan 2025 12:54:41 -0500 [thread overview]
Message-ID: <CABJz62Myvg==rTWpjHhB9MWufZ_AMoMJv6Jtmf4i3isQt=sV1w@mail.gmail.com> (raw)
In-Reply-To: <Z3vFRrkjIEa-LaqU@redhat.com>
On Mon, Jan 06, 2025 at 11:57:58AM +0000, Daniel P. Berrangé wrote:
> On Mon, Jan 06, 2025 at 11:47:00AM +0000, Peter Maydell wrote:
> > On Mon, 6 Jan 2025 at 01:29, Alistair Francis <alistair23@gmail.com> wrote:
> > > We didn't get an answer to the issue of a CPU supporting RV32 and yet
> > > the kernel still calls QEMU.
> > >
> > > I understand this allows things to work out of the box, but seems like
> > > a disservice to any hardware that does support RV32
> >
> > There's the same thing on Arm too -- we don't set up qemu-user
> > aarch32 binfmt-misc on an aarch64 system because the host might
> > be able to natively execute the aarch32 binary. This is becoming
> > less true, but we still don't want to silently downgrade
> > native execution to emulation on the hosts where native execution
> > used to work.
>
> Arm is a bigger problem as historically there genuinely was a
> non-trivial set of CPUs with 32-on-64 support in HW.
>
> IIUC, the riscv situation is much less likely to be a real problem
Exactly.
My understanding is that, while 64-bit RISC-V CPUs that can natively
run 32-bit applications are theoretically possible, no such CPU
actually exists right now.
Even if it did exist, distros would have to set up things to support
this scenario, which they don't.
So in the current situation we're effectively making it impossible to
run riscv32 binaries on riscv64 for the benefit of a hypotetical
scenario.
> As a immediate bandaid, I'd suggest that qemu-binfmt-conf.sh could keep
> its current logic as the default, and have a switch "--32-on-64" [1] to
> tell it to generate the binfmt for 32-bit arch, even if 64-bit arch
> could have 32-bit support.
>
> Distros/users could then choose whether to pass --32-on-64 when statically
> generating the binfmt files.
While I'm still convinced that this patch could be safely applied
as-is, I'd be happy to go with your proposed approach if doing so
would help move things forward.
--
Andrea Bolognani / Red Hat / Virtualization
next prev parent reply other threads:[~2025-01-06 17:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 9:47 [PATCH] binfmt: Don't consider riscv{32,64} part of the same family Andrea Bolognani
2024-12-03 9:59 ` Philippe Mathieu-Daudé
2024-12-03 10:12 ` [PATCH] binfmt: Don't consider riscv{32, 64} " Andrea Bolognani
2024-12-03 10:18 ` [PATCH] binfmt: Don't consider riscv{32,64} " Daniel P. Berrangé
2024-12-03 10:35 ` [PATCH] binfmt: Don't consider riscv{32, 64} " Peter Maydell
2024-12-03 13:57 ` [PATCH] binfmt: Don't consider riscv{32,64} " Richard Henderson
2024-12-04 10:17 ` Daniel P. Berrangé
2024-12-05 17:15 ` Laurent Vivier
2024-12-04 10:03 ` Laurent Vivier
2025-01-02 16:02 ` [PATCH] binfmt: Don't consider riscv{32, 64} " Andrea Bolognani
2025-01-06 1:27 ` Alistair Francis
2025-01-06 11:47 ` Peter Maydell
2025-01-06 11:57 ` Daniel P. Berrangé
2025-01-06 12:01 ` Peter Maydell
2025-01-06 17:54 ` Andrea Bolognani [this message]
2025-01-07 1:29 ` Alistair Francis
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='CABJz62Myvg==rTWpjHhB9MWufZ_AMoMJv6Jtmf4i3isQt=sV1w@mail.gmail.com' \
--to=abologna@redhat.com \
--cc=alistair23@gmail.com \
--cc=berrange@redhat.com \
--cc=davidlt@rivosinc.com \
--cc=laurent@vivier.eu \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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).