62 lines
2.2 KiB
Diff
62 lines
2.2 KiB
Diff
|
|
From 25d08629eab566f5a47bf915a86e20318ee1cf08 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Jiaxi Chen <jiaxi.chen@linux.intel.com>
|
||
|
|
Date: Fri, 3 Mar 2023 14:59:08 +0800
|
||
|
|
Subject: [PATCH] target/i386: Add support for CMPCCXADD in CPUID enumeration
|
||
|
|
|
||
|
|
commit a9ce107fd0f2017af84255a9cf6542fa3eb3e214 upstream.
|
||
|
|
|
||
|
|
CMPccXADD is a new set of instructions in the latest Intel platform
|
||
|
|
Sierra Forest. This new instruction set includes a semaphore operation
|
||
|
|
that can compare and add the operands if condition is met, which can
|
||
|
|
improve database performance.
|
||
|
|
|
||
|
|
The bit definition:
|
||
|
|
CPUID.(EAX=7,ECX=1):EAX[bit 7]
|
||
|
|
|
||
|
|
Add CPUID definition for CMPCCXADD.
|
||
|
|
|
||
|
|
Intel-SIG: commit a9ce107fd0f2 target/i386: Add support for CMPCCXADD in CPUID enumeration.
|
||
|
|
Backport GNR and SRF ISA into QEMU-6.2
|
||
|
|
|
||
|
|
Signed-off-by: Jiaxi Chen <jiaxi.chen@linux.intel.com>
|
||
|
|
Signed-off-by: Tao Su <tao1.su@linux.intel.com>
|
||
|
|
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
|
||
|
|
Message-Id: <20230303065913.1246327-2-tao1.su@linux.intel.com>
|
||
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||
|
|
[ Quanxian Wang: amend commit log ]
|
||
|
|
Signed-off-by: Quanxian Wang <quanxian.wang@intel.com>
|
||
|
|
---
|
||
|
|
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 58124071da..47c2d9da80 100644
|
||
|
|
--- a/target/i386/cpu.c
|
||
|
|
+++ b/target/i386/cpu.c
|
||
|
|
@@ -872,7 +872,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
|
||
|
|
.type = CPUID_FEATURE_WORD,
|
||
|
|
.feat_names = {
|
||
|
|
NULL, NULL, NULL, NULL,
|
||
|
|
- "avx-vnni", "avx512-bf16", NULL, NULL,
|
||
|
|
+ "avx-vnni", "avx512-bf16", NULL, "cmpccxadd",
|
||
|
|
NULL, NULL, "fzrm", "fsrs",
|
||
|
|
"fsrc", NULL, NULL, NULL,
|
||
|
|
NULL, NULL, NULL, NULL,
|
||
|
|
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
|
||
|
|
index 37c687d4d8..4a7362ee07 100644
|
||
|
|
--- a/target/i386/cpu.h
|
||
|
|
+++ b/target/i386/cpu.h
|
||
|
|
@@ -883,6 +883,8 @@ uint64_t x86_cpu_get_supported_feature_word(FeatureWord w,
|
||
|
|
#define CPUID_7_1_EAX_AVX_VNNI (1U << 4)
|
||
|
|
/* AVX512 BFloat16 Instruction */
|
||
|
|
#define CPUID_7_1_EAX_AVX512_BF16 (1U << 5)
|
||
|
|
+/* CMPCCXADD Instructions */
|
||
|
|
+#define CPUID_7_1_EAX_CMPCCXADD (1U << 7)
|
||
|
|
/* Fast Zero REP MOVS */
|
||
|
|
#define CPUID_7_1_EAX_FZRM (1U << 10)
|
||
|
|
/* Fast Short REP STOS */
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|