cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
Blob Blame History Raw
From 3a10799602b257d8d890965a1c3144476d8aa48d Mon Sep 17 00:00:00 2001
From: "plai@redhat.com" <plai@redhat.com>
Date: Mon, 13 Mar 2017 20:15:12 +0100
Subject: [PATCH 19/24] x86: add AVX512_VPOPCNTDQ features

RH-Author: plai@redhat.com
Message-id: <1489436112-5802-2-git-send-email-plai@redhat.com>
Patchwork-id: 74283
O-Subject: [RHEL7.4 qemu-kvm BZ1415830 v2 RESEND] x86: add AVX512_VPOPCNTDQ features
Bugzilla: 1415830
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Acked-by: David Hildenbrand <david@redhat.com>
RH-Acked-by: Bandan Das <bsd@redhat.com>

From: He Chen <he.chen@linux.intel.com>

AVX512_VPOPCNTDQ: Vector POPCNT instructions for word and qwords.
variable precision.

Signed-off-by: He Chen <he.chen@linux.intel.com>
Message-Id: <1484272411-28073-1-git-send-email-he.chen@linux.intel.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
(cherry picked from commit f77543772dcd38fa438470d9b80bafbd3a3ebbd7)
Signed-off-by: Paul Lai <plai@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>

Conflicts:
	target/i386/cpu.c -> changes applied to target-i386/cpu.c
	target/i386/cpu.h -> changes applied to target-i386/cpu.h
---
 target-i386/cpu.c | 2 +-
 target-i386/cpu.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 38056eb..33f0997 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -158,7 +158,7 @@ static const char *cpuid_7_0_ecx_feature_name[] = {
     NULL, "avx512vbmi", NULL, NULL,
     NULL, NULL, NULL, NULL,
     NULL, NULL, NULL, NULL,
-    NULL, NULL, NULL, NULL,
+    NULL, NULL, "avx512-vpopcntdq", 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 eec5c49..f04deb4 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -579,6 +579,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
 #define CPUID_7_0_ECX_UMIP     (1U << 2)
 #define CPUID_7_0_ECX_PKU      (1U << 3)
 #define CPUID_7_0_ECX_OSPKE    (1U << 4)
+#define CPUID_7_0_ECX_AVX512_VPOPCNTDQ (1U << 14) /* POPCNT for vectors of DW/QW */
 #define CPUID_7_0_ECX_RDPID    (1U << 22)
 
 #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */
-- 
1.8.3.1