[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 15/18] target/i386: drop the duplicated definition of cpuid AVX512
From: |
Eduardo Habkost |
Subject: |
[PULL 15/18] target/i386: drop the duplicated definition of cpuid AVX512_VBMI macro |
Date: |
Tue, 15 Oct 2019 18:37:42 -0300 |
From: Tao Xu <address@hidden>
Drop the duplicated definition of cpuid AVX512_VBMI macro and rename
it as CPUID_7_0_ECX_AVX512_VBMI. Rename CPUID_7_0_ECX_VBMI2 as
CPUID_7_0_ECX_AVX512_VBMI2.
Acked-by: Stefano Garzarella <address@hidden>
Signed-off-by: Tao Xu <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
target/i386/cpu.h | 5 ++---
target/i386/cpu.c | 8 ++++----
target/i386/hvf/x86_cpuid.c | 2 +-
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 93aad4655f..cedb5bc205 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -723,8 +723,7 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS];
#define CPUID_7_0_EBX_AVX512VL (1U << 31)
/* AVX-512 Vector Byte Manipulation Instruction */
-#define CPUID_7_0_ECX_AVX512BMI (1U << 1)
-#define CPUID_7_0_ECX_VBMI (1U << 1)
+#define CPUID_7_0_ECX_AVX512_VBMI (1U << 1)
/* User-Mode Instruction Prevention */
#define CPUID_7_0_ECX_UMIP (1U << 2)
/* Protection Keys for User-mode Pages */
@@ -732,7 +731,7 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS];
/* OS Enable Protection Keys */
#define CPUID_7_0_ECX_OSPKE (1U << 4)
/* Additional AVX-512 Vector Byte Manipulation Instruction */
-#define CPUID_7_0_ECX_VBMI2 (1U << 6)
+#define CPUID_7_0_ECX_AVX512_VBMI2 (1U << 6)
/* Galois Field New Instructions */
#define CPUID_7_0_ECX_GFNI (1U << 8)
/* Vector AES Instructions */
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 44f1bbdcac..daece62c19 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -2645,8 +2645,8 @@ static X86CPUDefinition builtin_x86_defs[] = {
CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
CPUID_7_0_EBX_SMAP,
.features[FEAT_7_0_ECX] =
- CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
- CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
+ CPUID_7_0_ECX_AVX512_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU
|
+ CPUID_7_0_ECX_AVX512_VBMI2 | CPUID_7_0_ECX_GFNI |
CPUID_7_0_ECX_VAES | CPUID_7_0_ECX_VPCLMULQDQ |
CPUID_7_0_ECX_AVX512VNNI | CPUID_7_0_ECX_AVX512BITALG |
CPUID_7_0_ECX_AVX512_VPOPCNTDQ,
@@ -2703,8 +2703,8 @@ static X86CPUDefinition builtin_x86_defs[] = {
CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
.features[FEAT_7_0_ECX] =
- CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
- CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
+ CPUID_7_0_ECX_AVX512_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU
|
+ CPUID_7_0_ECX_AVX512_VBMI2 | CPUID_7_0_ECX_GFNI |
CPUID_7_0_ECX_VAES | CPUID_7_0_ECX_VPCLMULQDQ |
CPUID_7_0_ECX_AVX512VNNI | CPUID_7_0_ECX_AVX512BITALG |
CPUID_7_0_ECX_AVX512_VPOPCNTDQ | CPUID_7_0_ECX_LA57,
diff --git a/target/i386/hvf/x86_cpuid.c b/target/i386/hvf/x86_cpuid.c
index 4d957fe896..16762b6eb4 100644
--- a/target/i386/hvf/x86_cpuid.c
+++ b/target/i386/hvf/x86_cpuid.c
@@ -89,7 +89,7 @@ uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx,
ebx &= ~CPUID_7_0_EBX_INVPCID;
}
- ecx &= CPUID_7_0_ECX_AVX512BMI | CPUID_7_0_ECX_AVX512_VPOPCNTDQ;
+ ecx &= CPUID_7_0_ECX_AVX512_VBMI | CPUID_7_0_ECX_AVX512_VPOPCNTDQ;
edx &= CPUID_7_0_EDX_AVX512_4VNNIW | CPUID_7_0_EDX_AVX512_4FMAPS;
} else {
ebx = 0;
--
2.21.0
- [PULL 05/18] hw/isa/piix4: Convert reset handler to DeviceReset, (continued)
- [PULL 05/18] hw/isa/piix4: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 06/18] hw/ide/piix: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 07/18] hw/ide/sii3112: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 08/18] hw/ide/via82c: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 09/18] hw/isa/vt82c686: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 10/18] hw/input/lm832x: Convert reset handler to DeviceReset, Eduardo Habkost, 2019/10/15
- [PULL 11/18] hw/misc/vmcoreinfo: Add comment about reset handler, Eduardo Habkost, 2019/10/15
- [PULL 12/18] memory-device: not necessary to use goto for the last check, Eduardo Habkost, 2019/10/15
- [PULL 13/18] memory-device: break the loop if tmp exceed the hinted range, Eduardo Habkost, 2019/10/15
- [PULL 14/18] target/i386: clean up comments over 80 chars per line, Eduardo Habkost, 2019/10/15
- [PULL 15/18] target/i386: drop the duplicated definition of cpuid AVX512_VBMI macro,
Eduardo Habkost <=
- [PULL 16/18] i386: Fix legacy guest with xsave panic on host kvm without update cpuid., Eduardo Habkost, 2019/10/15
- [PULL 17/18] i386: Omit all-zeroes entries from KVM CPUID table, Eduardo Habkost, 2019/10/15
- [PULL 18/18] target/i386: Add Snowridge-v2 (no MPX) CPU model, Eduardo Habkost, 2019/10/15
- Re: [PULL 00/18] x86 and machine queue, 2019-10-15, Peter Maydell, 2019/10/18