Add tsa-fill-no feature bit to cpuid 0x80000021.ECX. This feature bit
indicates that the CPU is not vulnerable to TSA-FILL.

All Zen architectures other than Zen5 (EPYC-Turin) are not susceptible
to TSA-FILL.

Signed-off-by: Ben Cheatham <[email protected]>
---
 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 e5ffb10d1565..f047fe8a90a7 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -1453,7 +1453,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
         .type = CPUID_FEATURE_WORD,
         .feat_names = {
             NULL, "tsa-sq-no", "tsa-l1-no", NULL,
-            NULL, NULL, NULL, NULL,
+            NULL, NULL, NULL, "tsa-fill-no",
             NULL, NULL, NULL, NULL,
             NULL, NULL, NULL, NULL,
             NULL, NULL, NULL, NULL,
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 641f3ee5c2fd..fe91a0255b6d 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1228,6 +1228,8 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, 
FeatureWord w);
 #define CPUID_8000_0021_ECX_TSA_SQ_NO  (1U << 1)
 /* CPU is not vulnerable TSA SA-L1 attack */
 #define CPUID_8000_0021_ECX_TSA_L1_NO  (1U << 2)
+/* CPU is not vulnerable TSA FILL attack */
+#define CPUID_8000_0021_ECX_TSA_FILL_NO (1U << 7)
 
 /* Performance Monitoring Version 2 */
 #define CPUID_8000_0022_EAX_PERFMON_V2  (1U << 0)
-- 
2.53.0


Reply via email to