From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [PATCH] target/arm: Provide always-false kvm_arm_*_supported() stubs for usermode
Date: Thu, 17 Jul 2025 10:29:27 -0700 [thread overview]
Message-ID: <2142f49e-d184-464b-ab39-7e291d436402@linaro.org> (raw)
In-Reply-To: <CAFEAcA_VSkK18twpmgQQHu+bQy2KPPzb4Ca0baoxBJ4KPiy=iA@mail.gmail.com>
On 7/17/25 10:12 AM, Peter Maydell wrote:
> On Thu, 17 Jul 2025 at 18:05, Pierrick Bouvier
> <pierrick.bouvier@linaro.org> wrote:
>> On 7/17/25 9:56 AM, Peter Maydell wrote:
>>> I'm not really a fan of relying on the compiler to fold stuff
>>> away -- it's fragile and there's no guarantee the compiler
>>> will actually do it. In this example it would be really easy
>>> for somebody coming along to tidy this up later to put the
>>> nested if()s back into a single if() condition and reintroduce
>>> the problem, for instance.
>>>
>>
>> There are various places where we already relied on that, including
>> before the single-binary work ({accel}_allowed).
>>
>> For the fragile aspect of it, that's why CI exists. Building all
>> binaries with clang --enable-debug should ensure no regression can be
>> introduced.
>
> But our CI can't check all versions of gcc and clang at
> all optimisation levels. The reason it's fragile is because
> there's never a guarantee that the compiler does it or what
> situations it will work vs not work. It's not a feature
> provided by the language or the compiler that you can fold
> away references to functions that don't exist; it just
> happens to work.
>
Sure, it's always a compromise, and it's overkill to try to cover all
the {os, compiler, version} possibilities.
That said, checking debug builds with available clang version in latest
ubuntu LTS + latest clang version published should already cover a lot
of cases, including new warnings that might appear.
I would be happy to help contribute on QEMU CI side, but in my personal
experience trying to approach concerned developers, either I didn't have
any answer, or received a "No, our minutes are precious".
I know your point of view (Engineers are already paid, minutes are not),
but it still doesn't make sense to me. I hope one day we can move away
from this paradigm, and really make a good usage of cpu time instead of
people time for testing things.
> I know we already rely on constant-folding in various
> places: I'm not super enthusiastic about those either.
>
> -- PMM
prev parent reply other threads:[~2025-07-17 20:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 13:51 [PATCH] target/arm: Provide always-false kvm_arm_*_supported() stubs for usermode Peter Maydell
2025-07-14 15:31 ` Pierrick Bouvier
2025-07-14 15:41 ` Pierrick Bouvier
2025-07-14 15:52 ` Richard Henderson
2025-07-14 17:38 ` Pierrick Bouvier
2025-07-15 20:43 ` Pierrick Bouvier
2025-07-14 19:49 ` Philippe Mathieu-Daudé
2025-07-17 16:56 ` Peter Maydell
2025-07-17 17:05 ` Pierrick Bouvier
2025-07-17 17:12 ` Peter Maydell
2025-07-17 17:29 ` Pierrick Bouvier [this message]
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=2142f49e-d184-464b-ab39-7e291d436402@linaro.org \
--to=pierrick.bouvier@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).