[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: change QARMA3 default for aarch64?
From: |
Peter Maydell |
Subject: |
Re: change QARMA3 default for aarch64? |
Date: |
Thu, 21 Mar 2024 17:26:46 +0000 |
On Thu, 21 Mar 2024 at 17:18, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 3/20/24 23:32, Michael Tokarev wrote:
> > Since commit v8.1.0-511-g399e5e7125 "target/arm: Implement FEAT_PACQARMA3",
> > pauth-qarma3 is the default pauth scheme. However this one is very slow.
>
> That patch only introduced qarma3, it didn't make it the default:
>
> static Property arm_cpu_pauth_property =
> DEFINE_PROP_BOOL("pauth", ARMCPU, prop_pauth, true);
> static Property arm_cpu_pauth_impdef_property =
> DEFINE_PROP_BOOL("pauth-impdef", ARMCPU, prop_pauth_impdef, false);
> +static Property arm_cpu_pauth_qarma3_property =
> + DEFINE_PROP_BOOL("pauth-qarma3", ARMCPU, prop_pauth_qarma3, false);
>
> Per the first line, default is still qarma5 (which is the slowest, afaik).
>
> I have not done any benchmarking for qarma3 at all, but it still *looks*
> significantly
> more complex than impdef.
>
> > When people run aarch64 code in qemu tcg, an immediate reaction is like,
> > "this seems to be a bug somewhere", since the code run insanely slower than
> > it was before.
> >
> > And this is very difficult to find as well, - the reason for that slowdown
> > is usually well hidden from an average soul.
> >
> > When the reason is actually discovered, people start changing settings in
> > various tools and configs to work around this issue. Qemu itself has
> > overrides, pauth-impdef=on, in various tests, to make the test run at
> > saner speed.
> >
> > After seeing how many issues people are having in debian with that, I'm
> > about to switch the default in debian build of qemu, because impdef,
> > while makes certain arm64-specific protection feature less effective,
> > is actually significantly more practical. I dislike changing the
> > defaults, but this is a situation when it needs to be done, imho.
> >
> > But before doing that, maybe it's better to change qemu default
> > instead? What do you think?
>
> I think it might be worth having -cpu max default to impdef.
Yes, I think this is probably on net a good idea (it's a migration
compat break but I think that's OK for 'max', right?). But in
IRC discussion it turned out that the perf loss mjt's users are
seeing is between 7.2 and 8.2, whereas we've had pauth be QARMA5
for much longer than that. So it seems like a good idea to track
down exactly what's caused it to appear as a problem now, before
we start changing the default.
thanks
-- PMM