From: Paolo Bonzini <pbonzini@redhat.com>
To: Babu Moger <babu.moger@amd.com>, zhao1.liu@intel.com, bp@alien8.de
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [PATCH v2 2/2] target/i386: Add TSA feature flag verw-clear
Date: Thu, 9 Oct 2025 13:30:35 +0200 [thread overview]
Message-ID: <9e9f5f0b-ad40-44c2-97a3-9845f2e1ac6f@redhat.com> (raw)
In-Reply-To: <e6362672e3a67a9df661a8f46598335a1a2d2754.1752176771.git.babu.moger@amd.com>
On 7/10/25 21:46, Babu Moger wrote:
> Transient Scheduler Attacks (TSA) are new speculative side channel attacks
> related to the execution timing of instructions under specific
> microarchitectural conditions. In some cases, an attacker may be able to
> use this timing information to infer data from other contexts, resulting in
> information leakage
>
> CPUID Fn8000_0021 EAX[5] (VERW_CLEAR). If this bit is 1, the memory form of
> the VERW instruction may be used to help mitigate TSA.
>
> Link: https://www.amd.com/content/dam/amd/en/documents/resources/bulletin/technical-guidance-for-mitigating-transient-scheduler-attacks.pdf
> Co-developed-by: Borislav Petkov (AMD) <bp@alien8.de>
> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
> Signed-off-by: Babu Moger <babu.moger@amd.com>
Applied, thanks.
Paolo
> ---
> v2: Split the patches into two.
> Not adding the feature bit in CPU model now. Users can add the feature
> bits by using the option "-cpu EPYC-Genoa,+verw-clear".
>
> v1: https://lore.kernel.org/qemu-devel/20250709104956.GAaG5JVO-74EF96hHO@fat_crate.local/
> ---
> target/i386/cpu.c | 2 +-
> target/i386/cpu.h | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index 2cd07b86b5..d46bc65e44 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -1274,7 +1274,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
> .type = CPUID_FEATURE_WORD,
> .feat_names = {
> "no-nested-data-bp", "fs-gs-base-ns", "lfence-always-serializing", NULL,
> - NULL, NULL, "null-sel-clr-base", NULL,
> + NULL, "verw-clear", "null-sel-clr-base", NULL,
> "auto-ibrs", NULL, NULL, NULL,
> NULL, NULL, NULL, NULL,
> NULL, NULL, NULL, NULL,
> diff --git a/target/i386/cpu.h b/target/i386/cpu.h
> index 6a9eb2dbf7..4127acf1b1 100644
> --- a/target/i386/cpu.h
> +++ b/target/i386/cpu.h
> @@ -1102,6 +1102,8 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w);
> #define CPUID_8000_0021_EAX_FS_GS_BASE_NS (1U << 1)
> /* LFENCE is always serializing */
> #define CPUID_8000_0021_EAX_LFENCE_ALWAYS_SERIALIZING (1U << 2)
> +/* Memory form of VERW mitigates TSA */
> +#define CPUID_8000_0021_EAX_VERW_CLEAR (1U << 5)
> /* Null Selector Clears Base */
> #define CPUID_8000_0021_EAX_NULL_SEL_CLR_BASE (1U << 6)
> /* Automatic IBRS */
next prev parent reply other threads:[~2025-10-09 11:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 19:46 [PATCH v2 1/2] target/i386: Add TSA attack variants TSA-SQ and TSA-L1 Babu Moger
2025-07-10 19:46 ` [PATCH v2 2/2] target/i386: Add TSA feature flag verw-clear Babu Moger
2025-07-16 4:55 ` Zhao Liu
2025-07-16 6:28 ` Xiaoyao Li
2025-10-09 11:30 ` Paolo Bonzini [this message]
2025-07-15 22:22 ` [PATCH v2 1/2] target/i386: Add TSA attack variants TSA-SQ and TSA-L1 Moger, Babu
2025-07-16 4:53 ` Zhao Liu
2025-07-16 6:27 ` Xiaoyao Li
2025-10-09 11:30 ` Paolo Bonzini
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=9e9f5f0b-ad40-44c2-97a3-9845f2e1ac6f@redhat.com \
--to=pbonzini@redhat.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=zhao1.liu@intel.com \
/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).