Blame SOURCES/kvm-target-i386-Add-Intel-SHA_NI-instruction-support.patch

9ae3a8
From 481923b5c3cd124ba38ee34e803f15afae39c793 Mon Sep 17 00:00:00 2001
9ae3a8
From: Eduardo Habkost <ehabkost@redhat.com>
9ae3a8
Date: Thu, 5 Oct 2017 22:39:07 +0200
9ae3a8
Subject: [PATCH 24/27] target-i386: Add Intel SHA_NI instruction support.
9ae3a8
9ae3a8
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
9ae3a8
Message-id: <20171005223908.431-2-ehabkost@redhat.com>
9ae3a8
Patchwork-id: 76832
9ae3a8
O-Subject: [RHEL-7.5 qemu-kvm PATCH 1/2] target-i386: Add Intel SHA_NI instruction support.
9ae3a8
Bugzilla: 1450396
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
9ae3a8
RH-Acked-by: Bandan Das <bsd@redhat.com>
9ae3a8
9ae3a8
From: Yi Sun <yi.y.sun@linux.intel.com>
9ae3a8
9ae3a8
Add SHA_NI feature bit. Its spec can be found at:
9ae3a8
https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf
9ae3a8
9ae3a8
Backport notes:
9ae3a8
* target/i386 is target-i386 in the QEMU 1.5.3 tree
9ae3a8
9ae3a8
Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
9ae3a8
Message-Id: <1481683803-10051-1-git-send-email-yi.y.sun@linux.intel.com>
9ae3a8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
(cherry picked from commit 638cbd452d3a92a2ab18caee73078483d90f64eb)
9ae3a8
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 target-i386/cpu.c | 2 +-
9ae3a8
 target-i386/cpu.h | 1 +
9ae3a8
 2 files changed, 2 insertions(+), 1 deletion(-)
9ae3a8
9ae3a8
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
9ae3a8
index fbd3117..e0749c0 100644
9ae3a8
--- a/target-i386/cpu.c
9ae3a8
+++ b/target-i386/cpu.c
9ae3a8
@@ -151,7 +151,7 @@ static const char *cpuid_7_0_ebx_feature_name[] = {
9ae3a8
     "avx512f", "avx512dq", "rdseed", "adx",
9ae3a8
     "smap", "avx512ifma", NULL, NULL,
9ae3a8
     NULL, NULL, "avx512pf", "avx512er",
9ae3a8
-    "avx512cd", NULL, "avx512bw", "avx512vl",
9ae3a8
+    "avx512cd", "sha-ni", "avx512bw", "avx512vl",
9ae3a8
 };
9ae3a8
 
9ae3a8
 static const char *cpuid_7_0_ecx_feature_name[] = {
9ae3a8
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
9ae3a8
index 7a12c0d..78b8072 100644
9ae3a8
--- a/target-i386/cpu.h
9ae3a8
+++ b/target-i386/cpu.h
9ae3a8
@@ -575,6 +575,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
9ae3a8
 #define CPUID_7_0_EBX_AVX512ER (1U << 27) /* AVX-512 Exponential and Reciprocal */
9ae3a8
 #define CPUID_7_0_EBX_AVX512CD (1U << 28) /* AVX-512 Conflict Detection */
9ae3a8
 #define CPUID_7_0_EBX_AVX512BW (1U << 30) /* AVX-512 Byte and Word Instructions */
9ae3a8
+#define CPUID_7_0_EBX_SHA_NI   (1U << 29) /* SHA1/SHA256 Instruction Extensions */
9ae3a8
 #define CPUID_7_0_EBX_AVX512VL (1U << 31) /* AVX-512 Vector Length Extensions */
9ae3a8
 
9ae3a8
 #define CPUID_7_0_ECX_VBMI     (1U << 1)  /* AVX-512 Vector Byte Manipulation Instrs */
9ae3a8
-- 
9ae3a8
1.8.3.1
9ae3a8