79c4324644
Change-Id: I2d302dda68298877c65c99147f5bf22186a59aac
62 lines
2.2 KiB
Diff
62 lines
2.2 KiB
Diff
From 9a56c714caaf3bf31430a769befdf92e79388dda Mon Sep 17 00:00:00 2001
|
|
From: Quanxian Wang <quanxian.wang@intel.com>
|
|
Date: Wed, 8 Nov 2023 12:46:00 +0800
|
|
Subject: [PATCH] target/i386: Add support for PREFETCHIT0/1 in CPUID
|
|
enumeration
|
|
|
|
commit d1a1111514333e46a98b136235f71eef90d610fa upstream.
|
|
|
|
Latest Intel platform Granite Rapids has introduced a new instruction -
|
|
PREFETCHIT0/1, which moves code to memory (cache) closer to the
|
|
processor depending on specific hints.
|
|
|
|
The bit definition:
|
|
CPUID.(EAX=7,ECX=1):EDX[bit 14]
|
|
|
|
Add CPUID definition for PREFETCHIT0/1.
|
|
|
|
Intel-SIG: commit d1a111151433 target/i386: Add support for PREFETCHIT0/1 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-7-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 d36174d689..ee243693e3 100644
|
|
--- a/target/i386/cpu.c
|
|
+++ b/target/i386/cpu.c
|
|
@@ -913,7 +913,7 @@ FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
|
|
NULL, NULL, NULL, NULL,
|
|
"avx-vnni-int8", "avx-ne-convert", NULL, NULL,
|
|
NULL, NULL, NULL, NULL,
|
|
- NULL, NULL, NULL, NULL,
|
|
+ NULL, NULL, "prefetchiti", NULL,
|
|
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 93c8bd6a13..32ecec5fa7 100644
|
|
--- a/target/i386/cpu.h
|
|
+++ b/target/i386/cpu.h
|
|
@@ -900,6 +900,8 @@ uint64_t x86_cpu_get_supported_feature_word(FeatureWord w,
|
|
#define CPUID_7_1_EDX_AVX_VNNI_INT8 (1U << 4)
|
|
/* AVX NE CONVERT Instructions */
|
|
#define CPUID_7_1_EDX_AVX_NE_CONVERT (1U << 5)
|
|
+/* PREFETCHIT0/1 Instructions */
|
|
+#define CPUID_7_1_EDX_PREFETCHITI (1U << 14)
|
|
|
|
/* Do not exhibit MXCSR Configuration Dependent Timing (MCDT) behavior */
|
|
#define CPUID_7_2_EDX_MCDT_NO (1U << 5)
|
|
--
|
|
2.27.0
|
|
|