From: Borislav Petkov <bp@alien8.de>
To: Hao Peng <flyingpenghao@gmail.com>
Cc: tglx@linutronix.de, mingo@redhat.com, x86@kernel.org,
linux-kernel@vger.kernel.org,
Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Subject: Re: [PATCH] x86/tsx: clear RTM and HLE when MSR_IA32_TSX_CTRL is not supported
Date: Mon, 6 Sep 2021 11:30:01 +0200 [thread overview]
Message-ID: <YTXfmRIwWREJgEU9@zn.tnic> (raw)
In-Reply-To: <CAPm50aJyfxobKhTrS=dC3pQmM5EbwY2xunet3X5XgnnFUEMmBA@mail.gmail.com>
On Mon, Sep 06, 2021 at 10:46:05AM +0800, Hao Peng wrote:
> If hypervisor does not support MSR_IA32_TSX_CTRL, but guest supports
> RTM and HLE features, it will affect TAA mitigation.
>
> Signed-off-by: Peng Hao <flyingpeng@tencent.com>
> ---
> arch/x86/kernel/cpu/tsx.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/x86/kernel/cpu/tsx.c b/arch/x86/kernel/cpu/tsx.c
> index 9c7a5f049292..5e852c14fef2 100644
> --- a/arch/x86/kernel/cpu/tsx.c
> +++ b/arch/x86/kernel/cpu/tsx.c
> @@ -122,6 +122,13 @@ void __init tsx_init(void)
>
> if (!tsx_ctrl_is_supported()) {
> tsx_ctrl_state = TSX_CTRL_NOT_SUPPORTED;
> +
> + /* If hypervisor does not support MSR_IA32_TSX_CTRL emulation,
> + * but guest supports RTM and HLE features, it will affect TAA
> + * (tsx_async_abort)mitigation.
> + */
> + setup_clear_cpu_cap(X86_FEATURE_RTM);
> + setup_clear_cpu_cap(X86_FEATURE_HLE);
> return;
> }
How does that even happen - the hypervisor does not support the MSR but
"guest supports" TSX features?!
I guess the guest is detecting it wrong.
What hypervisor, what guest, how do I reproduce?
Please give full details.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2021-09-06 9:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 2:46 Hao Peng
2021-09-06 9:30 ` Borislav Petkov [this message]
2021-09-07 1:47 ` Hao Peng
2021-09-07 2:08 ` Xiaoyao Li
2021-09-07 2:35 ` Hao Peng
2021-09-07 2:56 ` Xiaoyao Li
2021-09-07 3:40 ` Hao Peng
2021-09-07 4:26 ` Xiaoyao Li
2021-09-07 4:39 ` Hao Peng
2021-09-07 5:38 ` Pawan Gupta
2021-09-07 6:56 ` Hao Peng
2021-09-07 23:07 ` Pawan Gupta
2021-09-07 5:28 ` Pawan Gupta
2021-09-07 5:14 ` Pawan Gupta
2021-09-07 6:36 ` Hao Peng
2021-09-07 22:59 ` Pawan Gupta
2021-09-08 5:06 ` Hao Peng
2021-09-08 16:02 ` Pawan Gupta
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=YTXfmRIwWREJgEU9@zn.tnic \
--to=bp@alien8.de \
--cc=flyingpenghao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=tglx@linutronix.de \
--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
all inboxes | Powered by JetHome®