From: Borislav Petkov <bp@alien8.de>
To: Mike Hommey <mh@glandium.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/boot: Delay BSP init until after FPU initialization
Date: Sun, 20 Sep 2020 10:36:26 +0200 [thread overview]
Message-ID: <20200920083626.GA7473@zn.tnic> (raw)
In-Reply-To: <20200920010310.10961-1-mh@glandium.org>
On Sun, Sep 20, 2020 at 10:03:10AM +0900, Mike Hommey wrote:
> FPU initialization handles the clearcpuid command line argument. If it
> comes after BSP init, clearcpuid cannot be used to disable features that
> trigger some parts of the BSP init code.
>
> Signed-off-by: Mike Hommey <mh@glandium.org>
> ---
> arch/x86/kernel/cpu/common.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> I was trying to use clearcpuid=440 to disable X86_FEATURES_AMD_SSBD to
> reproduce the behavior that happens on Zen/Zen+ on a Zen2 machine, but
> that didn't work because the command line is handled after the setup for
> X86_FEATURE_LS_CFG_SSBD.
>
> I tought about either moving the command line handling earlier, but it
> seems there wasn't a specific reason for BSP init being earlier than FPU
> initialization so I went with reordering those instead.
Our boot order is fragile and the functionality in
fpu__init_parse_early_param() which does the clearcpuid= parsing should be
independent from FPU, as your use case shows.
So I'd prefer if you moved that function perhaps to right after the call
setup_force_cpu_cap(X86_FEATURE_CPUID);
in early_identify_cpu() and renamed it to something generic instead.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2020-09-20 8:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-20 1:03 [PATCH] x86/boot: Delay BSP init until after FPU initialization Mike Hommey
2020-09-20 8:36 ` Borislav Petkov [this message]
2020-09-20 22:00 ` [PATCH v2] x86/boot: Handle fpu-related and clearcpuid command line arguments earlier Mike Hommey
2020-09-21 13:10 ` Borislav Petkov
2020-09-21 21:56 ` [PATCH v3] " Mike Hommey
2020-09-22 9:25 ` [tip: x86/fpu] x86/fpu: Handle FPU-related " tip-bot2 for Mike Hommey
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=20200920083626.GA7473@zn.tnic \
--to=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mh@glandium.org \
--cc=x86@kernel.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