619821
From 3a10799602b257d8d890965a1c3144476d8aa48d Mon Sep 17 00:00:00 2001
619821
From: "plai@redhat.com" <plai@redhat.com>
619821
Date: Mon, 13 Mar 2017 20:15:12 +0100
619821
Subject: [PATCH 19/24] x86: add AVX512_VPOPCNTDQ features
619821
619821
RH-Author: plai@redhat.com
619821
Message-id: <1489436112-5802-2-git-send-email-plai@redhat.com>
619821
Patchwork-id: 74283
619821
O-Subject: [RHEL7.4 qemu-kvm BZ1415830 v2 RESEND] x86: add AVX512_VPOPCNTDQ features
619821
Bugzilla: 1415830
619821
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
619821
RH-Acked-by: David Hildenbrand <david@redhat.com>
619821
RH-Acked-by: Bandan Das <bsd@redhat.com>
619821
619821
From: He Chen <he.chen@linux.intel.com>
619821
619821
AVX512_VPOPCNTDQ: Vector POPCNT instructions for word and qwords.
619821
variable precision.
619821
619821
Signed-off-by: He Chen <he.chen@linux.intel.com>
619821
Message-Id: <1484272411-28073-1-git-send-email-he.chen@linux.intel.com>
619821
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
619821
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
619821
(cherry picked from commit f77543772dcd38fa438470d9b80bafbd3a3ebbd7)
619821
Signed-off-by: Paul Lai <plai@redhat.com>
619821
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
619821
619821
Conflicts:
619821
	target/i386/cpu.c -> changes applied to target-i386/cpu.c
619821
	target/i386/cpu.h -> changes applied to target-i386/cpu.h
619821
---
619821
 target-i386/cpu.c | 2 +-
619821
 target-i386/cpu.h | 1 +
619821
 2 files changed, 2 insertions(+), 1 deletion(-)
619821
619821
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
619821
index 38056eb..33f0997 100644
619821
--- a/target-i386/cpu.c
619821
+++ b/target-i386/cpu.c
619821
@@ -158,7 +158,7 @@ static const char *cpuid_7_0_ecx_feature_name[] = {
619821
     NULL, "avx512vbmi", NULL, NULL,
619821
     NULL, NULL, NULL, NULL,
619821
     NULL, NULL, NULL, NULL,
619821
-    NULL, NULL, NULL, NULL,
619821
+    NULL, NULL, "avx512-vpopcntdq", NULL,
619821
     NULL, NULL, NULL, NULL,
619821
     NULL, NULL, NULL, NULL,
619821
     NULL, NULL, NULL, NULL,
619821
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
619821
index eec5c49..f04deb4 100644
619821
--- a/target-i386/cpu.h
619821
+++ b/target-i386/cpu.h
619821
@@ -579,6 +579,7 @@ typedef uint32_t FeatureWordArray[FEATURE_WORDS];
619821
 #define CPUID_7_0_ECX_UMIP     (1U << 2)
619821
 #define CPUID_7_0_ECX_PKU      (1U << 3)
619821
 #define CPUID_7_0_ECX_OSPKE    (1U << 4)
619821
+#define CPUID_7_0_ECX_AVX512_VPOPCNTDQ (1U << 14) /* POPCNT for vectors of DW/QW */
619821
 #define CPUID_7_0_ECX_RDPID    (1U << 22)
619821
 
619821
 #define CPUID_7_0_EDX_AVX512_4VNNIW (1U << 2) /* AVX512 Neural Network Instructions */
619821
-- 
619821
1.8.3.1
619821