|
|
169b9a |
From 1d9d6bd6721a92ae161bd7a4e9de202691b90da0 Mon Sep 17 00:00:00 2001
|
|
|
169b9a |
From: "plai@redhat.com" <plai@redhat.com>
|
|
|
169b9a |
Date: Tue, 8 May 2018 17:40:48 +0200
|
|
|
169b9a |
Subject: [PATCH 01/17] x86/cpu: Enable new SSE/AVX/AVX512 cpu features
|
|
|
169b9a |
|
|
|
169b9a |
RH-Author: plai@redhat.com
|
|
|
169b9a |
Message-id: <1525801248-24104-1-git-send-email-plai@redhat.com>
|
|
|
169b9a |
Patchwork-id: 80114
|
|
|
169b9a |
O-Subject: [RHEL7.6 PATCH BZ 1513686] x86/cpu: Enable new SSE/AVX/AVX512 cpu features
|
|
|
169b9a |
Bugzilla: 1513686
|
|
|
169b9a |
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
169b9a |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
169b9a |
RH-Acked-by: Radim Krcmar <rkrcmar@redhat.com>
|
|
|
169b9a |
|
|
|
169b9a |
From: Yang Zhong <yang.zhong@intel.com>
|
|
|
169b9a |
|
|
|
169b9a |
Intel OTC Virt tested.
|
|
|
169b9a |
|
|
|
169b9a |
Intel IceLake cpu has added new cpu features,AVX512_VBMI2/GFNI/
|
|
|
169b9a |
VAES/VPCLMULQDQ/AVX512_VNNI/AVX512_BITALG. Those new cpu features
|
|
|
169b9a |
need expose to guest VM.
|
|
|
169b9a |
|
|
|
169b9a |
The bit definition:
|
|
|
169b9a |
CPUID.(EAX=7,ECX=0):ECX[bit 06] AVX512_VBMI2
|
|
|
169b9a |
CPUID.(EAX=7,ECX=0):ECX[bit 08] GFNI
|
|
|
169b9a |
CPUID.(EAX=7,ECX=0):ECX[bit 09] VAES
|
|
|
169b9a |
CPUID.(EAX=7,ECX=0):ECX[bit 10] VPCLMULQDQ
|
|
|
169b9a |
CPUID.(EAX=7,ECX=0):ECX[bit 11] AVX512_VNNI
|
|
|
169b9a |
CPUID.(EAX=7,ECX=0):ECX[bit 12] AVX512_BITALG
|
|
|
169b9a |
|
|
|
169b9a |
The release document ref below link:
|
|
|
169b9a |
https://software.intel.com/sites/default/files/managed/c5/15/\
|
|
|
169b9a |
architecture-instruction-set-extensions-programming-reference.pdf
|
|
|
169b9a |
|
|
|
169b9a |
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
|
|
|
169b9a |
Message-Id: <1511335676-20797-1-git-send-email-yang.zhong@intel.com>
|
|
|
169b9a |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
169b9a |
(cherry picked from commit aff9e6e46a343e1404498be4edd03db1112f0950)
|
|
|
169b9a |
Signed-off-by: Paul Lai <plai@redhat.com>
|
|
|
169b9a |
|
|
|
169b9a |
Resolved Conflicts:
|
|
|
169b9a |
target/i386/cpu.c
|
|
|
169b9a |
target/i386/cpu.h
|
|
|
169b9a |
changes applied to target-i386/cpu.{c,h}
|
|
|
169b9a |
|
|
|
169b9a |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
169b9a |
---
|
|
|
169b9a |
target-i386/cpu.c | 6 +++---
|
|
|
169b9a |
target-i386/cpu.h | 6 ++++++
|
|
|
169b9a |
2 files changed, 9 insertions(+), 3 deletions(-)
|
|
|
169b9a |
|
|
|
169b9a |
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
|
|
|
169b9a |
index 539c202..48a5507 100644
|
|
|
169b9a |
--- a/target-i386/cpu.c
|
|
|
169b9a |
+++ b/target-i386/cpu.c
|
|
|
169b9a |
@@ -156,9 +156,9 @@ static const char *cpuid_7_0_ebx_feature_name[] = {
|
|
|
169b9a |
|
|
|
169b9a |
static const char *cpuid_7_0_ecx_feature_name[] = {
|
|
|
169b9a |
NULL, "avx512vbmi", NULL, "pku",
|
|
|
169b9a |
- "ospke", NULL, NULL, NULL,
|
|
|
169b9a |
- NULL, NULL, NULL, NULL,
|
|
|
169b9a |
- NULL, NULL, "avx512-vpopcntdq", NULL,
|
|
|
169b9a |
+ "ospke", NULL, "avx512vbmi2", NULL,
|
|
|
169b9a |
+ "gfni", "vaes", "vpclmulqdq", "avx512vnni",
|
|
|
169b9a |
+ "avx512bitalg", NULL, "avx512-vpopcntdq", NULL,
|
|
|
169b9a |
NULL, NULL, NULL, NULL,
|
|
|
169b9a |
NULL, NULL, NULL, NULL,
|
|
|
169b9a |
NULL, NULL, NULL, NULL,
|
|
|
169b9a |
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
|
|
|
169b9a |
index da84443..a781639 100644
|
|
|
169b9a |
--- a/target-i386/cpu.h
|
|
|
169b9a |
+++ b/target-i386/cpu.h
|
|
|
169b9a |
@@ -584,6 +584,12 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
|
|
|
169b9a |
#define CPUID_7_0_ECX_UMIP (1U << 2)
|
|
|
169b9a |
#define CPUID_7_0_ECX_PKU (1U << 3)
|
|
|
169b9a |
#define CPUID_7_0_ECX_OSPKE (1U << 4)
|
|
|
169b9a |
+#define CPUID_7_0_ECX_VBMI2 (1U << 6) /* Additional VBMI Instrs */
|
|
|
169b9a |
+#define CPUID_7_0_ECX_GFNI (1U << 8)
|
|
|
169b9a |
+#define CPUID_7_0_ECX_VAES (1U << 9)
|
|
|
169b9a |
+#define CPUID_7_0_ECX_VPCLMULQDQ (1U << 10)
|
|
|
169b9a |
+#define CPUID_7_0_ECX_AVX512VNNI (1U << 11)
|
|
|
169b9a |
+#define CPUID_7_0_ECX_AVX512BITALG (1U << 12)
|
|
|
169b9a |
#define CPUID_7_0_ECX_AVX512_VPOPCNTDQ (1U << 14) /* POPCNT for vectors of DW/QW */
|
|
|
169b9a |
#define CPUID_7_0_ECX_RDPID (1U << 22)
|
|
|
169b9a |
|
|
|
169b9a |
--
|
|
|
169b9a |
1.8.3.1
|
|
|
169b9a |
|