Skip to content

Commit e7694a5

Browse files
taoxu916ehabkost
authored andcommitted
target/i386: drop the duplicated definition of cpuid AVX512_VBMI macro
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 <[email protected]> Signed-off-by: Tao Xu <[email protected]> Message-Id: <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Eduardo Habkost <[email protected]>
1 parent f2be0be commit e7694a5

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

target/i386/cpu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,8 +2645,8 @@ static X86CPUDefinition builtin_x86_defs[] = {
26452645
CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
26462646
CPUID_7_0_EBX_SMAP,
26472647
.features[FEAT_7_0_ECX] =
2648-
CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
2649-
CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
2648+
CPUID_7_0_ECX_AVX512_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
2649+
CPUID_7_0_ECX_AVX512_VBMI2 | CPUID_7_0_ECX_GFNI |
26502650
CPUID_7_0_ECX_VAES | CPUID_7_0_ECX_VPCLMULQDQ |
26512651
CPUID_7_0_ECX_AVX512VNNI | CPUID_7_0_ECX_AVX512BITALG |
26522652
CPUID_7_0_ECX_AVX512_VPOPCNTDQ,
@@ -2703,8 +2703,8 @@ static X86CPUDefinition builtin_x86_defs[] = {
27032703
CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD |
27042704
CPUID_7_0_EBX_AVX512VL | CPUID_7_0_EBX_CLFLUSHOPT,
27052705
.features[FEAT_7_0_ECX] =
2706-
CPUID_7_0_ECX_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
2707-
CPUID_7_0_ECX_VBMI2 | CPUID_7_0_ECX_GFNI |
2706+
CPUID_7_0_ECX_AVX512_VBMI | CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU |
2707+
CPUID_7_0_ECX_AVX512_VBMI2 | CPUID_7_0_ECX_GFNI |
27082708
CPUID_7_0_ECX_VAES | CPUID_7_0_ECX_VPCLMULQDQ |
27092709
CPUID_7_0_ECX_AVX512VNNI | CPUID_7_0_ECX_AVX512BITALG |
27102710
CPUID_7_0_ECX_AVX512_VPOPCNTDQ | CPUID_7_0_ECX_LA57,

target/i386/cpu.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -723,16 +723,15 @@ typedef uint64_t FeatureWordArray[FEATURE_WORDS];
723723
#define CPUID_7_0_EBX_AVX512VL (1U << 31)
724724

725725
/* AVX-512 Vector Byte Manipulation Instruction */
726-
#define CPUID_7_0_ECX_AVX512BMI (1U << 1)
727-
#define CPUID_7_0_ECX_VBMI (1U << 1)
726+
#define CPUID_7_0_ECX_AVX512_VBMI (1U << 1)
728727
/* User-Mode Instruction Prevention */
729728
#define CPUID_7_0_ECX_UMIP (1U << 2)
730729
/* Protection Keys for User-mode Pages */
731730
#define CPUID_7_0_ECX_PKU (1U << 3)
732731
/* OS Enable Protection Keys */
733732
#define CPUID_7_0_ECX_OSPKE (1U << 4)
734733
/* Additional AVX-512 Vector Byte Manipulation Instruction */
735-
#define CPUID_7_0_ECX_VBMI2 (1U << 6)
734+
#define CPUID_7_0_ECX_AVX512_VBMI2 (1U << 6)
736735
/* Galois Field New Instructions */
737736
#define CPUID_7_0_ECX_GFNI (1U << 8)
738737
/* Vector AES Instructions */

target/i386/hvf/x86_cpuid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx,
8989
ebx &= ~CPUID_7_0_EBX_INVPCID;
9090
}
9191

92-
ecx &= CPUID_7_0_ECX_AVX512BMI | CPUID_7_0_ECX_AVX512_VPOPCNTDQ;
92+
ecx &= CPUID_7_0_ECX_AVX512_VBMI | CPUID_7_0_ECX_AVX512_VPOPCNTDQ;
9393
edx &= CPUID_7_0_EDX_AVX512_4VNNIW | CPUID_7_0_EDX_AVX512_4FMAPS;
9494
} else {
9595
ebx = 0;

0 commit comments

Comments
 (0)